05.10.2011, 20:35
pawn Код:
#define MaxPing 3000
OnPlayerUpPing(playerid);
public OnPlayerUpPing(playerid)
{
for(new i; i < MAX_PLAYERS; ++i)
{
if(!IsPlayerConnected(i) || GetPlayerPing(i) < MaxPing) continue;
static
sString[128],
sName[MAX_PLAYER_NAME];
GetPlayerName(i, sName, MAX_PLAYER_NAME);
format(sString, 128, "[ANTI-PING] O jogador %s foi kickado por limite de ping excedido (Limite: %d)", sName, MaxPing);
SendClientMessageToAll(0xFF0000FF, sString);
Kick(i);
}
return true;
}