Help please!
#6

Quote:
Originally Posted by Pandabeer1337
simply use a variable and a timer.

pawn Код:
forward antispam(playerid);

public OnPlayerCommandText(playerid, cmdtext)
{
    if(spam[playerid] >=3) {
       SendClientMessage(playerid, RED, "Stop spamming wait 5 sec.");
       SetTimerEx("antispam", 30000, false, "i", playerid);
    }
    if(strcmp("/help", cmdtext, true)==0)
    {
        spam[playerid]++;
    }
    return 0;
}

public antispam(playerid) {
     spam[playerid] = 0;
     SendClientMessage(playerid, RED,"you can now type a command");
     return 1;
}
not test / compiled,
uhm,i don't fet this code very vell... do I need to ad every my commands under OnPlayerCommandText? like /help .Credits ..etc ?
Reply


Messages In This Thread
Help please! - by BigNewBie - 03.06.2009, 13:31
Re: Help please! - by robanswe - 03.06.2009, 13:34
Re: Help please! - by Think - 03.06.2009, 13:37
Re: Help please! - by Correlli - 03.06.2009, 13:38
Re: Help please! - by Think - 03.06.2009, 13:39
Re: Help please! - by BigNewBie - 03.06.2009, 14:12
Re: Help please! - by Think - 03.06.2009, 14:15
Re: Help please! - by BigNewBie - 03.06.2009, 14:27
Re: Help please! - by Backwardsman97 - 03.06.2009, 14:30
Re: Help please! - by BigNewBie - 03.06.2009, 14:36

Forum Jump:


Users browsing this thread: 4 Guest(s)