SA-MP Forums Archive
Get the listitem text - 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: Get the listitem text (/showthread.php?tid=486285)



Get the listitem text - Mattakil - 08.01.2014

I've been thinking about this for like 45 minutes and can't figure it out. What I want to do is have a variable define what the player can have in a dialog, I know how to do that. But the dialog would be formatted like id: name (for a free for all server). If the player is invited by the creator to that free for all round, it will appear in their dialog. But what I want to do is under OnDialogResponse to set the player's VW to the id, defined in the dialog. So what would have to happen is you somehow have to get the text of that dialog, then seperate out the ID. How can this be done?

PS: sorry if you can't understand me, I got no fucking clue how to properly word this :3


Re: Get the listitem text - InfiniTy. - 08.01.2014

You could use inputtext and split the id as you said.


Re: Get the listitem text - Scrillex - 08.01.2014

Umm you could just add some words and check by spelling.. That's just my idea if I got it right..


Re: Get the listitem text - Mattakil - 08.01.2014

But how do I get the inputtext from a list dialog to do that?


Re: Get the listitem text - Scrillex - 08.01.2014

umm under list add another dialog with listing.. So basically dialog under dialog.


Re: Get the listitem text - Mattakil - 08.01.2014

What? Lol.


Re: Get the listitem text - InfiniTy. - 08.01.2014

Quote:
Originally Posted by Mattakil
Посмотреть сообщение
But how do I get the inputtext from a list dialog to do that?
Well,when a user selects an item from the dialog,inputtext holds the text from that item..
So for example you have this dialog
listitem0 \n other stuff \n listitem2
and if you click "other stuff" then inputtext will be "other stuff"


Re: Get the listitem text - Mattakil - 08.01.2014

Oh, I didn't know that :P..I'll give it a try!


Re: Get the listitem text - Mattakil - 08.01.2014

That worked, thanks :3