SA-MP Forums Archive
How to get name for textdraw ? - 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: How to get name for textdraw ? (/showthread.php?tid=556666)



How to get name for textdraw ? - FloxX - 11.01.2015

this is my textdraw code
Код:
new Text:Textdraw2;
Textdraw2 = TextDrawCreate(552.854858, 123.083374, "Nickname = vansessbro");
TextDrawLetterSize(Textdraw2, 0.178725, 1.529998);
TextDrawAlignment(Textdraw2, 2);
TextDrawColor(Textdraw2, 255);
TextDrawSetShadow(Textdraw2, 0);
TextDrawSetOutline(Textdraw2, 1);
TextDrawBackgroundColor(Textdraw2, -65281);
TextDrawFont(Textdraw2, 2);
TextDrawSetProportional(Textdraw2, 1);



Re: How to get name for textdraw ? - DavidBilla - 11.01.2015

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


Re: How to get name for textdraw ? - Guest4390857394857 - 11.01.2015

pawn Код:
new Text:Textdraw2;
Textdraw2 is whatever you have defined as textdraw. Therefore Textdraw2 is the name of the particular textdraw. To display it use...
pawn Код:
TextDrawShowForPlayer(playerid, Textdraw2);
And similarly use other functions too ..


Re: How to get name for textdraw ? - FloxX - 11.01.2015

yeah i know that. but i want my Textdraw. like this . Nickname: <<< your name . this textdraw get your name


Re: How to get name for textdraw ? - Sawalha - 11.01.2015

use format:
pawn Код:
new tdstr[50], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 24);
format(tdstr, sizeof tdstr, "Nickname = %s", name);
TextDrawSetString(Textdraw2, tdstr);
and show it onplayerconnect as an example.