SA-MP Forums Archive
Object Materials - 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: Object Materials (/showthread.php?tid=617789)



Object Materials - 963852741 - 26.09.2016

I am building a furniture system with the option to change the object's material. Lets say I change the material for a specific object(through a command), and then I want another option to remove the material and make the object come back with its default material. How can I do that?


Re: Object Materials - Alpha000 - 26.09.2016

I dont get your question...explain it pls?


Re: Object Materials - 963852741 - 26.09.2016

Quote:
Originally Posted by Alpha000
Посмотреть сообщение
I dont get your question...explain it pls?
I am building a furniture system with the option to change the object's material. Lets say I change the material for a specific object(through a command), and then I want another option to remove the material and make the object come back with its default material. How can I do that?


Re: Object Materials - Alpha000 - 26.09.2016

Oh i get it now.....

In your objectinfo enum type "defaultmaterial"..
Inside your command with which you make an object do
objectinfo[objectid][defaultmaterial] = material(this will be the objectid that u are giving in command to make object like e.g\makeobj[id][material]) after this make a command like /resetobj [id]
{
\\ here make command like createdynamicobject and for object material use objectinfo[objectid][defaultmaterial] and use x y z coordinates u used while making object they must be like objectinfo[objectid][OposX] and same for y z and rotations
}


Re: Object Materials - Threshold - 26.09.2016

Or I guess you could also re-create the object. That works too.


Re: Object Materials - Alpha000 - 26.09.2016

That would work too also read my code again i have fixed it...