anti cmd flood
#3

I would try to make something like this using OnPlayerCommandPerformed:
pawn Code:
new LastCommand[MAX_PLAYERS];

public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(tickcount() - LastCommand[playerid] < interval)
        return 0;

    LastCommand[playerid] = tickcount();
    return 1;
}
EDIT: I'm really sorry. I thought you want to make anti command flood. Well, you could use the same thing but only in other callback (OnPlayerText).
Reply


Messages In This Thread
anti cmd flood - by PepsiCola23 - 22.07.2015, 18:15
Re: anti cmd flood - by Threshold - 22.07.2015, 18:20
Re: anti cmd flood - by dominik523 - 22.07.2015, 18:23
Re: anti cmd flood - by PepsiCola23 - 22.07.2015, 18:30
Re: anti cmd flood - by Threshold - 22.07.2015, 18:55
Re: anti cmd flood - by PepsiCola23 - 22.07.2015, 20:05

Forum Jump:


Users browsing this thread: 1 Guest(s)