SA-MP Forums Archive
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(131471945.10156, -325.2656329.92656,   356.858400.000003.14159); 
         
SetObjectMaterial(1314703902"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(131471945.10156, -325.2656329.92656,   356.858400.000003.14159);  
SetDynamicObjectMaterial(obj03902"libertyhi3""mp_snow"0xFFFFFFFF);