TextDraw Problem
#1

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

Try this:

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

Also, have you used TextDrawHideForPlayer BEFORE using TextDrawSetString?
Reply
#3

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

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)