27.02.2012, 16:21
pawn Код:
//topo
new flood [MAX_PLAYERS];
//onplayerconect
flood[playerid] = 0;
//onplayerdisccone
flood[playerid] = 0;
//ongamemode
SetTimer("MinSpam", 2500, true);
//onplayertext
flood[playerid]++;
if(flood[playerid] >= 3)
{
new var0[128];
format(var0, 128, "%s[ID:%d] foi kickado por flood", pName(playerid),playerid);
SendClientMessageToAll(0xFFFF00AA, var0);
Kick(playerid);
return 0;
}
public MinSpam()
{
foreach(Player,i) {
if(0 < flood[i]) {
flood[i]--;
}
}
return 0;
}