Quote:
Originally Posted by Jeffry
That won't work like this.
Try:
On TOP:
pawn Код:
new LastCmd[MAX_PLAYERS];
OnPlayerConnect:
OnPlayerCommandText:
pawn Код:
if(IsPlayerFlooding(playerid) && !IsPlayerAdmin(playerid)) { SendClientMessage(playerid, 0xFF0000FF, "* {6EF83C}You can only use commands once {F81414}every two seconds."); return 1; } LastCmd[playerid] = gettime();
At Bottom:
pawn Код:
stock IsPlayerFlooding(playerid) { if(LastCmd[playerid] + 2 > gettime()) return 1; //Flooding: Yes else return 0; //Flooding: No }
Cheers.
|
gettime?
Don't you mean GetTickCount?