Antiflood
#2

pawn Код:
new Tickcount[MAX_PLAYERS];

public OnPlayerText(playerid, text[])
{
    if(GetTickCount() - Tickcount[playerid]) < 2000 && TickCount[playerid] != 0)
    {
        SendClientMessage(playerid, COLOR_RED, "Please don't flood.");
        Tickcount[playerid] = GetTickCount();
        return 0;
    }
    Tickcount[playerid] = GetTickCount();
    return 1;
}
Something like that.
Reply


Messages In This Thread
Antiflood - by Face9000 - 17.09.2010, 16:50
Re: Antiflood - by Vince - 17.09.2010, 16:55
Re: Antiflood - by Face9000 - 17.09.2010, 17:01

Forum Jump:


Users browsing this thread: 1 Guest(s)