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