Anti cmd spam
#3

first do not double post please
then try this
pawn Код:
// put this in the top of script

new pTyped[MAX_PLAYERS];

// then this is an example of the command

if(strcmp(cmd, "/lol", true) == 0)
{
  if(pTyped[playerid] == 1)
  {
    SendClientMessageToAll(COLOR_LIGHTRED, "don't abuse of this command !");  
    return 1;
  }
  SendClientMessageToAll(thecolor, "* jonybomb is LOL");
  pTyped[playerid] = 1;
  SetTimerEx("Spam", 3000, false, "i", playerid);
  return 1;
}

forward Spam(playerid);
public Spam(playerid)
{
  pTyped[playerid] = 0;
  return 1;
}
Reply


Messages In This Thread
Anti cmd spam - by jonybomb - 19.07.2009, 23:01
Re: Anti cmd spam - by jonybomb - 20.07.2009, 11:49
Re: Anti cmd spam - by James_Alex - 20.07.2009, 11:55
Re: Anti cmd spam - by jonybomb - 20.07.2009, 12:16

Forum Jump:


Users browsing this thread: 1 Guest(s)