YCMD OnPlayerCommandReceived causes flags to not work.
#4

Yeah, except the COMMAND_HIDDEN still shows the default error message.

Код:
public e_COMMAND_ERRORS:OnPlayerCommandReceived(playerid, cmdtext[], e_COMMAND_ERRORS:success)
{
    switch(success) {
        case COMMAND_ZERO_RET: {
            print("Test1");
            SendClientMessage(playerid, X11_RED, "Error: Unknown message!"); 
            return COMMAND_ZERO_RET;
        }
        case COMMAND_OK: {
            print("Test2");
            return COMMAND_OK;
            
        }
        case COMMAND_UNDEFINED: {
            SendClientMessage(playerid, X11_RED, "Error: Unknown message!"); 
            print("Test3");
            return COMMAND_HIDDEN;
        }
        case COMMAND_DENIED: {
            SendClientMessage(playerid, X11_RED, "Error: Unknown message!");
            print("Test4");
            return COMMAND_HIDDEN;
        }
        case COMMAND_HIDDEN: {
            print("Test5");
            SendClientMessage(playerid, X11_RED, "Error: Unknown message!");
            return COMMAND_HIDDEN;

        }
        case COMMAND_NO_PLAYER: {
            print("Test6");
            SendClientMessage(playerid, X11_RED, "Error: Unknown message!"); 
            return COMMANDCOMMAND_NO_PLAYER_HIDDEN;
            
        }
        case COMMAND_DISABLED: {
            print("Test7");
            SendClientMessage(playerid, X11_RED, "Error: Unknown message!"); 
            return COMMAND_DISABLED;

        }
        case COMMAND_BAD_PREFIX: {
            print("Test8");
            SendClientMessage(playerid, X11_RED, "Error: Unknown message!"); 
            return COMMAND_BAD_PREFIX;

        }
        case COMMAND_INVALID_INPUT: {
            print("Test9");
            SendClientMessage(playerid, X11_RED, "Error: Unknown message!"); 
            return COMMAND_INVALID_INPUT;
            
        }
    }
    return COMMAND_OK;
}
I disable the commands they don't have access to so all the comamnds they type goes to COMMAND_DENIED, it shows my error message then when it returns COMMAND_HIDDEN it displays the default error message "SERVER: Unknown command.".
Reply


Messages In This Thread
YCMD OnPlayerCommandReceived causes flags to not work. - by Alex_T - 04.03.2019, 04:09
Re: YCMD OnPlayerCommandReceived causes flags to not work. - by Alex_T - 04.03.2019, 10:50
Re: YCMD OnPlayerCommandReceived causes flags to not work. - by Alex_T - 04.03.2019, 11:14
Re: YCMD OnPlayerCommandReceived causes flags to not work. - by Alex_T - 04.03.2019, 11:42
Re: YCMD OnPlayerCommandReceived causes flags to not work. - by Alex_T - 04.03.2019, 12:06

Forum Jump:


Users browsing this thread: 1 Guest(s)