Possible to use multiple DIALOG_STYLE_INPUT -
Matthewaj - 13.04.2012
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
Re: Possible to use multiple DIALOG_STYLE_INPUT -
ReneG - 13.04.2012
Only one may be displayed, but once that one is finished you could show the next one.
Re: Possible to use multiple DIALOG_STYLE_INPUT -
Ash. - 13.04.2012
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
Re: Possible to use multiple DIALOG_STYLE_INPUT -
Matthewaj - 13.04.2012
Thanks funky,but I also need something else. How can I get the different input texts from the different input dialogs?
Re: Possible to use multiple DIALOG_STYLE_INPUT -
Ash. - 13.04.2012
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;
}
Re: Possible to use multiple DIALOG_STYLE_INPUT -
Matthewaj - 13.04.2012
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
Re: Possible to use multiple DIALOG_STYLE_INPUT -
Ash. - 13.04.2012
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.
Re: Possible to use multiple DIALOG_STYLE_INPUT -
Matthewaj - 13.04.2012
Thanks, repped