Anti Spam
#1

Hey there,

I would like to make my own Anti Spam but I am quite lost with making it. What I am looking for is when a player spams, he gets muted for about 20 seconds, but when he spams 3 times, he gets kicked automatically. Is that possible? If yes, please help.

Thanks and Regards
Puzi

P.S - I was searching around SA-MP forums, Anti Spams seem to be only in admin scripts which don't suit my script, I get load of errors.
Reply
#2

Do something like:
Код:
OnPlayerText(blblaabl....)
  {
  if(spam=1)
    {
    return 0;
    }
  else
    {
    SetTimer(balablblabla to your callback which changes the "spam" to 0, like 1 second);
    return 1;
    }
  }
Reply
#3

Doesn't work, changed the blabla bits :P
Reply
#4

Did you make a callback which makes the spam 0 and called it with the timer?

BTW it needs to be spam[playerid], and where you create it needs to be new spam[MAX_PLAYERS];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)