01.03.2018, 19:10
I never used YCMD but let's be logic.
PHP код:
public e_COMMAND_ERRORS:OnPlayerCommandReceived(playerid, cmdtext[], e_COMMAND_ERRORS:success)
{
if(lastcommand[playerid] != 0 && gettime()-lastcommand[playerid] < 2)
{
SCM(playerid, 0xFF0000FF, "Don't spam commands.");
return COMMAND_OK;
}
switch(success)
{
case COMMAND_UNDEFINED: SCM(playerid, COLOR_WHITE, "ERROR: That command doesn't exists. Type /help!");
}
lastcommand[playerid] = gettime();
return COMMAND_OK;
}