Yeah i think this should work ...
const
maxping = 250; //Max ping allowed by the server
color = $FF00FF00; //Color of the warning message
maxkickpts = 3; //Max kick pts allowed
type tsoldier = record
kickpts : integer;
end;
var
soldier : array[1..32] of tsoldier;
i : byte;
procedure PingPts(ID: byte);
begin
if GetPlayerStat(ID,'ping') >= maxping
then begin
writeconsole(ID, 'You got 1 kick points because you have more ping that the allowed ping !', color);
soldier[ID].kickpts := soldier[ID].kickpts+1;
end;
end;
procedure CheckPing(ID: byte);
begin
if soldier[ID].kickpts >= maxkickpts then begin
DrawText(ID,'LAGGER !!!',250,RGB(0,255,0),0.10,220,400);
KickPlayer(ID);
end;
end;
procedure AppOnIdle(Ticks: integer);
begin
if Ticks mod (60 * 30) = 0
then begin
For i := 1 to 32 do if (GetPlayerStat(i,'Active') = true) then begin
PingPts(i);
CheckPing(i);
end;
end;
end;
From: July 22, 2010, 08:45:20 pm
im really not sure if its gonna work cause i cant test it be cause in my local server i have 0 ping ...