SA-MP Forums Archive
SetObjectMaterial - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: SetObjectMaterial (/showthread.php?tid=594710)



SetObjectMaterial - Sanady - 22.11.2015

Hello guys, I have problem with SetObjectmaterial, When I set, color on objects stays like original. I don`t know why. I want just to get white object, white color of that object nothing else.

Код:
SetObjectMaterial(GangZone[i][FlagObject], 0, 0, "none", "none", 0xFFFFFFFF);



Re: SetObjectMaterial - Sanady - 22.11.2015

Quote:
Originally Posted by Karan007
Посмотреть сообщение
PHP код:
SetObjectMaterial(GangZone[i][FlagObject], 00"none""none", -1); 
Try this.
Now the flag is transparent, in other word I don`t see it.


Re: SetObjectMaterial - Sanady - 22.11.2015

Quote:
Originally Posted by Karan007
Посмотреть сообщение
Why you don't use createobject?
I create object first, with that function then I want to change object material.


Re: SetObjectMaterial - Vince - 22.11.2015

Changing color doesn't really work unless the object was white to begin with. You will get some sort of overlay effect. It's much the same like using the 'Multiply' blending mode in Photoshop, actually. Although I don't really know why that is. You can try using another white texture, but of course the original texture won't be preserved in that case.


Re: SetObjectMaterial - Sanady - 22.11.2015

Quote:
Originally Posted by Vince
Посмотреть сообщение
Changing color doesn't really work unless the object was white to begin with. You will get some sort of overlay effect. It's much the same like using the 'Multiply' blending mode in Photoshop, actually. Although I don't really know why that is. You can try using another white texture, but of course the original texture won't be preserved in that case.
So, in SA-MP it`s somekind impossible to change color of object without touching texture, right?


Re: SetObjectMaterial - Vince - 22.11.2015

It's possible, as I've done it before, but it really only works with white or otherwise light colored objects. You can always turn a color darker, but you can't turn it lighter.


Re: SetObjectMaterial - Sanady - 22.11.2015

Quote:
Originally Posted by Vince
Посмотреть сообщение
It's possible, as I've done it before, but it really only works with white or otherwise light colored objects. You can always turn a color darker, but you can't turn it lighter.
Aha, nice, do you know where should I look how to change the color then? I mean I have flag of USA object in SAMP it`s really light object. I wanted just to change flag to white. Nothing else.



That`s the object that I am using.


Re: SetObjectMaterial - Mussy - 01.11.2016

Hey, Um, can you give me the ID of the US / American Flag object please?