21.03.2018, 12:46
why it's returning me "Unknown command" when i spam? i tryed with return COMMAND_ZERO_RET, COMMAND_OK also and still not working..
Код:
public e_COMMAND_ERRORS:OnPlayerCommandReceived(playerid, cmdtext[], e_COMMAND_ERRORS:success)
{
if(GetPVarInt(playerid, "LastCMDTime") != 0 && gettime()-GetPVarInt(playerid, "LastCMDTime") < 1)
{
return COMMAND_DENIED;
}
if(svRestarting <= 60 && IsSvRestarting)
{
SS(playerid, COLOR_GREY, RestartingMSG, RestartingMSGEN);
return COMMAND_DENIED;
}
switch(success)
{
case COMMAND_UNDEFINED: SCM(playerid, COLOR_WHITE, "ERROR: That command doesn't exists. Type /help!");
}
SetPVarInt(playerid, "LastCMDTime", gettime());
return COMMAND_OK;
}



