05.03.2019, 13:17
Hello ******,
Thanks for your help.
I've tried different returns in the OnPlayerCommandReceived callback, but anyone doesn't help me. I still receive SERVER: Unknown command after the handled error:
I have no idea what I missed...
There is my public below:
Thanks for your help.
I've tried different returns in the OnPlayerCommandReceived callback, but anyone doesn't help me. I still receive SERVER: Unknown command after the handled error:
Quote:
Cmd executing is forbidden when Dialog is opened. SERVER: Unknown command |
I have no idea what I missed...
There is my public below:
Код:
public e_COMMAND_ERRORS:OnPlayerCommandReceived(playerid, cmdtext[], e_COMMAND_ERRORS:success) { if(pData[playerid][pCmdFlood] - GetTickCount() > 0) return COMMAND_DENIED; pData[playerid][pCmdFlood] = GetTickCount() + ANTI_FLOOD_TIME; if(!gPlayerLogged[playerid] || gPlayerNeedPassChange[playerid] || pData[playerid][pBlocked] > 0) return COMMAND_DENIED; if(pTemp[playerid][pDialog]) { SendClientMessageEx(playerid, CGREY, "Cmd executing is forbidden when Dialog is opened."); return COMMAND_DENIED; } switch (success) { case COMMAND_ZERO_RET: return COMMAND_ZERO_RET; case COMMAND_OK: WriteMysqlLog(playerid, LogTypeOnPlayerCommandReceived, cmdtext); case COMMAND_UNDEFINED, COMMAND_HIDDEN, COMMAND_DISABLED, COMMAND_BAD_PREFIX: { SendClientMessageEx(playerid, CGREY, "No such command."); return COMMAND_OK; } case COMMAND_DENIED: return COMMAND_DENIED; case COMMAND_NO_PLAYER: return COMMAND_NO_PLAYER; case COMMAND_INVALID_INPUT: return COMMAND_INVALID_INPUT; } return COMMAND_OK; }