[Question]Texdraws and GetPlayerName
#1

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

new string[100], PlayerName[MAX_PLAYER_NAME];

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

Quote:
Originally Posted by NeverKnow
Посмотреть сообщение
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?

pawn Код:
new PlayerName[MAX_PLAYER_NAME];

GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
TextDrawSetString(TextDraw, PlayerName);
TextDrawShowForAll(TextDraw);
Reply
#4

thnx bro
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)