SA-MP Forums Archive
Is this Possible - 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: Is this Possible (/showthread.php?tid=313925)



Is this Possible - Buzzbomb - 27.01.2012

Is it Possible to get player name to show in dialog i seen it on a forum somewhere i cant remember where...

ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Welcome Back %s","Please login", "Login", "Leave",pname);


Re: Is this Possible - [ABK]Antonio - 27.01.2012

pawn Код:
new title[35];
format(title,sizeof(title), "Welcome Back %s", Name(playerid)); //using your own method for getting their name
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, title,"Please login", "Login", "Leave");



Re: Is this Possible - Buzzbomb - 27.01.2012

Thanks Antonio...


Re: Is this Possible - park4bmx - 27.01.2012

Above is a good example bu to be the name
pawn Код:
new title[5 + MAX_PLAYER_NAME];
format(title,sizeof(title), "Welcome Back %s", GetPlayerName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, title,"Please login", "Login", "Leave");
Consider formatting the players name


Re: Is this Possible - MP2 - 28.01.2012

"Welcome Back " is NOT 5 characters long.

It should be new title[14 + MAX_PLAYER_NAME];