Recommended Posts

Anyone can explain me how to replace paintjobs?
I wrote this script and it's not working :(
 

function replacepaintjob() 
 paintjob1 = engineLoadTXD ( "elegy1.txd" ) 
engineImportTXD (paintjob1, [562]={0})
 paintjob2 = engineLoadTXD ( "elegy2.txd" ) 
engineImportTXD (paintjob2, [562]={1})
 paintjob3 = engineLoadTXD ( "elegy3.txd" ) 
engineImportTXD (paintjob3, [562]={2})
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replacepaintjob)
 
addCommandHandler ( "reloadmodel", replacepaintjob )

And please explain me how to use paintjob IDs in MTA Wiki Paintjob.

Share this post


Link to post

I think for paintjob you need shader i am no 100 precent sure 

Share this post


Link to post
function replacepaintjob() 
	local paintjob1 = engineLoadTXD ( "elegy1.txd" ) 
	engineImportTXD (paintjob1, 562)
  
	local paintjob2 = engineLoadTXD ( "elegy2.txd" ) 
	engineImportTXD (paintjob2, 562)
  
	local paintjob3 = engineLoadTXD ( "elegy3.txd" ) 
	engineImportTXD (paintjob3, 562)
end

I haven't replaced paintjobs myself, but this will solve some syntax errors in your code.

 

And make sure that all 3 files are written down in the meta.xml:

https://wiki.multitheftauto.com/wiki/Meta.xml

 

<file src="elegy1.txd" />
<file src="elegy2.txd" />
<file src="elegy3.txd" />

 

Share this post


Link to post

You can't use engineImportTXD as this function takes a model ID as an argument and paintjobs are not models. You have to use a shader to replace paintjob textures.

  • Thanks 1

Share this post


Link to post

I would like to learn how to make the script to add Paintjobs custom.

On 28/05/2018 at 11:45, MIKI785 said:

You can't use engineImportTXD as this function takes a model ID as an argument and paintjobs are not models. You have to use a shader to replace paintjob textures.

 

Share this post


Link to post
On 28/05/2018 at 10:10, barankaplan05 said:

I don't know how to make a shader. Can you explain me how to do that?

The link that @TheMOG posted has the shader you'll need.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.