0 Members and 1 Guest are viewing this topic.
(...)procedure AppOnIdle(Ticks: integer);begin if (TrackOrNot = TRUE) then begin for i:=1 to 12 do begin IF Track[i]=TRUE then begin if TrackCount[i] = 0 then begin TrackPing[i] := TrackPing[i] + GetPlayerStat(i,'ping'); WriteConsole(0,'Track result for ' + IDToName(i) + ': Max Ping: ' + inttostr(TrackPingMax[i]) + ' Avarage: '+ inttostr(Round(TrackPing[i]/4)),Color); // reset vars TrackPingMax[i] := 0; TrackPing[i] := 0; Track[i] := FALSE; end else if TrackCount[i] > 0 then begin TrackPing[i] := TrackPing[i] + GetPlayerStat(i,'ping'); IF GetPlayerStat(i,'ping') > TrackPingMax[i] then TrackPingMax[i] := GetPlayerStat(i,'ping'); TrackCount[i] := TrackCount[i] - 1; end; end; end; end;end; (...)
function StrToID(s: string): byte;var i,xx: byte;begin xx:=0; Result:=254; try if GetPlayerStat(StrToInt(s),'active') then begin Result := StrToInt(s); xx:=1; end; except end; if (xx=0) then begin s := LowerCase(s); for i := 1 to 32 do if GetPlayerStat(i,'active') then begin if ContainsString(LowerCase(IDToName(i)), s) then begin Result := i; break; end; end; end;end;
How fix:Go script dir open script.pas (Track.pas) find and go to function StrToID(s: string): byte;and replace to this function:Code: [Select]function StrToID(s: string): byte;var i,xx: byte;begin xx:=0; Result:=254; try if GetPlayerStat(StrToInt(s),'active') then begin Result := StrToInt(s); xx:=1; end; except end; if (xx=0) then begin s := LowerCase(s); for i := 1 to 32 do if GetPlayerStat(i,'active') then begin if ContainsString(LowerCase(IDToName(i)), s) then begin Result := i; break; end; end; end;end;