Antiflood - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Antiflood (
/showthread.php?tid=179202)
Antiflood -
Face9000 - 25.09.2010
Someone know a good antiflood?
Example:
I write for 3 times and the 4th times i will get muted.
Thanks
Re: Antiflood -
ScottCFR - 25.09.2010
Theres some good tutorials, let me dig in my old scripts. I'll edit with one.
This should work fine.
pawn Код:
SetPVarInt(playerid,"textspam",GetPVarInt(playerid,"textspam")+1);
SetTimerEx("clearspam",5000,false,"d",playerid);
if(GetPVarInt(playerid,"textspam") == 5)
{
AccountInfo[playerid][Mute] = 1;
SendClientMessage(playerid, RED, "You have been muted for spamming!");
}
else if(GetPVarInt(playerid,"textspam") == 4)
{
SendClientMessage(playerid,0xAA3333AA,"stop spamming or you will be muted! (wait 5 seconds)");
return 0;
}
Re: Antiflood -
Face9000 - 26.09.2010
Where i need to put that code?OnPlayerUpdate?
Re: Antiflood -
willsuckformoney - 26.09.2010
OnPlayerText