14.08.2013, 03:39
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
Dialog Response
I apologize for any errors I didn't have time to compile it.
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;
}
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");
}
}
}
}
}
}