PDA

View Full Version : [Question]Texdraws and GetPlayerName


Beastlynoob
02/08/2012, 09:46 PM
I was wondering if their is a way to get a textdraw to show a player his name,i tried doing something similar to the sendclientmessage way but the textdraw just says %s

NeverKnow
02/08/2012, 11:33 PM
new string[100], PlayerName[MAX_PLAYER_NAME];

GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s", PlayerName);
TextDrawSetString(TextDraw, string);
TextDrawShowForAll(TextDraw);

Vince
03/08/2012, 12:02 AM
new string[100], PlayerName[MAX_PLAYER_NAME];

GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s", PlayerName);
TextDrawSetString(TextDraw, string);
TextDrawShowForAll(TextDraw);

Why do you need two strings if you only need to display a single one in its whole?

new PlayerName[MAX_PLAYER_NAME];

GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
TextDrawSetString(TextDraw, PlayerName);
TextDrawShowForAll(TextDraw);

Beastlynoob
03/08/2012, 12:03 AM
thnx bro ;D