02.11.2018, 18:44
Code:
hook OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == DIALOG_ADMIN_HELP)
{
if(response)
{
switch(listitem)
{
case 0:
{
if(PlayerInfo[playerid][pAdmin] >= 1)
{
ShowPlayerDialog(playerid, DIALOG_ADMIN_MENU, DIALOG_STYLE_MSGBOX, "Server Moderator", "/help\n/Milk\n/Baked\n/bread", "Cancel", "");
}
else
return SendClientMessage(playerid, COLOR_RED, "You are not authorized to access this section!");
}
case 1:
{
if(PlayerInfo[playerid][pAdmin] >= 2)
{
ShowPlayerDialog(playerid, DIALOG_ADMIN_MENU, DIALOG_STYLE_MSGBOX, "Game Administrator", "/help\n/Milk\n/Baked\n/bread", "Cancel", "");
}
else
return SendClientMessage(playerid, COLOR_RED, "You are not authorized to access this section!");
}
case 2:
{
if(PlayerInfo[playerid][pAdmin] >= 3)
{
ShowPlayerDialog(playerid, DIALOG_ADMIN_MENU, DIALOG_STYLE_MSGBOX, "Lead Administrator", "/help\n/Milk\n/Baked\n/bread", "Cancel", "");
}
else
return SendClientMessage(playerid, COLOR_RED, "You are not authorized to access this section!");
}
case 3:
{
if(PlayerInfo[playerid][pAdmin] >= 4)
{
ShowPlayerDialog(playerid, DIALOG_ADMIN_MENU, DIALOG_STYLE_MSGBOX, "Server Manager", "/help\n/Milk\n/Baked\n/bread", "Cancel", "");
}
else
return SendClientMessage(playerid, COLOR_RED, "You are not authorized to access this section!");
}
}
}
}
return 1;
}


