Posts: 6,129
Threads: 36
Joined: Jan 2009
Quote:
Originally Posted by Mikep.
Wow that's one messy code.
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; }
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.
|
I'm half asleep. But thanks.