OnDialogResponse. - 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: OnDialogResponse. (
/showthread.php?tid=303785)
OnDialogResponse. -
GamingTurf - 15.12.2011
I have a dialog list, and one of them is 'Next Page'.
Under OnDialogResponse, how could i make it so it would know it is selecting 'Next Page'?
I tried this.
if(inputtext == "Next Page")
{
//blabla.
}
Got an error.
So how could i do that?
-----------
And also, in the same list, i have these:
Username (earnt $0)
username (earnt $0)
username (earnt $0).
etc .. about 12 of them (These are loaded from mysql databases)
How could i make it onDialogResponse, it only tracks 'username', and not the space after it?
Thanks.
Re: OnDialogResponse. -
vassilis - 15.12.2011
firstly use [ pawn] [ /pawn] 2ndly i will help with your first problem
if it is DIALOG_STYLE_LIST or DIALOG_STYLE_MSGBOX
use this
pawn Код:
if(dialogid == DIALOGHERE)
{
if(response)
{
switch(listitem) //the player has press next page
{
ShowPlayerDialog(playerid,dialogid,DIALOG_STYLE_...,DIALOGNAME,etc);
}
}
}
hope i helped
Re: OnDialogResponse. -
GamingTurf - 15.12.2011
Quote:
Originally Posted by vassilis
firstly use [ pawn] [ /pawn] 2ndly i will help with your first problem
if it is DIALOG_STYLE_LIST or DIALOG_STYLE_MSGBOX
use this
pawn Код:
if(dialogid == DIALOGHERE) { if(response) { switch(listitem) //the player has press next page { ShowPlayerDialog(playerid,dialogid,DIALOG_STYLE_...,DIALOGNAME,etc); } } }
hope i helped
|
I've fixed it myself, thanks for helping, although that code would not work at all, since in the dialog, has 12 rows above 'next page'.
thanks though.
Re: OnDialogResponse. -
GamingTurf - 15.12.2011
Sorry, either you misread or i didn't type out what i needed.
It's dynamic, it's from mysql. I need to get the username from the row, so it can't be static (like the one you showed me.)
Thanks ..