[COD] Anti Ping Alto

1- Ao topo do GM defina
#define LIMITEPING 800 // Limite do ping...
new PingPlayer[MAX_PLAYER_NAME];
forward PingPlay(playerid);
new TimerPing[MAX_PLAYER_NAME];
2- Ao OnPlayerConnect
TimerPing[playerid] = SetTimerEx("PingPlay", 1000, 0, "i", playerid);
3- Ao OnPlayerDisconnect
KillTimer(TimerPing[playerid]);
4- Ao final do GM
public PingPlay(playerid)
{
PingFDP[playerid] = GetPlayerPing(playerid);
if(PingPlayer[playerid]) > LIMITEPING)
{
new NomePlay[MAX_PLAYER_NAME], StringFDP[256];
GetPlayerName(playerid, NomePlay, sizeof(NomePlay));
format(StringFDP, sizeof(StringFDP), "%s Foi kickado por tem um ping maior que %d",NomePlay,LIMITEPING);
SendClientMessageToAll(0xFF0000AA, StringFDP);
Kick(playerid);
KillTimer(TimerPing[playerid]);
}
return 1;
}

1 comentários:

[DK]tchal disse...

ERROS:

error 017: undefined symbol "PingFDP" warning 215: expression has no effecterror 001: expected token: ";", but found "]" error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Postar um comentário