Dialogs
#2

first make somewhere the dialog, as you have done (I think xD)
Like this:
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Something", "Option 1\r\nOption 2", "OK", "Cancel");
Then, you need this: (OnDialogResponse)

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 1)
    {
        if(response)
        {
            switch(listitem)
            {
                case 0: ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Sub Option 1", "Option 1\r\nOption 2", "OK", "Cancel");
                case 1: ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Sub Option 2", "Option 1\r\nOption 2", "OK", "Cancel");
            }
        }
    }
    if(dialogid == 2) //Sub option 1
    {
        //Do something
    }
    if(dialogid == 3) //sub option 2
    {
        //Do something
    }
    return 1;
}
Reply


Messages In This Thread
Dialogs - by Th3Angel - 19.09.2010, 04:41
Re: Dialogs - by Kwarde - 19.09.2010, 05:51
Re: Dialogs - by Th3Angel - 19.09.2010, 06:44
Re: Dialogs - by Th3Angel - 19.09.2010, 18:16
Re: Dialogs - by Toni - 19.09.2010, 18:17
Re: Dialogs - by iggy1 - 19.09.2010, 18:19

Forum Jump:


Users browsing this thread: 3 Guest(s)