YCMD Problem
#3

If i put COMMAND_OK it will still run the command

Код:
public e_COMMAND_ERRORS:OnPlayerCommandReceived(playerid, cmdtext[], e_COMMAND_ERRORS:success) 
{  
	if(GetPVarInt(playerid, "LastCMDTime") != 0 && gettime()-GetPVarInt(playerid, "LastCMDTime") < 2)
	{
		SCM(playerid, COLOR_WHITE, "Stop Spamming! Your command it will not run.");
		return COMMAND_OK;
	}
	else
	{
		SetPVarInt(playerid, "LastCMDTime", gettime());
	    switch(success) 
	    { 
	        case COMMAND_UNDEFINED: SCM(playerid, COLOR_WHITE, "ERROR: That command doesn't exists. Type /help!"); 
	    }
	    if(svRestarting <= 60 && IsSvRestarting)
	    {
	    	SS(playerid, COLOR_GREY, RestartingMSG, RestartingMSGEN);
	    	return COMMAND_OK;
	    }
	    else
	    {
	    	return COMMAND_OK;
	   	}
    }
}
Reply


Messages In This Thread
YCMD Problem - by C0oL3r - 16.03.2018, 12:24
Re: YCMD Problem - by iKarim - 16.03.2018, 13:08
Re: YCMD Problem - by C0oL3r - 16.03.2018, 13:21

Forum Jump:


Users browsing this thread: 1 Guest(s)