SA-MP Forums Archive
Texture/materials help. - 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: Texture/materials help. (/showthread.php?tid=565158)



Texture/materials help. - Tuntun - 25.02.2015

It should be like this?:

Код:
SetObjectMaterial(CreateObject(6962, 2116.45801, -1912.28955, 18.98432,   0.00000, 0.00000, 0.00000, 0, 18202, "w_towncs_t", "plaintarmac1", 0xFFFFFFFF);



Re: Texture/materials help. - CalvinC - 25.02.2015

Create a global variable:
pawn Код:
new objectid;
And where you want to create the object, and set it's material, declare that variable as the CreateObject code, and use that instead.
pawn Код:
objectid = CreateObject( ... );
SetObjectMaterial(objectid, ... );
Explained in the wiki aswell:
https://sampwiki.blast.hk/wiki/SetObjectMaterial