SA-MP Forums Archive
Dialog listitem question. - 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: Dialog listitem question. (/showthread.php?tid=377549)



Dialog listitem question. - fordawinzz - 14.09.2012

Hello, I'm trying to make an offline faction uninvite system and I'm having a little problem with this. When I show the player names into the dialog it will show up as a listitem. How to check what player I uninvite when I click on it?


Re: Dialog listitem question. - arvifilter - 14.09.2012

As you are using the list type and you have two buttons, you can use one as invite and other as un invite
so use if(!response) and if(response) ans use then list item ids under it.
-----
I hope it helped


Re: Dialog listitem question. - Silvarray - 14.09.2012

So, each player name is on a listitem? If your dialog type is DIALOG_STYLE_LIST (which I suppose it is, of course), then inputtext[] should return the text of the list item. You could parse that through a loop and see if the player's name matches the inputtext, and then uninvite him.
There might be a more efficient way to do this, though.


Re: Dialog listitem question. - fordawinzz - 14.09.2012

Thank you , silvarray !


Re: Dialog listitem question. - Silvarray - 14.09.2012

You're welcome! Tell me if you have any errors with this method.