Dialog help
#1

Hey guys. I'm having trouble with creating a dialog. The dialog is I suppose pretty complicated.

Basically when a player types /commands, it checks what admin level they are, if they are support desk, if they are vip, if they are in an organization. etc etc. When the player selects which category they wanna view it displays the commands for whatever category they selected but it also offers "Back". When the player is in the main select menu, they can select cancel or back. However the part I'm struggling with is the cancel and back. Whenever the player selects back it needs to take the player back to the the dialog that is appropriate to them.

This problem is. I have when the player is in the main dialog they have "Select" and "Cancel", select and cancel works. However it's when the player selects a category they have "Back" and "Close" back doesn't work. It just closes. Here is the code I have.

PHP код:
    if(dialogid == DIALOG_CMDS_FULL)
    {
        if(
response)
        {
            if(
PlayerInfo[playerid][pAdmin] == 1)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Back""Close");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                    case 
8:    ShowPlayerDialog(playeridDIALOG_ACMDSDIALOG_STYLE_MSGBOX"{FF0000}Admininstrator Commands""{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather","Back""Close");
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 2)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Back""Close");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                    case 
8:    ShowPlayerDialog(playeridDIALOG_ACMDSDIALOG_STYLE_MSGBOX"{FF0000}Admininstrator Commands""{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather\n{1B1BE0}Level 2{FFFFFF} - /goto, /get, /banip, /ban, /listen, /settime""Back""Close");
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 3)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Back""Close");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                    case 
8:    ShowPlayerDialog(playeridDIALOG_ACMDSDIALOG_STYLE_MSGBOX"{FF0000}Admininstrator Commands""{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather\n{1B1BE0}Level 2{FFFFFF} - /goto, /get, /banip, /ban, /listen, /settime\n{7340DB}Level 3{FFFFFF} - /vdestroy, /heal, /giveweapon, /setskin, /givemoney, /deleteport, /deleteallreports, /setfuel""Back""Close");
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 4)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Back""Close");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                    case 
8:    ShowPlayerDialog(playeridDIALOG_ACMDSDIALOG_STYLE_MSGBOX"{FF0000}Admininstrator Commands"
                    
"{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather\n" \
                    
"{1B1BE0}Level 2{FFFFFF} - /goto, /get, /banip, /ban, /listen, /settime\n" \
                    
"{7340DB}Level 3{FFFFFF} - /vdestroy, /heal, /giveweapon, /setskin, /givemoney, /deleteport, /deleteallreports, /setfuel\n" \
                    
"{8CED15}Level 4{FFFFFF} - /oban, /unban, /sac, /vehicle, /healall, /dycmds, /setsmember, /setname""Back""Close");
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] >= 5)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Back""Close");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                    case 
8:
                    {
                        static 
chmds_admin[462 65 1] =
                        
"{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather\n" \
                        
"{1B1BE0}Level 2{FFFFFF} - /goto, /get, /banip, /ban, /listen, /settime\n" \
                        
"{7340DB}Level 3{FFFFFF} - /vdestroy, /heal, /giveweapon, /setskin, /givemoney, /deleteport, /deleteallreports, /setfuel\n" \
                        
"{8CED15}Level 4{FFFFFF} - /oban, /unban, /sac, /vehicle, /healall, /dycmds, /setsmember, /setname\n";
                        
strcat(chmds_admin"{37DB45}Level 5{FFFFFF} - /setadmin, /setadminuc, /gmx, /asetpass");
                        
ShowPlayerDialog(playeridDIALOG_CMDS_ADMINDIALOG_STYLE_MSGBOX"{FF0000}Admininstrator Commands"chmds_admin"Back""Close");
                    }
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
                }
            }
        }
        else
        {
            
ShowPlayerDialog (playeridDIALOG_CMDS_FULLDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands\nSupport Commands\nAdmin Commands\nVIP Commands""Select""Cancel");
        }
    }
    if(
dialogid == DIALOG_CMDS_ADMIN)
    {
        if(
response)
        {
            if(
PlayerInfo[playerid][pAdmin] == 1)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_ACMDSDIALOG_STYLE_MSGBOX"{FF0000}Admininstrator Commands""{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather","Back""Close");
                    case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 2)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_ACMDSDIALOG_STYLE_MSGBOX"{FF0000}Admininstrator Commands""{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather\n{1B1BE0}Level 2{FFFFFF} - /goto, /get, /banip, /ban, /listen, /settime""Back""Close");
                    case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 3)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_ACMDSDIALOG_STYLE_MSGBOX"{FF0000}Admininstrator Commands""{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather\n{1B1BE0}Level 2{FFFFFF} - /goto, /get, /banip, /ban, /listen, /settime\n{7340DB}Level 3{FFFFFF} - /vdestroy, /heal, /giveweapon, /setskin, /givemoney, /deleteport, /deleteallreports, /setfuel""Back""Close");
                    case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 4)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_ACMDSDIALOG_STYLE_MSGBOX"{FF0000}Admininstrator Commands"
                    
"{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather\n" \
                    
"{1B1BE0}Level 2{FFFFFF} - /goto, /get, /banip, /ban, /listen, /settime\n" \
                    
"{7340DB}Level 3{FFFFFF} - /vdestroy, /heal, /giveweapon, /setskin, /givemoney, /deleteport, /deleteallreports, /setfuel\n" \
                    
"{8CED15}Level 4{FFFFFF} - /oban, /unban, /sac, /vehicle, /healall, /dycmds, /setsmember, /setname""Back""Close");
                    case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] >= 5)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                    case 
7:
                    {
                        static 
cmds_admin[462 65 1] =
                        
"{DB881A}Level 1{FFFFFF} - /asay, /kick, /freeze, /unfreeze, /ac, /clear, /disarm, /checkplayer, /spectate, /stopspec, /acceptreport, /declinereport, /reports, /weather\n" \
                        
"{1B1BE0}Level 2{FFFFFF} - /goto, /get, /banip, /ban, /listen, /settime\n" \
                        
"{7340DB}Level 3{FFFFFF} - /vdestroy, /heal, /giveweapon, /setskin, /givemoney, /deleteport, /deleteallreports, /setfuel\n" \
                        
"{8CED15}Level 4{FFFFFF} - /oban, /unban, /sac, /vehicle, /healall, /dycmds, /setsmember, /setname\n";
                        
strcat(cmds_admin"{37DB45}Level 5{FFFFFF} - /setadmin, /setadminuc, /gmx, /asetpass");
                        
ShowPlayerDialog(playeridDIALOG_CMDS_ADMINDIALOG_STYLE_MSGBOX"{FF0000}Admininstrator Commands"cmds_admin"Back""Close");
                    }
                    case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
                }
            }
        }
    }
    if(
dialogid == DIALOG_CMDS_SUPPORTVIP)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                case 
7ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
            }
        }
        else
        {
            
ShowPlayerDialog (playeridDIALOG_CMDS_SUPPORTVIPDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nBusiness Commands\nSupport Commands\nVIP Commands""Select""Cancel");
        }
    }
    if(
dialogid == DIALOG_CMDS_SUPPORT)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
            }
        }
        else
        {
            
ShowPlayerDialog (playeridDIALOG_CMDS_SUPPORTDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nBusiness Commands\nSupport Commands""Select""Cancel");
        }
    }
    if(
dialogid == DIALOG_CMDS_VIP)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                case 
6ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
            }
        }
        else
        {
            
ShowPlayerDialog (playeridDIALOG_CMDS_VIPDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nBusiness Commands\nVIP Commands""Select""Cancel");
        }
    }
    if(
dialogid == DIALOG_CMDS_OSV)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Back""Close");
                case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
                case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
            }
        }
        else
        {
            
ShowPlayerDialog (playeridDIALOG_CMDS_OSVDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands\nSupport Commands\nVIP Commands""Select""Cancel");
        }
    }
    if(
dialogid == DIALOG_CMDS_OS)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Back""Close");
                case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Back""Close");
            }
        }
        else
        {
            
ShowPlayerDialog (playeridDIALOG_CMDS_OSDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands\nSupport Commands""Select""Cancel");
        }
    }
    if(
dialogid == DIALOG_CMDS_OV)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Back""Close");
                case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
                case 
7ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Back""Close");
            }
        }
        else
        {
            
ShowPlayerDialog (playeridDIALOG_CMDS_OVDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands\nVIP Commands""Select""Cancel");
        }
    }
    if(
dialogid == DIALOG_CMDS_LORG)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Back""Close");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Back""Close");
                case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
            }
        }
        else
        {
            
ShowPlayerDialog (playeridDIALOG_CMDS_LORGDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands""Select""Cancel");
        }
    }
    if(
dialogid == DIALOG_CMDS_NOM)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout, /coinflip""Back""Close");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Back""Close");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Back""Close");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Back""Close");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Back""Close");
                case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Back""Close");
            }
        }
        else
        {
            
ShowPlayerDialog (playeridDIALOG_CMDS_NOMDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nBusiness Commands""Select""Cancel");
        }
    }
CMD:commands(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] >= && PlayerInfo[playerid][OrgTier] == 1)
    {
        
ShowPlayerDialog (playeridDIALOG_CMDS_FULLDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands\nSupport Commands\nAdmin Commands\nVIP Commands""Select""Cancel");
    }
    else if(
PlayerInfo[playerid][pAdmin] >= 1)
    {
        
ShowPlayerDialog (playeridDIALOG_CMDS_ADMINDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nBusiness Commands\nSupport Commands\nAdmin Commands\nVIP Commands""Select""Cancel");
    }
    else if(
PlayerInfo[playerid][Support] == && PlayerInfo[playerid][VIP] == 1)
    {
        
ShowPlayerDialog (playeridDIALOG_CMDS_SUPPORTVIPDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nBusiness Commands\nSupport Commands\nVIP Commands""Select""Cancel");
    }
    else if(
PlayerInfo[playerid][Support] == 1)
    {
        
ShowPlayerDialog (playeridDIALOG_CMDS_SUPPORTDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nBusiness Commands\nSupport Commands""Select""Cancel");
    }
    else if(
PlayerInfo[playerid][VIP] == 1)
    {
        
ShowPlayerDialog (playeridDIALOG_CMDS_VIPDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nBusiness Commands\nVIP Commands""Select""Cancel");
    }
    else if(
PlayerInfo[playerid][OrgTier] == && PlayerInfo[playerid][Support] == && PlayerInfo[playerid][VIP] == 1)
    {
        
ShowPlayerDialog (playeridDIALOG_CMDS_OSVDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands\nSupport Commands\nVIP Commands""Select""Cancel");
    }
    else if(
PlayerInfo[playerid][OrgTier] == && PlayerInfo[playerid][Support] == 1)
    {
        
ShowPlayerDialog (playeridDIALOG_CMDS_OSDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands\nSupport Commands""Select""Cancel");
    }
    else if(
PlayerInfo[playerid][OrgTier] == && PlayerInfo[playerid][VIP] == 1)
    {
        
ShowPlayerDialog (playeridDIALOG_CMDS_OVDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands\nVIP Commands""Select""Cancel");
    }
    else if(
PlayerInfo[playerid][OrgTier] == 1)
    {
        
ShowPlayerDialog (playeridDIALOG_CMDS_LORGDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands""Select""Cancel");
    }
    else
    {
        
ShowPlayerDialog (playeridDIALOG_CMDS_NOMDIALOG_STYLE_LIST"Command Categories""Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nBusiness Commands""Select""Cancel");
    }
    return 
1;

Reply
#2

Doesnt look like you have a if statement for your sub-menus(eg. DIALOG_RP_CMDS), thus nothing happens(I think).

PHP код:
if(dialogid == DIALOG_RP_CMDS || dialogid == DIALOG_RP || dialogid == etc)
{
    if(!
responseShowPlayerDia(playerid, ....);

Reply
#3

But I have the else.... Doesn't that serve the same exact purpose?
Reply
#4

Since you know what you are doing, I will just let you fix the problem yourself the solution can be found below;

* Since you have stated that Back is in the left button and Close is in the right button. Back will be if(response) and Close will be if(!response), Maybe you haven't scripted the Back to work and that you have scripted the Back's function on the Close tab instead?
Reply
#5

I'm just so confused...Because of all the other dialogs. If you could show me an example of one, that'll be awesome and I'll be able to understand and adapt. The part that I'm getting confused about is the fact that I have to define the category selected weather it be VIP etc...Then if the player only matches certain categories it only displays certain things. Do I need to make a function that returns the showplayerdialog of the required categories?
Reply
#6

PHP код:
#include <a_samp>
#define DIALOG_1 1
#define DIALOG_2 2
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/test"cmdtexttrue5) == 0)
    {
        
ShowPlayerDialog(playeridDIALOG_1DIALOG_STYLE_LIST"Jake""Jake Hero""Select""Cancel");
        return 
1;
    }
    return 
0;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    switch(
dialogid)
    {
        case 
DIALOG_1:
        {
            if(
response// This is select
            
{
                switch(
listitem)
                {
                    
// Jake Hero
                    
case 0ShowPlayerDialog(playeridDIALOG_2DIALOG_STYLE_LIST"Test #1""Test\nTest\nTest""Back""Cancel");
                }
            }
        }
        case 
DIALOG_2:
        {
            if(
response// This is back
            
{
                
ShowPlayerDialog(playeridDIALOG_1DIALOG_STYLE_LIST"Jake""Jake Hero\nBill Cipher\nHarley Quinn""Select""Cancel");
            }
            else if(!
response// This is close
            
{
                
// do whatever you want here
            
}
        }
    }
    return 
1;

Reply
#7

This is the fact that I don't understand... If I have to define the dialog for example. DIALOG_RP_CMDS and have "back" it isn't going to check what categories the player matches. It's just going to set the dialog to whatever I set the dialog to display. How do I do it?
Reply
#8

There is no other way round but to put the ShowPlayerDialog on the if(response) -> (haven't used any includes that involves improving the dialog's function so I am not 100% if there is no other way round, Try using an include that improves the dailog's function perhaps?).
Reply
#9

Your code design is so messed up I'm not even planning to look thru it completely.
From what I saw you have failed to define the result of dialogs like DIALOG_ACMDS and DIALOG_RP_CMDS
You need to check if they press first button on those (response==1), then basically call the CMD by using cmd_commands(playerid,"");
But that is a really bad code design, because 5 first options are basically the same, rest are different.
Reply
#10

Well rather than saying my code design is bad. Could you give me an example of how to improve it?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)