SA-MP Forums Archive
TextDraw Problem - 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: TextDraw Problem (/showthread.php?tid=597930)



TextDraw Problem - Wex56 - 06.01.2016

So i use textdrawsetstring to change textdraw text and text that i changed is bigger, positioned on the middle of the screen.IDK what have i done wrong here is code
Код:
NoviLoginTD6 = TextDrawCreate(100.000000, 240.333343, "Name Lastname");
	TextDrawLetterSize(NoviLoginTD6, 0.449999, 1.600000);
	TextDrawAlignment(NoviLoginTD6, 2);
	TextDrawColor(NoviLoginTD6, -1);
	TextDrawSetShadow(NoviLoginTD6, 0);
	TextDrawSetOutline(NoviLoginTD6, 1);
	TextDrawBackgroundColor(NoviLoginTD6, 51);
	TextDrawFont(NoviLoginTD6, 2);
	TextDrawSetProportional(NoviLoginTD6, 1);

//And here is code to change string

format(stringg, 128, "%s", hhIme);
				TextDrawSetString(NoviLoginTD6, stringg);
				TextDrawShowForPlayer(playerid, NoviLoginTD6);



Re: TextDraw Problem - Lucky13 - 06.01.2016

Try this:

Код:
format(stringg, 30, "%s", hhIme);
128 is too big for Firstname_Lastname.

Also, have you used TextDrawHideForPlayer BEFORE using TextDrawSetString?


Re: TextDraw Problem - Wex56 - 06.01.2016

I haven't used it beacuse I'am not showing it before.But I'll try that and to lower string


Re: TextDraw Problem - justinnater - 06.01.2016

Wait what is the problem you are having? if its in the wrong positon change the aligment.


Re: TextDraw Problem - Vince - 06.01.2016

Quote:
PHP код:
format(stringg128"%s"hhIme);
TextDrawSetString(NoviLoginTD6stringg); 
Completely redundant;
PHP код:
TextDrawSetString(NoviLoginTD6hhIme); 
Also do not use format to copy string. Look up strcpy.

TextDrawSetString does not alter the appearance of the textdraw. It is also the only textdraw function that is exempt from the "hide-and-reshow" rule. Changes are in effect immediately.