Need help with a command.. -
Azzeto - 21.08.2011
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?
Re: Need help with this error.. -
Machida - 21.08.2011
Show more code..
In game you're trying /vipmenu or just vipmenu?
Re: Need help with this error.. -
=WoR=G4M3Ov3r - 21.08.2011
Quote:
Originally Posted by Machida
Show more code..
In game you're trying /vipmenu or just vipmenu?
|
Indeed, add "/" infront of "vipmenu" and try /vipmenu IG.
Re: Need help with this error.. -
Jack_Wilson - 21.08.2011
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;
}
Re: Need help with this error.. -
Azzeto - 21.08.2011
Wilsen, No. nd I think thats what i'v been forgetting, the / lol.
Re: Need help with this error.. -
Machida - 21.08.2011
Thats what i thought xD
Re: Need help with this error.. -
Azzeto - 21.08.2011
I dont get Unknown Command but the dialog doesnt show.
Re: Need help with this error.. -
=WoR=G4M3Ov3r - 21.08.2011
Quote:
Originally Posted by Machida
Thats what i thought xD
|
Yea, But how the hell did he forget the "/" -.-
Re: Need help with this error.. -
Azzeto - 21.08.2011
@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?
Re: Need help with this error.. -
=WoR=G4M3Ov3r - 21.08.2011
Quote:
Originally Posted by Azzeto
@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