Ping limit script
#6

Just to tidy up your code:

pawn Код:
public CheckPing(playerid)
{
    if(pInfo[playerid][pAdmin] > 0) return 0;
    if(GetPlayerPing(playerid) <= MaxPing) return 0;
    new string[90];
    PingWarnings[playerid] += 1;
    if(PingWarnings[playerid] >= 3)
    {
        new name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "%s(%d) has been kicked due to reaching 3/3 ping warnings.", name, playerid);
        SCMToALL(COLOR_GREY, string);
        format(string, sizeof(string), "You have been kicked due to reaching the maximum amount of ping warnings (3/3)");
        SCM(playerid, COLOR_RED, string);
        SetTimerEx("KickPlayerEx", 1000, false, "i", playerid);
        return 1;
    }  
    format(string, sizeof(string), "You have received a ping warning (%d/3)", PingWarnings[playerid]);
    SCM(playerid, COLOR_GREY, string);
    return 1;
}
Reply


Messages In This Thread
Ping limit script - by Jimmy0wns - 16.02.2014, 21:50
Re: Ping limit script - by Cvnnor - 16.02.2014, 21:56
Re: Ping limit script - by Jimmy0wns - 16.02.2014, 21:59
Re: Ping limit script - by Jimmy0wns - 16.02.2014, 22:02
Re: Ping limit script - by CuervO - 17.02.2014, 00:59
Re: Ping limit script - by Threshold - 17.02.2014, 02:03

Forum Jump:


Users browsing this thread: 2 Guest(s)