[Tutorial] [TUT]MaxPing
#6

pawn Код:
new string[256];



pawn Код:
#define PING    (1000)

public OnGameModeInit()
{
    SetTimer("Chec", 1000, true);
    return 1;
}

Chec();
public Chec();
{
    static str[128];
    str[0] = EOS;
    for(new i, e = GetMaxPlayers(); e != i; ++i)
    {
        if(IsPlayerConnected(i) && GetPlayerPing(i) >= PING)
        {
            GetPlayerName(i, str, 24);
            format(str, sizeof(str),"%s Foi kickado por ping alto, Ping: %d", str, GetPlayerPing(i));
            SendClientMessageToAll(-1, str);
            Kick(i);
        }
    }
}
Reply


Messages In This Thread
[TUT]MaxPing - by whiXґ - 30.10.2011, 22:08
Re: [TUT]MaxPing - by AppleX - 30.10.2011, 22:10
Re: [TUT]MaxPing - by [S]trong - 30.10.2011, 22:11
Re: [TUT]MaxPing - by whiXґ - 30.10.2011, 22:13
Re: [TUT]MaxPing - by Ricop522 - 30.10.2011, 22:15
Re: [TUT]MaxPing - by [O.z]Caroline - 30.10.2011, 22:17
Re: [TUT]MaxPing - by victorcls - 30.10.2011, 22:49
Re: [TUT]MaxPing - by whiXґ - 30.10.2011, 22:51
Re: [TUT]MaxPing - by Josma_cmd - 30.10.2011, 23:04
Re: [TUT]MaxPing - by Victor_Souz4 - 31.10.2011, 00:11

Forum Jump:


Users browsing this thread: 2 Guest(s)