Is this Possible
#1

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);
Reply
#2

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");
Reply
#3

Thanks Antonio...
Reply
#4

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
Reply
#5

"Welcome Back " is NOT 5 characters long.

It should be new title[14 + MAX_PLAYER_NAME];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)