SA-MP Forums Archive
Dialog Help - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Dialog Help (/showthread.php?tid=571534)



Dialog Help - Aephout - 19.04.2015

I was just wondering, How would I open a new dialog inside of a dialog.

I am making a "Weapon Selecting" Dialog, I want Them to be in order, Assault Rifles Sub Machine Guns ETC.

I want to know If I were to click on "Assault Rifles" It would bring me to a new Dialog that I create?

Thanks In Advance!


Re: Dialog Help - ChuckyBabe - 19.04.2015

yes you can. Just put anpther showplayerdialog on dialogid of your first dialog.


Re: Dialog Help - Fel486 - 19.04.2015

Why not?

Just an example:

PHP код:

#define WEAPONS_DIALOG 1201
#define RIFLES_DIALOG 1202
// public OnPlayerCommandText(playerid, cmdtext[])
if(!strcmp(cmdtext"/w"))
{
    
ShowPlayerDialog(playeridWEAPONS_DIALOGDIALOG_STYLE_LIST, .....);
}
// public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
switch(dialogid)
{
    case 
WEAPONS_DIALOG:
    {
        if(
response)
        {
            if(
listitem == 1)
            {
                
ShowPlayerDialog(playeridRIFLES_DIALOGDIALOG_STYLE, LIST, ....); 
            }
        }
        
        break;
    }
        




Re: Dialog Help - Aephout - 19.04.2015

Where Do I define the "Rifle Dialog" at?


Re: Dialog Help - Fel486 - 19.04.2015

Quote:
Originally Posted by Aephout
Посмотреть сообщение
Where Do I define the "Rifle Dialog" at?
That's just the ID to represent that specific dialog.

ShowPlayerDialog(playerid, DIALOG_ID, DIALOG_TYPE, ...);

Remember that's a Integer (int), so, a number.

Define it on the top of your script, with:

pawn Код:
#define RIFLE_DIALOG 1200 // Could be another number, since it's not already used