Possible to use multiple DIALOG_STYLE_INPUT
#1

Is is possible to use multiple DIALOG_STYLE_INPUT without them interfering, if so, how can I get the inputtext from the other DIALOG_STYLE_INPUT's
Reply
#2

Only one may be displayed, but once that one is finished you could show the next one.
Reply
#3

By using the ID's.

pawn Код:
#define DIALOG_ONE (001)
#define DIALOG_TWO (002)

ShowPlayerDialog(playerid, DIALOG_ONE, ...);
ShowPlayerDialog(playerid, DIALOG_TWO, ...);

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_ONE:
        {
            //What do you want to do for dialog one?
        }
        case DIALOG_TWO:
        {
             //...and for dialog two?
        }
    }
    return 1;
}
I hope you get the idea.

Ash
Reply
#4

Thanks funky,but I also need something else. How can I get the different input texts from the different input dialogs?
Reply
#5

Quote:
Originally Posted by Matthewaj
Посмотреть сообщение
Thanks funky,but I also need something else. How can I get the different input texts from the different input dialogs?
Because you can't show more than one dialog at a time, you'd have to "queue" them. For example: (Sorry, I'm very script based when it comes to examples).

pawn Код:
#define DIALOG_ONE      (0001)
#define DIALOG_TWO      (0002)
#define DIALOG_THREE    (0003)

ShowPlayerDialog(playerid, DIALOG_ONE, ...);

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_ONE:
        {
            //Handle all your stuff for DIALOG_ONE
            ShowPlayerDialog(playerid, DIALOG_TWO, ...);
        }
        case DIALOG_TWO:
        {
            //Handle all your stuff for DIALOG_TWO
            ShowPlayerDialog(playerid, DIALOG_THREE, ...);
        }
        case DIALOG_THREE:
        {
            //Handle all your stuff for DIALOG_THREE
            //and so and on
        }
    }
    return 1;
}
Reply
#6

No, I didn't mean that, I didn't explain well enough.

Код:

new String[150]

format(string, sizeof(string), "You entered %s", inputtext);
I mean the inputtext like the one above.
^
Will having multiple dialogs with the DIALOG_STYLE_INPUT what will I have to do to stop the inputtext from interfering with each other
Reply
#7

Quote:
Originally Posted by Matthewaj
Посмотреть сообщение
No, I didn't mean that, I didn't explain well enough.

Код:

new String[150]

format(string, sizeof(string), "You entered %s", inputtext);
I mean the inputtext like the one above.
^
Will having multiple dialogs with the DIALOG_STYLE_INPUT what will I have to do to stop the inputtext from interfering with each other
The callback is called separately based on the dialogid, so they'll never collide.
Reply
#8

Thanks, repped
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)