YCMD OnPlayerCommandReceived causes flags to not work.
#2

After doing some more debugging, I found out that my commands are being called when I use them as COMMAND_OK and not as COMMAND_DENIED. Even though the player should not have access to the commands. Alright so the problem now is, if I remove COMMAND_OK from the OnPlayerCommandRecieved it will not send the command, but if I add it back no matter what I do it will send it.

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

        }
        case COMMAND_NO_PLAYER: {
            print("Test6");
            
        }
        case COMMAND_DISABLED: {
            print("Test7");

        }
        case COMMAND_BAD_PREFIX: {
            print("Test8");

        }
        case COMMAND_INVALID_INPUT: {
            print("Test9");
            
        }
    }
    return COMMAND_OK;
}
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)