Anti Command Spam
#5

Quote:
Originally Posted by leonardo1434
View Post
This will just block the player to chat/cmds for 3 seconds.
pawn Code:
public OnPlayerText(playerid, text[])
{
   new lol = GetTickCount();
   if(GetTickCount() - lol < 3000)
   {
    SendClientMessage(playerid,-1,"You will have to wait 3 seconds to write/type any cmd again!");
   }
   return 1;
}
By the way, You're probably using a loop inside your teleport command, So better you remove it.
I can type every seconds and it always saying You will have to wait 3 seconds to write/type any cmd again!

What you mean by this You're probably using a loop inside your teleport command?
Reply


Messages In This Thread
Anti Command Spam - by kbalor - 25.06.2012, 16:30
Re: Anti Command Spam - by Hawky133 - 25.06.2012, 16:39
Re: Anti Command Spam - by kbalor - 25.06.2012, 16:43
Re: Anti Command Spam - by leonardo1434 - 25.06.2012, 17:04
Re: Anti Command Spam - by kbalor - 25.06.2012, 17:13
Re: Anti Command Spam - by Hawky133 - 25.06.2012, 17:16
Re: Anti Command Spam - by kbalor - 25.06.2012, 17:24
Re: Anti Command Spam - by Hawky133 - 25.06.2012, 17:27
Re: Anti Command Spam - by kbalor - 25.06.2012, 17:33
Re: Anti Command Spam - by Hawky133 - 25.06.2012, 19:40

Forum Jump:


Users browsing this thread: 1 Guest(s)