08.05.2015, 23:28
Assim ta certo?
Код:
#define MaxPing 200 new PlayerPing[MAX_PLAYERS]; public OnPlayerConnect(playerid){ return PlayerPing[playerid] = 0; } public OnFilterScriptInit(){ return SetTimer("PingKick",5155,1); } forward PingKick(); public PingKick() { for (new i = 0; i < MAX_PLAYERS; i++){ if(IsPlayerConnected(i)){ if(GetPlayerPing(i) > MaxPing) { PlayerPing[i]++; if(PlayerPing[i] > 10){ new string[128]; format(string, sizeof(string), "%s foi kickado do servidor. (Motivo: Alto Ping (%d) | Maximo Permitido (%d))", pName(i), GetPlayerPing(i), MaxPing); SendClientMessageToAll(grey,string); Kick(i); } } } } return true;}