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=387201)
SetObjectMaterial -
Roel - 23.10.2012
Hello, I have a question about this.
I do what wiki says but it just won't work.
pawn Код:
new myobject;
myobject = CreateObject(18754, -208.84, 3029.57, 10.36, 0.00, 0.00, 0.00);
SetObjectMaterial(myobject, 0, 4867,"grassybit_sfw", "Grass_128HV", 0);
4867 is a object that includes the Grass_128HV textture.
grassybit_sfw is txd file that includes the Grass_128HV texture.
the grassybit_sfw is located inside gta3.img which should really matter if it does then this functions is worthless.
Re: SetObjectMaterial -
Vince - 23.10.2012
What exactly is your issue? I can't quite make it up from your post. If the texture is not showing then make sure that you have set the right material index.
Re: SetObjectMaterial -
Roel - 23.10.2012
Well I looked into the object data with samp map editor, it everything should be fine, but it's not working...
I doesn't show up anything. And if I use the txd path/names of the example in wiki, it does work.
So the fault is there, but i don't understand why because there is nothing wrong.
If I open my GTA3.img and search the name of this txd, and look into it, it shows the texture with the same name i uses...
So I'm confised...