Jump to content

How to replace paintjobs?


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.

Link to comment
  • Moderators
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" />

 

Link to comment
  • 7 months later...

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.
×
×
  • Create New...