Transparent object material
#4

No no, it's possible as i've stated in your previous thread:
Quote:
Originally Posted by RoboN1X
Посмотреть сообщение
He has done it properly... 0xFFFFFF00 is yellow, if 00 should come first as the alpha channel, it will make the object texture invisible, not bright. Minimum alpha value for object material color is 8D, therefore 0x8CFFFFFF will make it invisible for the game client.
Quote:
Originally Posted by RoboN1X
Посмотреть сообщение
Quote:
Originally Posted by SickAttack
Посмотреть сообщение
Or:
Код:
new object_id = CreateDynamicObject(2922, 133.76311, -75.74743, 1.13980, 0.00000, 0.00000, 0.00000);
SetDynamicObjectMaterialText(object_id, 0, " ", OBJECT_MATERIAL_SIZE_256x128, " ", 0, 0, 0, 0xFFFFF000);
Ofcourse i'm aware that will work, that's why i didn't mention "it will not work", but please note that you cannot have alpha value changed with object material text, i don't know why, but my method will work
It's just has limit that i know,
10 is lower than 8D, then it will be invisible. You can only set the transparency with alpha value from 8D to FF (That's just around 55% to 100% opacity). I don't know why, but probably the bug with the game. Also if you set alpha value to half or less transparent does not work for Object Material Text.

But if you get confused with hex code, here look:
Quote:

hex = decimal = visibility = invisibility
FF = 255 = 100% opacity = 0% transparent
...
8E = 142 = 55% opacity = 45% transparent
8D = 141 = 55% opacity = 45% transparent
8C = 140 = 54% opacity = 100% transparent
8B = 139 = 54% opacity = 100% transparent
...
11 = 17 = 6% opacity = 100% transparent
10 = 16 = 6% opacity = 100% transparent
0F = 15 = 5% opacity = 100% transparent
...
00 = 0 = 0% opacity = 100% transparent

So in conclusion, with the code i gave (that you have used), you can set the transparency value from 0% TO 45%. But with objectmaterialtext way, you can only set transparency value to 0% AND 100%.

Anyway, get some editor script that will be easier for you.
Texture studio: https://sampforum.blast.hk/showthread.php?tid=582490
Reply


Messages In This Thread
Transparent object material - by TwinkiDaBoss - 22.12.2015, 19:09
Re: Transparent object material - by prineside - 22.12.2015, 20:01
Re: Transparent object material - by TwinkiDaBoss - 22.12.2015, 20:08
Re: Transparent object material - by RoboN1X - 23.12.2015, 05:41
Re: Transparent object material - by TwinkiDaBoss - 23.12.2015, 13:18

Forum Jump:


Users browsing this thread: 2 Guest(s)