Textdraw transparency problem
#1

So i have 2 sprite textdraws named LD_SPAC:white, when I do SelectTextDraw(playerid, 0x00000000); and hover those textdraws, one completely ignores transparency, idk what's causing it... Textdraws are almost completely the same, only position differ:

Код:
log_gTD[11] = TextDrawCreate(255.299957, 114.783096, "LD_SPAC:white"); //working one
	TextDrawLetterSize(log_gTD[11], 0.000000, 0.000000);
	TextDrawTextSize(log_gTD[11], 127.399948, 24.200008);
	TextDrawAlignment(log_gTD[11], 1);
	TextDrawColor(log_gTD[11], 572662527);
	TextDrawSetShadow(log_gTD[11], 0);
	TextDrawSetOutline(log_gTD[11], 0);
	TextDrawBackgroundColor(log_gTD[11], 255);
	TextDrawFont(log_gTD[11], 4);
	TextDrawSetProportional(log_gTD[11], 0);
	TextDrawSetShadow(log_gTD[11], 0);
	TextDrawSetSelectable(log_gTD[11], true);

log_gTD[14] = TextDrawCreate(255.299957, 147.484085, "LD_SPAC:white"); //not working one
	TextDrawLetterSize(log_gTD[14], 0.000000, 0.000000);
	TextDrawTextSize(log_gTD[14], 127.399948, 24.200008);
	TextDrawAlignment(log_gTD[14], 1);
	TextDrawColor(log_gTD[14], 572662527);
	TextDrawSetShadow(log_gTD[14], 0);
	TextDrawSetOutline(log_gTD[14], 0);
	TextDrawBackgroundColor(log_gTD[14], 255);
	TextDrawFont(log_gTD[14], 4);
	TextDrawSetProportional(log_gTD[14], 0);
	TextDrawSetShadow(log_gTD[14], 0);
	TextDrawSetSelectable(log_gTD[14], true);
if i do SelectTextDraw(playerid, 0xFF000000); for ex. it turns into red, not black like before, it just ignores last two numbers and doesn't dissapear. Please help :/
Reply
#2

Not sure if this is the issue, but try changes the values to TextDrawTextSize for the textdraw that's not working. As far as I know, if both the values are the same, you will be selecting both textdraws at once.
Reply
#3

Quote:
Originally Posted by DTV
Посмотреть сообщение
Not sure if this is the issue, but try changes the values to TextDrawTextSize for the textdraw that's not working. As far as I know, if both the values are the same, you will be selecting both textdraws at once.
No that's not because selection, but I tried what you said anyways... Still same stuff. I tried deleting all other textdraws except those two... Now two of them are not working... But i have no other selectable textdraws except those 2 ones... Just magic

So i discovered that when this textdraw is enabled:

Код:
log_gTD[9] = TextDrawCreate(320.500000, 91.416664, "prisijungimas");
	TextDrawLetterSize(log_gTD[9], 0.375999, 1.535832);
	TextDrawAlignment(log_gTD[9], 2);
	TextDrawColor(log_gTD[9], -1145324545);
	TextDrawSetShadow(log_gTD[9], 0);
	TextDrawSetOutline(log_gTD[9], 0);
	TextDrawBackgroundColor(log_gTD[9], 255);
	TextDrawFont(log_gTD[9], 2);
	TextDrawSetProportional(log_gTD[9], 1);
	TextDrawSetShadow(log_gTD[9], 0);
That working box sprite dissapears perfectly... Magic
Reply
#4

Okay i fixed it... I found out that if I remove this line from text textdraw shown above this post:
Код:
TextDrawFont(log_gTD[9], 2);
My sprite textdraws will ignore transparency again... So I changed previous textdraw's font (behind not working one) to 2 and it doesn't ignore transparency... Intresting stuff... I found a way how to ignore transparency on SelectTextdraw function's color now xD
Код:
log_gTD[13] = TextDrawCreate(257.099945, 149.367828, "box");
	TextDrawLetterSize(log_gTD[13], 0.000000, 2.219999);
	TextDrawTextSize(log_gTD[13], 380.899932, 0.000000);
	TextDrawAlignment(log_gTD[13], 1);
	TextDrawColor(log_gTD[13], -1);
	TextDrawUseBox(log_gTD[13], 1);
	TextDrawBoxColor(log_gTD[13], 858993663);
	TextDrawSetShadow(log_gTD[13], 0);
	TextDrawSetOutline(log_gTD[13], 0);
	TextDrawBackgroundColor(log_gTD[13], 255);
	TextDrawFont(log_gTD[13], 2); // <-- Changed font to 2 from 1 on this textdraw and everything is working fine
	TextDrawSetProportional(log_gTD[13], 1);
	TextDrawSetShadow(log_gTD[13], 0);
Problem fixed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)