Quote:
Originally Posted by TwinkiDaBoss
So im just wondering, Im preety new into the game with all of this object material , Ive read few threads and such, but im trying to do is quite simple, turn the object entirely yellow but seems like Im doing something wrong, its somewhat dark
PHP код:
TestColor = CreateDynamicObject(19464, 3136.74316, -1090.61914, 16.68518, 0.00000, 0.00000, 0.00000);
SetDynamicObjectMaterial(TestColor,0,18018, "genintintbarb", "CJ_Black_metal",0xFFFFFF00);
|
That will make a wall object with black metal texture, doesn't matter what color you chose, it will be black (yellow-black) since the origin texture is black.
Quote:
Originally Posted by Denying
The format here is ARGB, not RGBA, which means the 00 should come first, that should make it much much less visible, or bright if you wish, I assume. Though.. try not using 00, try something a bit higher.
And also.. I'm pretty sure what you're using is white, not yellow. The color.
|
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 SickAttack
A yellow keypad close to the coordinates 0.0, 0.0, 0.0.
pawn Код:
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, "Ariel", 0, 0, 0xFF0000FF, (0xFFF000FF >>> 8 | 0xFFF000FF << 24), OBJECT_MATERIAL_TEXT_ALIGN_CENTER);
|
You meant with 0.0 rotation values, also that's material text, and font name is Arial.
However i'm not sure why need to convert it when it's coded directly... I don't think moving the last two alpha value is a hard job. Except you are lazy or will get confused, then using macros like _Zume said will do it.
Anyway if you want to make the wall with yellow color but texture stay same, then use this:
PHP код:
SetDynamicObjectMaterial(TestColor,0,-1, "none", "none",0xFFFFFF00);
Note that since the original texture is gray colored, then it will have a yellow-gray color.
If you want to make the wall texture with plain yellow color, then use this:
PHP код:
SetDynamicObjectMaterial(TestColor,0,18646, "MatColours", "yellow",0);
Or "brighter" yellow (with vertex lightning disabled):
PHP код:
SetDynamicObjectMaterial(TestColor,0,18646, "MatColours", "yellow",0xFFFFFFFF);
That texture is a plain yellow color, can be found in SAMP IMG, object id 18646 is the police light which is using MatColours texture.
There is also a plain white color texture, so you can color it with any color you like, just change the 0xFFFFFF00 (yellow).
PHP код:
SetDynamicObjectMaterial(TestColor,0,18646, "MatColours", "white",0xFFFFFF00);
Hope that helps.