garfield

[COD]: IsPlayerFlooding

Oct 4th, 2011
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.39 KB | None | 0 0
  1. new Flooding[MAX_PLAYERS char];
  2. stock IsPlayerFlooding(pid, maxtime)
  3. {
  4.     if(tickcount() - Flooding{pid} < maxtime)
  5.         return Flooding{pid} = tickcount(), true;
  6.     return Flooding{pid} = tickcount(), false;
  7. }
  8.  
  9.  
  10.  
  11. // Verifica se o player está fazendo SPAM ( Floodando ).
  12. // Uso:
  13.  
  14. if(IsPlayerFlooding(playerid, 1200)) return SendClientMessage(playerid, -1 ," Você está flodando! pare!");
  15.  
Advertisement
Add Comment
Please, Sign In to add comment