menu problem - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: menu problem (
/showthread.php?tid=172503)
menu problem -
mrcoolballs - 30.08.2010
Okay i have made a few menus before but now this one isnt working, someone mind helping me out?
btw its all in zcmd and sscanf
i have this up the top, i just used random numbers because i didnt keep it oranised with the first 10 menus i have made so im afraid i might type in the same menu id
pawn Код:
#define JOB 41469
#define COP_JOB 34566
#define RAPIST_JOB 23566
#define WHORE_JOB 9754
#define CRIMINAL_JOB 23456
the command:
pawn Код:
CMD:jobs(playerid,params[])
{
ShowPlayerDialog(playerid, JOB, DIALOG_STYLE_LIST,"Jobs","Police\nCriminal\nRapist\nWhore\n", "Select", "Exit");
return 1;
}
and the thingy at the bottom
pawn Код:
if(dialogid == JOB)
{
if(response)
{
if(listitem == 0)
{
SendClientMessage(playerid,LIMEGREEN,"You are now a police officer!");
PlayerJobs[playerid][Police] = 1;
}
if(listitem == 1)
{
SendClientMessage(playerid,LIMEGREEN,"You are now a criminal!");
PlayerJobs[playerid][Criminal] = 1;
}
if(listitem == 2)
{
SendClientMessage(playerid,LIMEGREEN,"You are now a rapist!");
PlayerJobs[playerid][Rapist] = 1;
}
if(listitem == 3)
{
SendClientMessage(playerid,LIMEGREEN,"You are now a whore!");
PlayerJobs[playerid][Whore] = 1;
}
}
}
when i type /jobs in the game it doesnt even show a menu please help
Re: menu problem -
Vince - 30.08.2010
I believe dialogs id are limited to a certain amount.
But you can use an enum, so you'll never get the same id twice.
pawn Код:
enum Dialogs
{
JOB = 1,
COP_JOB,
RAPIST_JOB,
// etc.
}
Doesn't even require a change of your OnDialogResponse.
Re: menu problem -
mrcoolballs - 30.08.2010
so i cant make any more dialogs?
Re: menu problem -
mrcoolballs - 30.08.2010
bump blah blah blah