This Command Doesn't Work,Why?
#1

Why This Command Doesn't Work? It Sends Me "Server: unknown command."

pawn Код:
if(!strcmp(cmdtext, "/cmds", true))
    {
        ShowPlayerDialog(playerid, DIALOG_COMMANDS, DIALOG_STYLE_MSGBOX, "Server Commands", "/sdogdm - To Join The Snoop Dog Mansion Fight\n/dclubdm - To Join The Dance Club Fight\n/gpdm - To Join The Glen Park Fight\n/muldm - To Join The Mulholland Fight\n/home - To Return To Your Gangzone\n@ - To Speak In Team Chat\n/help - To See The Help Menu\n/rules - To See The Server Rules\n/checkvip [playerid] - To Check If A Player Is A VIP", "Continue", "Back");
        return 1;
    }
Reply
#2

#define DIALOG_COMMANDS 1
add it
Reply
#3

i have already defined it: #define DIALOG_COMMANDS 1,But i noticed something,When I use COMMAND:anycmdhere,it works but under OnPlayerCommandText,The cmds under it doesn't work.
Reply
#4

why you dont try use ZCMD ?
Reply
#5

include ZCMD?,i have already using it,ohhh i knew how to fix this problem.
Reply
#6

Use ZCMD
Reply
#7

Use ZCMD bro, much faster command processing and would probably eliminate the bug you're getting. Just put this at the top of the script.

pawn Код:
#include <zcmd>
In the topic I linked the word "ZCMD" to there is a lot more information, and it is in a lot more in depth then this brief paragraph, so just read the information on the topic and you should be good to go.
Reply
#8

Use zcmd it is much better
Reply
#9

i knew how to fix this problem but by other way,i deleted include zcmd and used dcmd easier
Reply
#10

The reason you got unknown command message is because you cannot use both ZCMD and strcmp in the same script. Dcmp is just a macro and it still uses strcmp which is slower than ZCMD/y_commands.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)