[Include] Set(Player)ObjectMaterial for RGBA Colors
#1

ObjectMaterial stuff for RGBA Colors
(Now updated for RC7)
Hey, this is just a simple Include to make the ObjectMaterial Funtcions work with RGBA colors like in client messages and everything else.


Note: There is one disadvantage: You can't use it in timers anymore but you can fiddle around like this:
pawn Код:
// ...

SetTimerEx("CallSetObjectMaterial", 10000, 0, "dddssd", ...);

// ...

forward CallSetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor);
public CallSetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor)
{
    return SetObjectMaterial(objectid, materialindex, modelid, txdname, texturename, materialcolor);
}
Get it and inlude it to get started!
Pastebin

EDIT (10th April 2012 - 22:02):
There was a huge mistake in the code that made the use of mixed colors (yellow, pink ...) impossible. After some headbreaking hours of thinking and help from from JaTochNietDan and ****** we three got a solution (straight from ****** ENJOY IT!)

Now it 100% works and it is awesome!

Credits:
****** (for the final solution)
JaTochNietDan (for some headbreaking hours and codes that were close to the solution)
Hiddos (for a hint for ARGB)

Reply
#2

Uhm, I'm on my phone currently, can't test..

but this means we can also use transparent textures?
Reply
#3

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
Uhm, I'm on my phone currently, can't test..

but this means we can also use transparent textures?
Well, if you would've read the object texture stuff you'd notice that the color format would be in ABGR, rather than RGBA. And this script allows you to use standard RGBA.
Reply
#4

I didn't test transparency but that should be possible
Reply
#5

Quote:
Originally Posted by Hiddos
Посмотреть сообщение
Well, if you would've read the object texture stuff you'd notice that the color format would be in ABGR, rather than RGBA. And this script allows you to use standard RGBA.
Quote:
Originally Posted by Meta
Посмотреть сообщение
I didn't test transparency but that should be possible
Read the wiki and I'll probably test these things tomorrow, Nice.
Reply
#6

wonderful job Meta
Reply
#7

Good job bro
Reply
#8

Pretty nice!! Good Job! Rep++.
Reply
#9

Now i got to know , what it does. Fucking awesome work mate! Thanks for sharing.

- BMiaa
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)