09.07.2011, 01:41
PHP код:
new Tick[MAX_PLAYERS],CmdFlood[MAX_PLAYERS];
public OnPlayerCommandText(playerid) {
if(GetTickCount() - Tick[playerid] < 5000) {
CmdFlood[playerid]++;
if(CmdFlood == 2) return Kick(playerid);
SendClientMessage(playerid,-1,"Sem flood");
return true;
}
if(!strcmp(cmdtext,"/testeflood",true)) {
print("oi");
return true;
}
return false;
}