Dialog Help.
#2

You can only have 2 buttons. But try this method:
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Location Selection", "Los Santos\nLas Venturas\nSan Fierro", "Select", "Cancel");

public OnDialogResponse(...)
{
    if(dialogid == 1 && response) // Checking if the dialogid == 1 and if he responded positive
    {
        switch(listitem) // listitem is the options you have on dialog_style_list
        {
            case 0: { SetPlayerPos(playerid, /* Los Santos Coordinates */); } // He selected the first option
            case 1: { SetPlayerPos(playerid, /* Las Venturas Coordinates */); } // 2nd
            case 2: { SetPlayerPos(playerid, /* San Fierro Coordinates */); } // 3rd
        }
    }
    return 1;
}
Reply


Messages In This Thread
Dialog Help. - by Buzzbomb - 12.11.2010, 22:03
Re: Dialog Help. - by [L3th4l] - 12.11.2010, 22:07
Re: Dialog Help. - by Buzzbomb - 12.11.2010, 22:35
Re: Dialog Help. - by Buzzbomb - 12.11.2010, 23:26
Re: Dialog Help. - by Buzzbomb - 13.11.2010, 00:03
Re: Dialog Help. - by Buzzbomb - 13.11.2010, 00:39

Forum Jump:


Users browsing this thread: 1 Guest(s)