SA-MP Forums

SA-MP Forums (https://forum.sa-mp.com/index.php)
-   SA-MP 0.3.DL (https://forum.sa-mp.com/forumdisplay.php?f=90)
-   -   SetObjectMaterial custom texture (https://forum.sa-mp.com/showthread.php?t=666247)

ATomas 01/05/2019 08:30 PM

SetObjectMaterial custom texture
 
Hello,
how to set custom texture to existing object?

I try sometring like:
Code:

new objectid = CreateObject(-2400,...
SetObjectMaterial(objectid,0,-2400,"my_txd_in_models_without_.txd","mdl-2400:mytexture");

but not work (nothing happened).

Thanks for help.

dugi 01/05/2019 08:36 PM

Re: SetObjectMaterial custom texture
 
SetObjectMaterial doesn't work with custom models.

EstoniaNMaN 02/05/2019 03:23 PM

Re: SetObjectMaterial custom texture
 
Quote:

Originally Posted by dugi (Post 4097270)
SetObjectMaterial doesn't work with custom models.

Pardon me, I have used Texture Studio in 0.3-DL on custom objects and it did work for me. They can be textured, regardless being custom.

I don't know how to write it in script, so I'm sorry I can't help with that.

Garr 02/05/2019 10:07 PM

Re: SetObjectMaterial custom texture
 
You can't use SetObjectMaterial with custom textures. You can use R* txds on custom objects though.

Kalcor 06/05/2019 01:30 AM

Re: SetObjectMaterial custom texture
 
The reason SetObjectMaterial was added was because SA-MP had no custom texture support. You can supply any texture you want now.

ATomas 06/05/2019 12:07 PM

Re: SetObjectMaterial custom texture
 
Quote:

Originally Posted by Kalcor (Post 4097760)
The reason SetObjectMaterial was added was because SA-MP had no custom texture support. You can supply any texture you want now.

Yes, I understand it. But I want to save some dff model (so you don't need to download as much MB). I have an airship object and 20 different textures. The player can own an airship and adjust the look. Now he has to download a 20 dff models. If SetObjectMaterial worked, it would be enough to download 1 dff model and set it texture. Save download time.

http://www.img.tpx.cz/uploads/asgasdgsag.png
http://www.img.tpx.cz/uploads/asggsdg.png
http://www.img.tpx.cz/uploads/sdfgsdgsdf.png

raydx 06/05/2019 11:31 PM

Re: SetObjectMaterial custom texture
 
Quote:

Originally Posted by ATomas (Post 4097813)
Now he has to download a 20 dff models.

Actually you can make it with 1 dff model and 20 separate textures, but still - setobjectmaterial support will be great.

ATomas 07/05/2019 11:36 AM

Re: SetObjectMaterial custom texture
 
Quote:

Originally Posted by raydx (Post 4097924)
Actually you can make it with 1 dff model and 20 separate textures, but still - setobjectmaterial support will be great.

Yes, I can. But in this case, the airship has 6 textures, so I would have to download 20 .txd models (the skin name would have to be the same in every txd file). So it is not good solution.


All times are GMT. The time now is 08:54 AM.

Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.