Anti Command Spam
#5

Then use it in OnPlayerCommandReceived callback.

Something like that should work:
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
    if (gettime() - Player_ACS[playerid] < 3)
    {
        SendClientMessage(playerid, 0xFF0000FF, "You must wait 3 seconds before using command again.");
        return 0;
    }
    Player_ACS[playerid] = gettime();
    return 1;
}
Reply


Messages In This Thread
Anti Command Spam - by Blackazur - 21.12.2013, 18:41
Re: Anti Command Spam - by Konstantinos - 21.12.2013, 18:46
AW: Anti Command Spam - by Blackazur - 21.12.2013, 18:50
Re: AW: Anti Command Spam - by Patrick - 21.12.2013, 18:54
Re: Anti Command Spam - by Konstantinos - 21.12.2013, 18:55
AW: Anti Command Spam - by Blackazur - 21.12.2013, 19:04
Re: Anti Command Spam - by Konstantinos - 21.12.2013, 19:08

Forum Jump:


Users browsing this thread: 1 Guest(s)