SA-MP Forums Archive
Getting name from dialog - 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: Getting name from dialog (/showthread.php?tid=661504)



Getting name from dialog - NoteND - 06.12.2018

Hey!

Currently working on textdraw based report system.

Thats pastebin on how I made dialog: https://pastebin.com/2YGvhAPj

and then under OnDialogResponse I got this: https://pastebin.com/zRna6GdT

But it does not get the player's name that is selected. Might be dumb mistake but how to fix it.. also am I displaying dialog good in first place since im only one in server it shows my name but im not sure if its gonna show others =)

Ty for help


Re: Getting name from dialog - Doddinger - 06.12.2018

new selectedplayer[MAX_PLAYER_NAME];

Shouldn't that be globally declared?

Where's the sense if you're using it only in OnDialogResponse?
The player will response, and the array is right away after he closed the dialog.


Re: Getting name from dialog - Rolux - 06.12.2018

Change "listitem" to "inputtext" in the format function.


Re: Getting name from dialog - NoteND - 06.12.2018

as you can see I got "//" infront so im not using it =)


Re: Getting name from dialog - Doddinger - 06.12.2018

Also read firstly please the wiki:

https://sampwiki.blast.hk/wiki/OnDialogResponse

Getting the name is pretty easy if you'd just care about the documentation.


Re: Getting name from dialog - NoteND - 06.12.2018

Lmao.. I literally cant think today.. ty tho


Re: Getting name from dialog - Doddinger - 06.12.2018

Quote:
Originally Posted by NoteND
Посмотреть сообщение
as you can see I got "//" infront so im not using it =)
As you can see, I'm helping you so where's the problem? First learn basic functions. Beginning with FS would be probably better for you.

Otherwise I can only suggest you to read this really good information thread:

https://sampforum.blast.hk/showthread.php?tid=646264

His structure makes sense and helped me.