Quote:
Originally Posted by TheToretto
if(!response)
return ShowPlayerDialog(...)
(on phone)
EDIT:
pawn 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!"); } }
} else return ShowPlayerDialog(/*Insert the whole syntax, keep the same define "DIALOG_ADMIN_HELP"*/); } return 1; }
|
didnt redirect me back
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!");
}
}
}
else
return ShowPlayerDialog(playerid, DIALOG_ADMIN_HELP, DIALOG_STYLE_LIST, "Commands","Server Moderator\nGame Administrator\nLead Administrator\nServer Manager","Select","Close");
}
return 1;
}
doesnt work probs because the scm does give it a response, no?