SA-MP Forums

Go Back   SA-MP Forums > SA-MP DL Edition > SA-MP 0.3.DL

 
 
Thread Tools Display Modes
Old 01/05/2019, 09:30 PM   #1
ATomas
Huge Clucker
 
Join Date: Jul 2009
Location: Czech Republic
Posts: 277
Reputation: 20
Default 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.
ATomas is offline  
Old 01/05/2019, 09:36 PM   #2
dugi
Beta Tester
 
Join Date: Jun 2007
Location: Poland
Posts: 2,306
Reputation: 841
Default Re: SetObjectMaterial custom texture

SetObjectMaterial doesn't work with custom models.
dugi is offline  
Old 02/05/2019, 04:23 PM   #3
EstoniaNMaN
Little Clucker
 
Join Date: Aug 2014
Location: SA-MP discord
Posts: 25
Reputation: 5
Default Re: SetObjectMaterial custom texture

Quote:
Originally Posted by dugi View Post
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.
EstoniaNMaN is offline  
Old 02/05/2019, 11:07 PM   #4
Garr
Big Clucker
 
Join Date: Feb 2014
Posts: 51
Reputation: 29
Default Re: SetObjectMaterial custom texture

You can't use SetObjectMaterial with custom textures. You can use R* txds on custom objects though.
Garr is offline  
Old 06/05/2019, 02:30 AM   #5
Kalcor
SA-MP Developer
 
Join Date: Apr 2005
Posts: 1,178
Reputation: 2859
Default 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.
Kalcor is offline  
Old 06/05/2019, 01:07 PM   #6
ATomas
Huge Clucker
 
Join Date: Jul 2009
Location: Czech Republic
Posts: 277
Reputation: 20
Default Re: SetObjectMaterial custom texture

Quote:
Originally Posted by Kalcor View Post
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
ATomas is offline  
Old 07/05/2019, 12:31 AM   #7
raydx
Huge Clucker
 
raydx's Avatar
 
Join Date: Feb 2017
Posts: 205
Reputation: 73
Default Re: SetObjectMaterial custom texture

Quote:
Originally Posted by ATomas View Post
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.
raydx is offline  
Old 07/05/2019, 12:36 PM   #8
ATomas
Huge Clucker
 
Join Date: Jul 2009
Location: Czech Republic
Posts: 277
Reputation: 20
Default Re: SetObjectMaterial custom texture

Quote:
Originally Posted by raydx View Post
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.
ATomas is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SetObjectMaterial default texture. Banditukas Scripting Help 2 16/02/2015 10:24 PM
Transparent texture for SetObjectMaterial sim_sima Scripting Help 2 04/01/2014 01:26 AM
Invisible Texture bugs in interior (SetObjectMaterial) Basssiiie Bug Reports 6 28/07/2013 12:40 PM
[BUG] SetObjectMaterial - Texture Issues? corne Scripting Help 4 09/04/2012 03:30 PM


All times are GMT. The time now is 06:03 AM.


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