Antiflood - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Server (
https://sampforum.blast.hk/forumdisplay.php?fid=6)
+--- Forum: Server Support (
https://sampforum.blast.hk/forumdisplay.php?fid=19)
+--- Thread: Antiflood (
/showthread.php?tid=177331)
Antiflood -
Face9000 - 17.09.2010
Hi all,i need a good antiflood.
Example:
If i type 3 times the same word,i will get muted automaticaly
Re: Antiflood -
Vince - 17.09.2010
pawn Код:
new Tickcount[MAX_PLAYERS];
public OnPlayerText(playerid, text[])
{
if(GetTickCount() - Tickcount[playerid]) < 2000 && TickCount[playerid] != 0)
{
SendClientMessage(playerid, COLOR_RED, "Please don't flood.");
Tickcount[playerid] = GetTickCount();
return 0;
}
Tickcount[playerid] = GetTickCount();
return 1;
}
Something like that.
Re: Antiflood -
Face9000 - 17.09.2010
Thanks