Dialog Style List
#8

From reading what you want this is how I would have written your menu (at it's most basic level, of course you would need to edit it to make it better looking).

The command
pawn Код:
CMD:ah (playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] = 1)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Help", "Level 1 Admin CMDS", "Accept", "Cancel");
    }
    if (PlayerInfo[playerid][pAdmin] = 1)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Help", "Level 1 Admin CMDS\nLevel 2 Admin CMDS", "Accept", "Cancel");
    }
    if (PlayerInfo[playerid][pAdmin] = 1)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Help", "Level 1 Admin CMDS\nLevel 2 Admin CMDS\nLevel 3 Admin CMDS", "Accept", "Cancel");
    }
    if (PlayerInfo[playerid][pAdmin] = 1)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Help", "Level 1 Admin CMDS\nLevel 2 Admin CMDS\nLevel 3 Admin CMDS\nLevel 4 Admin CMDS", "Accept", "Cancel");
    }
    if (PlayerInfo[playerid][pAdmin] = 1)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Help", "Level 1 Admin CMDS\nLevel 2 Admin CMDS\nLevel 3 Admin CMDS\nLevel 4 Admin CMDS\nLevel 5 Admin CMDS", "Accept", "Cancel");
    }
    if (PlayerInfo[playerid][pAdmin] = 1)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Help", "Level 1 Admin CMDS\nLevel 2 Admin CMDS\nLevel 3 Admin CMDS\nLevel 4 Admin CMDS\nLevel 5 Admin CMDS\nLevel 6 Admin CMDS", "Accept", "Cancel");
    }
    if (PlayerInfo[playerid][pAdmin] = 1)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Help", "Level 1 Admin CMDS\nLevel 2 Admin CMDS\nLevel 3 Admin CMDS\nLevel 4 Admin CMDS\nLevel 5 Admin CMDS\nLevel 6 Admin CMDS\nLevel 7 Admin CMDS", "Accept", "Cancel");
    }
    if (PlayerInfo[playerid][pAdmin] = 1)
    {
        ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Admin Help", "Level 1 Admin CMDS\nLevel 2 Admin CMDS\nLevel 3 Admin CMDS\nLevel 4 Admin CMDS\nLevel 5 Admin CMDS\nLevel 6 Admin CMDS\nLevel 7 Admin CMDS\nLevel 8 Admin CMDS", "Accept", "Cancel");
    }
    if (PlayerInfo[playerid][pAdmin] = 0)
    {
        return 0;
    }
    return 1;
}
Dialog Response
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(response)
    {
        switch(dialogid)
        {
            case 1:
            {
                switch(listitem)
                {
                    case 0: //Admin level 1 CMDS
                    {
                        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Level 1 CMD help", "/kick\n/warn\n/mute", "Okay", "Cancel");
                    }
                    case 1: //Admin level 2 CMDS
                    {
                        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Level 2 CMD help", "bla bla bla level 2 commands", "Okay", "Cancel");
                    }
                    case 2: //Admin level 3 CMDS
                    {
                        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Level 3 CMD help", "bla bla bla level 3 commands", "Okay", "Cancel");
                    }
                    case 3: //Admin level 4 CMDS
                    {
                        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Level 4 CMD help", "bla bla bla level 4 commands", "Okay", "Cancel");
                    }
                    case 4: //Admin level 5 CMDS
                    {
                        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Level 5 CMD help", "bla bla bla level 5 commands", "Okay", "Cancel");
                    }
                    case 5: //Admin level 6 CMDS
                    {
                        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Level 6 CMD help", "bla bla bla level 6 commands", "Okay", "Cancel");
                    }
                    case 6: //Admin level 7 CMDS
                    {
                        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Level 7 CMD help", "bla bla bla level 7 commands", "Okay", "Cancel");
                    }
                    case 7: //Admin level 8 CMDS
                    {
                        ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Level 8 CMD help", "bla bla bla level 8 commands", "Okay", "Cancel");
                    }
                }
               
            }
        }
    }
}
I apologize for any errors I didn't have time to compile it.
Reply


Messages In This Thread
Dialog Style List - by DJ_Shocker - 13.08.2013, 21:40
Re: Dialog Style List - by Areax - 13.08.2013, 22:15
Re: Dialog Style List - by DJ_Shocker - 13.08.2013, 22:31
Re: Dialog Style List - by Areax - 13.08.2013, 22:42
Re: Dialog Style List - by DJ_Shocker - 13.08.2013, 22:46
Re: Dialog Style List - by Areax - 13.08.2013, 22:49
Re: Dialog Style List - by DJ_Shocker - 13.08.2013, 22:53
Re: Dialog Style List - by Spikmun - 14.08.2013, 03:39

Forum Jump:


Users browsing this thread: 5 Guest(s)