SA-MP Forums Archive
Dialog 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 Question. (/showthread.php?tid=333465)



Dialog Question. - ...: 1 :... - 11.04.2012

How would you show someone's name in a dialog, for example.

I want to make a command where you do /hits, and it shows a dialog with the player's name.
All I need to know is how you can get a name.


Re: Dialog Question. - Jonny5 - 11.04.2012

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

use that to get the name and just put the var you stored the name in
into the dialog Title.


Re: Dialog Question. - ...: 1 :... - 11.04.2012

What, so, you could do
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Wanted List:", "%s\n%\n%s", GetName(i), "Okay", "Cancel");



Re: Dialog Question. - TzAkS. - 11.04.2012

Quote:
Originally Posted by ...: 1 :...
Посмотреть сообщение
What, so, you could do
pawn Код:
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Wanted List:", "%s\n%\n%s", GetName(i), "Okay", "Cancel");
No,
pawn Код:
new string[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(string,sizeof(string), "%s\n%\n%s", name);//but here you need to continue with variables from wanted
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Wanted List:",string, "Okay", "Cancel");