07.10.2013, 18:07
Hi. I would like to ask for a help how to fix this problem.
So I wanted to make a /c command which shows general commands like Teleports Menu, Weapons Menu and some other menus.
Now.. I want to show Weapons Menu with the use /c command. See below for sample..
This is under ondialogresponse
So basically I have two defined dialogs
one is #define DIALOG_CMDS(This is for the command /c) and DIALOGID (This is for the command /w for weapons)
How can weapon menu dialog show when I do use /c and choose different kind of weapons?
I tried to do if(dialogid == DIALOGID+DIALOG_CMDS) but nothing happens.
So I wanted to make a /c command which shows general commands like Teleports Menu, Weapons Menu and some other menus.
Now.. I want to show Weapons Menu with the use /c command. See below for sample..
Code:
CMD:c(playerid, params[]) { ShowPlayerDialog(playerid, DIALOG_CMDS, DIALOG_STYLE_LIST, "{09F7DF}Command Menu", "Weapons Menu", "Select", "Close"); return 1; }
Code:
if(dialogid == DIALOGID) { if(response) { if(listitem == 0) // Reset Weapons { ResetPlayerWeapons(playerid); } if(listitem == 1) // Meele { ShowPlayerDialog(playerid, DIALOGID+1, DIALOG_STYLE_LIST, "{09F7DF}Select a Weapon", "{09F7DF}Knuckle Dusters\n{09F7DF}Golf Club\n{09F7DF}Nite Stick\n{09F7DF}Bat\n{09F7DF}Shovel\n{09F7DF}Pool Cue\n{09F7DF}Katana\n{09F7DF}Dildo\n{09F7DF}Spray Can\n{09F7DF}Cane\n{09F7DF}Chainsaw\n{09F7DF}Vibrator", "Select", "Back"); } if(listitem == 2) // Pistols { ShowPlayerDialog(playerid, DIALOGID+2, DIALOG_STYLE_LIST, "{09F7DF}Select a Weapon", "{09F7DF}9mm\n{09F7DF}Silenced 9mm\n{09F7DF}Desert Eagle", "Select", "Back"); } if(listitem == 3) // Sub-Machine Guns { ShowPlayerDialog(playerid, DIALOGID+3, DIALOG_STYLE_LIST, "{09F7DF}Select a Weapon", "{09F7DF}Uzi\n{09F7DF}SMG\n{09F7DF}Tec9", "Select", "Back"); } if(listitem == 4) // Rifles { ShowPlayerDialog(playerid, DIALOGID+4, DIALOG_STYLE_LIST, "{09F7DF}Select a Weapon", "{09F7DF}Country Rifle\n{09F7DF}Sniper Rifle", "Select", "Back"); } if(listitem == 5) // Assault { ShowPlayerDialog(playerid, DIALOGID+5, DIALOG_STYLE_LIST, "{09F7DF}Select a Weapon", "{09F7DF}AK-47\n{09F7DF}M4", "Select", "Back"); } if(listitem == 6) // Shotguns { ShowPlayerDialog(playerid, DIALOGID+6, DIALOG_STYLE_LIST, "{09F7DF}Select a Weapon", "{09F7DF}Standard Shotgun\n{09F7DF}Sawnoff Shotgun\n{09F7DF}Combat Shotgun", "Select", "Back"); } if(listitem == 7) // Misc { ShowPlayerDialog(playerid, DIALOGID+7, DIALOG_STYLE_LIST, "{09F7DF}Select a Weapon", "{09F7DF}Fire Extinguisher\n{09F7DF}Parachute\n{09F7DF}Nightvision Goggles\n{09F7DF}Flowers \n{09F7DF}Camera", "Select", "Back"); } } return 1; }
one is #define DIALOG_CMDS(This is for the command /c) and DIALOGID (This is for the command /w for weapons)
How can weapon menu dialog show when I do use /c and choose different kind of weapons?
I tried to do if(dialogid == DIALOGID+DIALOG_CMDS) but nothing happens.