17.09.2010, 16:50
Hi all,i need a good antiflood.
Example:
If i type 3 times the same word,i will get muted automaticaly
Example:
If i type 3 times the same word,i will get muted automaticaly
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;
}