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=340546)



SetObjectMaterial - SpankMe2 - 07.05.2012

SetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor)

How can I find the Model ID, I find a object this is on place the ID here and it doesnt work any solutions?


Re: SetObjectMaterial - HDFord - 07.05.2012

you need to make the object and giv it a ID
pawn Код:
exampleobject == CreateObject(objectid,x,y,z,rot,viewdistance);
then you need to use that ID instead of using the number objectid
pawn Код:
SetObjectMaterial(exampleobject,materialindex,modelid,txdname[],texturename[],materialcolor);
you need to make a spesific objectid for each object you create.

This should have been placed in 0.3e scripting, just a few people here script on 0.3e.