SetObjectMaterial
#1

So, I've seen many tutorials about how to edit object's texture but there isn't (probably) any that actually showed how to change object's color.

So, basically this is the format...

SetObjectMaterial (objectid, materialindex, modelid, txdname[], texturename[], materialcolor);


Considering that I need to change the color only, excluding everything else. Should my code look something like this?

Код:
new myobject;
myobject = CreateObject (5819, X, Y, Z, ...);
SetObjectMaterial (myobject, 0, 5819, 0xFFAD00FC);
myobject - object itself
0 - idk
5819 - the same as myobject because i don't want the texture to be changed...
0xFFAD00FC - ARGB color code FF- A, AD=R, AD=G, FC=B
Reply
#2

It should look like this

Код:
    new EXAMPLE = CreateDynamicObject(4238, 1535.8951, -1672.2250, 12.4137, -120.3999, -96.3000, 174.4733);
    SetDynamicObjectMaterialText(EXAMPLE, 0,"TXT", 130, "Arial", 32, 1, -1, 0, 1);
You can set whatever font you want in the "Arial" place
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)