12.05.2010, 19:12
Well i can't get how to make the "Back" button return to:
My code:
pawn Код:
ShowPlayerDialog(playerid, HELP, DIALOG_STYLE_LIST, "Help","Account\nCommands\nRules\nCredits", "Select", "Cancel");
pawn Код:
if(strcmp(cmd, "/help", true) == 0)
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid, HELP, DIALOG_STYLE_LIST, "Help","Account\nCommands\nRules\nCredits", "Select", "Cancel");
}
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1338)
{
if(response)
{
if(listitem == 0)
{
ShowPlayerDialog(playerid, HELP, DIALOG_STYLE_MSGBOX, "Account","Account related stuff here", "Back", "Cancel");
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, HELP, DIALOG_STYLE_MSGBOX, "Commands","Command shown here", "Back", "Cancel");
}
if(listitem == 2)
{
ShowPlayerDialog(playerid, HELP, DIALOG_STYLE_MSGBOX, "Rules","Server rules shown here", "Back", "Cancel");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, HELP, DIALOG_STYLE_MSGBOX, "Credits","Credits here", "Back", "Cancel");
}
}
}
return 0;
}