/commands help
#1

Hey guys, I'm making a command that displays all types of categories of commands within the server.

The problems I'm having is that once someone enter's a category I want them to be able to go back to the main menu. However i'm not sure how to do this as depending on their admin level, organization level, vip level, support level etc... is dependent on what dialog is displayed. I tried to just go back to the dialog set, but then when a player tries to exit a menu they can't. Another problem; well I suppose it isn't a problem it's a question is that can I compact this code better? Like is there a better and more efficient way of trying to do what i'm trying to do?

Here is my command:
PHP код:
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;

Here is my on dialog response
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
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""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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","Close""Back");
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 2)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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""Close""Back");
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 3)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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""Close""Back");
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 4)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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""Close""Back");
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] >= 5)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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"Close""Back");
                    }
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
        }
        
/*else
        {
            ShowPlayerDialog (playerid, DIALOG_CMDS_FULL, DIALOG_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""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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","Close""Back");
                    case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 2)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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""Close""Back");
                    case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 3)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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""Close""Back");
                    case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] == 4)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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""Close""Back");
                    case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
            else if(
PlayerInfo[playerid][pAdmin] >= 5)
            {
                switch(
listitem)
                {
                    case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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"Close""Back");
                    }
                    case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
        }
    }
    if(
dialogid == DIALOG_CMDS_SUPPORTVIP)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Close""Back");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                case 
7ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
            }
        }
    
/*    else
        {
            ShowPlayerDialog (playerid, DIALOG_CMDS_SUPPORTVIP, DIALOG_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""Close""Back");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                case 
6:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
            }
        }
        
/*else
        {
            ShowPlayerDialog (playerid, DIALOG_CMDS_SUPPORT, DIALOG_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""Close""Back");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                case 
5:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                case 
6ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
            }
        }
        
/*else
        {
            ShowPlayerDialog (playerid, DIALOG_CMDS_VIP, DIALOG_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""Close""Back");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back");
                case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                case 
8ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
            }
        }
        
/*else
        {
            ShowPlayerDialog (playerid, DIALOG_CMDS_OSV, DIALOG_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""Close""Back");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back");
                case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
            }
        }
        
/*else
        {
            ShowPlayerDialog (playerid, DIALOG_CMDS_OS, DIALOG_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""Close""Back");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back");
                case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                case 
7ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
            }
        }
        
/*else
        {
            ShowPlayerDialog (playerid, DIALOG_CMDS_OV, DIALOG_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""Close""Back");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back");
                case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
            }
        }
        
/*else
        {
            ShowPlayerDialog (playerid, DIALOG_CMDS_LORG, DIALOG_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""Close""Back");
                case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
            }
        }
        
/*else
        {
            ShowPlayerDialog (playerid, DIALOG_CMDS_NOM, DIALOG_STYLE_LIST, "Command Categories", "Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nBusiness Commands", "Select", "Cancel");
        }*/
    
}
    return 
1;

Reply
#2

I see the mistake, !response means they clicked the right button, at you command right button is cancel so it's ok
but on dialog response you made right command Back and left Close, so the response here is when they click Cancel button or ESC, and when they click Back it's !response
Reply
#3

(response) means they responded to the dialog. "Select" button which is on the left

Using (!response) means they've clicked "back" in your situation. I can't quiet remember and I don't have enough time to open pawn and test it but you need to use (!response) to return you to the original dialog.

Or you could do it using the "else" statement

for example:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_CMDS_FULL) {
        if(response) {
          //This means you've clicked the "select" button.
                  //That means your code will go here showing the list of commands
        } else {
                //This means you've selected the "back" button
            //then here you will create a command to return you to the original dialog e.g
                         ShowPlayerDialog (playerid, DIALOG_CMDS_FULL, DIALOG_STYLE_LIST(" etc etc...

          }
        return 1;
    }
return 0;
}
Not completely 100% sure that would work as I don't have pawn open to compile it but you see where I'm coming from.

If you need more help read over this topic:
https://sampforum.blast.hk/showthread.php?tid=105229

Good luck!
Reply
#4

Quote:
Originally Posted by Josh_Main
Посмотреть сообщение
(response) means they responded to the dialog. "Select" button which is on the left

Using (!response) means they've clicked "back" in your situation. I can't quiet remember and I don't have enough time to open pawn and test it but you need to use (!response) to return you to the original dialog.

Or you could do it using the "else" statement

for example:
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_CMDS_FULL) {
        if(response) {
          //This means you've clicked the "select" button.
                  //That means your code will go here showing the list of commands
        } else {
                //This means you've selected the "back" button
            //then here you will create a command to return you to the original dialog e.g
                         ShowPlayerDialog (playerid, DIALOG_CMDS_FULL, DIALOG_STYLE_LIST(" etc etc...

          }
        return 1;
    }
return 0;
}
Not completely 100% sure that would work as I don't have pawn open to compile it but you see where I'm coming from.

If you need more help read over this topic:
https://sampforum.blast.hk/showthread.php?tid=105229

Good luck!
That's exactly what I did here
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""Close""Back");
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back");
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back");
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back");
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back");
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back");
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back");
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back");
                    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","Close""Back");
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back");
                }
            }
        }
        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");
        }
    } 
However the thing is. Yes back WORKS but you can't quit out of the dialog at all. If you press ESC it doesn't work...

Would I have to change the dialogs in the DIALOG_CMDS_FULL be Back then Close? If so how do I change the format of the code?
Reply
#5

Quote:
Originally Posted by Shinja
Посмотреть сообщение
I see the mistake, !response means they clicked the right button, at your command right button is cancel so it's ok
but on dialog response you made right command Back and left Close, so the response here is when they click Close button or ESC, and when they click Back it's !response
You saw my comment? you have to switch "Back" and "Close"
Reply
#6

I did this. However whenever someone tries to select back, it just closes the dialog.
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""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");
        }
    } 
Reply
#7

I'll take example of one
PHP код:
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 (playerid, DIALOG_CMDS_OS, DIALOG_STYLE_LIST, "Command Categories", "Roleplay Commands\nVehicle Commands\nGeneral Commands\nHouse Commands\nOrganization Commands\nOrganization Leader Commands\nBusiness Commands\nSupport Commands", "Select", "Cancel");
        }
     */
    

Actually you doing else(if(!response) aka clicked Cancel) Show the dialog again, remove this last else from last dialogs
Reply
#8

I do that same thing happens, the dialog just disappears, it doesn't go back.
Reply
#9

Quote:
Originally Posted by Tass007
Посмотреть сообщение
I do that same thing happens, the dialog just disappears, it doesn't go back.
Yes because this dialog if(dialogid == DIALOG_CMDS_OS) that i took example of have buttons Select and Cancel, if you click Cancel it must disappear
For the other dialogs, you aren't showing OnDialogResponse of those dialogs
PHP код:
case 0:    ShowPlayerDialog(playeridDIALOG_RP_CMDSDIALOG_STYLE_MSGBOX"Roleplay Commands""/me, /do, /s, /shout""Close""Back"); 
                    case 
1:    ShowPlayerDialog(playeridDIALOG_VEH_CMDSDIALOG_STYLE_MSGBOX"Vehicle Commands""/opendoors, /closedoors, /opencarwindows, /closecarwindows, /openboot, /closeboot, /openbonnet, /closebonnet, /engine, /lights, /kph, /mph, /hidspeedo, /showspeedo""Close""Back"); 
                    case 
2:    ShowPlayerDialog(playeridDIALOG_GEN_CMDSDIALOG_STYLE_MSGBOX"General Commands""/admins, /afk, /back, /help, /report, /ask, /commands, /actions, /changename, /password, /civil""Close""Back"); 
                    case 
3:    ShowPlayerDialog(playeridDIALOG_PH_CMDSDIALOG_STYLE_MSGBOX"House Commands""/buyprop, /sellprop, /lockprop, /propdoor""Close""Back"); 
                    case 
4:    ShowPlayerDialog(playeridDIALOG_PORG_CMDSDIALOG_STYLE_MSGBOX"Organization Commands""/org, /ochat, /lc, /orgs, /want""Close""Back"); 
                    case 
5:    ShowPlayerDialog(playeridDIALOG_LORG_CMDSDIALOG_STYLE_MSGBOX"Organization Leader Commands""/orgsettier, /osetrank, /oinvite, /ouninvite""Close""Back"); 
                    case 
6:    ShowPlayerDialog(playeridDIALOG_PBUS_CMDSDIALOG_STYLE_MSGBOX"Business Commands""/bnear, /buybus, /sellbus, /lockbus, /busdoor""Close""Back"); 
                    case 
7:    ShowPlayerDialog(playeridDIALOG_SCMDSDIALOG_STYLE_MSGBOX"{00E5EE}Support Commands""/sc, /scolor, /reply, /declinehelp""Close""Back"); 
                    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","Close""Back"); 
                    case 
9ShowPlayerDialog(playeridDIALOG_VIP_CMDSDIALOG_STYLE_MSGBOX"{FF69B4}VIP Commands""Nothing here, yet""Close""Back"); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)