Get Listitem Name
#1

Does anybody know how to get a Listitem name from a dialog and print it ?

ex.
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST,"Exapmle","Name 1\nName 2\nName 3","Print","Close");

print("Name 1");
Thanks.
Reply
#2

You can make ondialogresponce.
Код:
switch(dialogid)
{
    case 0:
    {
     //print name 1
    }
    case 1:
    {
     //print name 2
    }
    case 2:
    {
     //print name 3
    }
}
If i helped u rep me
Reply
#3

Thank you for reply but im reading data from a file and putting it into the dialog but now i need to get those names in the dialog to find other files. Just like in Zamaroth's TDE but his code isn't working in my GM
Reply
#4

You mean?
Reply
#5

Quote:
Originally Posted by fadhilkab
Посмотреть сообщение
You mean?
I dont get it to:P
I was thinking he was needed to send a print if someone clicked on an item in the menu.
Reply
#6

its like this ,

zamaroths textdraw editor is using a file where he stored project names and to load them he used a function to read text from listitem which the player has selected.
Reply
#7

inputtext is the listitem text.
Reply
#8

its exactly this https://sampforum.blast.hk/showthread.php?tid=241745
Reply
#9

need help ppl
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)