Texture doesnt load in object - 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 doesnt load in object (
/showthread.php?tid=658390)
Texture doesnt load in object -
TwoSimsLight - 03.09.2018
I want make some los santos terrain be snow, so i texture it.
I dont know whats the problem, but only load the object, not the texture
code:
PHP код:
CreateDynamicObject(13147, 1945.10156, -325.26563, 29.92656, 356.85840, 0.00000, 3.14159);
SetObjectMaterial(13147, 0, 3902, "libertyhi3", "mp_snow", 0xFFFFFFFF);
Re: Texture doesnt load in object -
Shinja - 03.09.2018
You are not using SetObjectMaterial correctly
Код:
SetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor)
objectid is
NOT modelid
And, as you are using CreateDynamicObject, you must use SetDynamicObjectMaterial
PHP код:
new obj = CreateDynamicObject(13147, 1945.10156, -325.26563, 29.92656, 356.85840, 0.00000, 3.14159);
SetDynamicObjectMaterial(obj, 0, 3902, "libertyhi3", "mp_snow", 0xFFFFFFFF);