Mapping assistance. - 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: Mapping assistance. (
/showthread.php?tid=634537)
Mapping assistance. -
schoolboy - 20.05.2017
So i've been told the MTA map editor can change the texture of objects? is that true if so how to do it?
Also i've went into my script after mapping with samp editor and would like to change the texture but no idea how i've tried this code but nothing happens when i join the localhost I have. The objects I want changed doesn't actually change so yea help please.
SetObjectMaterial(1408, 0, 0, "sfn_byofficeint", "CJ_LIGHTWOOD", 0xFFFFFFFF);
Re: Mapping assistance. -
Saddin - 21.05.2017
https://sampwiki.blast.hk/wiki/SetObjectMaterial
One example:
PHP код:
myobject = CreateObject(19371, X, Y, Z+0.5, 0.0, 0.0, 0.0, 300.0);
SetObjectMaterial(myobject, materialindex, modelid, txdname[], texturename[], materialcolor);
Second example:
PHP код:
SetObjectMaterial(CreateObject(19371, X, Y, Z+0.5, 0.0, 0.0, 0.0, 300.0), materialindex, modelid, txdname[], texturename[], materialcolor);
As first param "objectid" you can't use ID of object just, it is meant for created object ID (createobject...).