08.07.2012, 00:24
Eu normalmente faria com gettime();
Nem testei, caso for usar e aponte erros, avise-me.
pawn Код:
new canSpeak[MAX_PLAYERS],
floodCount[MAX_PLAYERS];
public OnPlayerText(playerid, text[])
{
if(gettime() >= canSpeak[playerid] && canSpeak[playerid] > 0)
canSpeak[playerid] = 0;
else
{
floodCount[playerid]++;
if(floodCount[playerid] == 3)
Kick(playerid);
}
canSpeak[playerid] = gettime() + 3;
return 1;
}