Dialog Help
#1

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!
Reply
#2

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

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;
    }
        

Reply
#4

Where Do I define the "Rifle Dialog" at?
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)