Dialog boxes
#1

How would I make a Dialog box go back to the previous box that I was just on so that way I wouldnt have to re type the command to get back to the original menu?
Reply
#2

pawn Код:
if(dialogid == xXitsgodzillaXx)
 {
    if(!response)
      {
         // show the previous box here
      }
Reply
#3

As a quick extension for the previous post only, use DaTa[X]'s code under the OnDialogResponse callback, like this:

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == xXitsgodzillaXx) // Comparing passed dialogid and variable used, when creating your dialog (storing it's ID)
    {
        if(response)
        {
            // Insert previous box's code here, if you wanna show it, when they selected any items and/or clicked 'Yes'
        }
        else
        {
            // In case, they pressed ESC, or selected cancel
        }
        return 1;
    }
    return 0;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)