Need help with this error..
#1

pawn Code:
if (strcmp(cmd, "vipmenu", true) == 0)
    {
        if (PlayerInfo[playerid][pVIP] >= 1) return SendClientMessage(playerid,COLOR_RED,"You don't have access to that command!");
        ShowPlayerDialog(playerid,DIALOG_VIPMENU,DIALOG_STYLE_LIST,"VIPMenu","Weapons\nClothes\nPlayer Color","Select","Cancel");
        return 1;
    }
Why isn't the command working? im new with STRCMP so could anyone help me out and tell me why the command isn't working?
Reply
#2

Show more code..
In game you're trying /vipmenu or just vipmenu?
Reply
#3

Quote:
Originally Posted by Machida
View Post
Show more code..
In game you're trying /vipmenu or just vipmenu?
Indeed, add "/" infront of "vipmenu" and try /vipmenu IG.
Reply
#4

Use ZCMD https://sampforum.blast.hk/showthread.php?tid=91354,
pawn Code:
CMD:vipmenu(player, params[])
{
        if (PlayerInfo[playerid][pVIP] >= 1) return SendClientMessage(playerid,COLOR_RED,"You don't have access to that command!");
        ShowPlayerDialog(playerid,DIALOG_VIPMENU,DIALOG_STYLE_LIST,"VIPMenu","Weapons\nClothes\nPlayer Color","Select","Cancel");
        return 1;
}
Reply
#5

Wilsen, No. nd I think thats what i'v been forgetting, the / lol.
Reply
#6

Thats what i thought xD
Reply
#7

I dont get Unknown Command but the dialog doesnt show.
Reply
#8

Quote:
Originally Posted by Machida
View Post
Thats what i thought xD
Yea, But how the hell did he forget the "/" -.-
Reply
#9

@Batad, I forgot the / because I do not know how to script with STRCMP, I always script with Zcmd. but now Im trying STRCMP on an RP gamemode. Now please dont post a reply if it is not helping me because this topic is because I need help.

Now can any one tell me why teh Dialog isnt showing?
Reply
#10

Quote:
Originally Posted by Azzeto
View Post
@Batad, I forgot the / because I do not know how to script with STRCMP, I always script with Zcmd. but now Im trying STRCMP on an RP gamemode. Now please dont post a reply if it is not helping me because this topic is because I need help.

Now can any one tell me why teh Dialog isnt showing?
Are you crazy ?!, Why are you using strcmp ?, Strcmp lags the server and commands lag, ZCMD is safer, Faster and Easier, Stick with ZCMD..

If you don't wanna change your mind, Your answer to your question, is : Use Strtok.

https://sampwiki.blast.hk/wiki/Strtok
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)