[Ajuda] Crashdetect
#3

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;}
Reply


Messages In This Thread
Crashdetect - by SatanMessenger - 08.05.2015, 22:06
Re: Crashdetect - by [BOPE]Seu._.Madruga - 08.05.2015, 22:25
Re: Crashdetect - by SatanMessenger - 08.05.2015, 23:28

Forum Jump:


Users browsing this thread: 1 Guest(s)