16.09.2009, 23:16
Wow that's one messy code.
You never sent the string, you created a variable when it wasn't needed, you did two seperate checks instead of using &&. Just pointing out what I changed.
pawn Код:
public PingCheck()
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerAdmin(i) && IsPlayerConnected(i))
{
new string[128];
if(GetPlayerPing(i) > 600)
{
format(string, sizeof(string), "Excessive Ping (%i) - Above 600.", ping);
SendClientMessage(playerid, COLOR_RED, string);
Kick(i);
}
}
}
return 1;
}