barankaplan05 Posted May 27, 2018 Posted May 27, 2018 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.
Dimos7 Posted May 27, 2018 Posted May 27, 2018 I think for paintjob you need shader i am no 100 precent sure
itHyperoX Posted May 27, 2018 Posted May 27, 2018 https://community.multitheftauto.com/index.php?p=resources&s=details&id=12699
barankaplan05 Posted May 27, 2018 Author Posted May 27, 2018 I said replacing, not adding. I wanna replace the existing paintjobs.
Moderators IIYAMA Posted May 28, 2018 Moderators Posted May 28, 2018 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" />
MIKI785 Posted May 28, 2018 Posted May 28, 2018 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. 1
barankaplan05 Posted May 28, 2018 Author Posted May 28, 2018 I don't know how to make a shader. Can you explain me how to do that?
Dimos7 Posted May 28, 2018 Posted May 28, 2018 dxCreateShader dxCreateTexture Those function you need
TheBakkeseKing Posted January 24, 2019 Posted January 24, 2019 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.
DNL291 Posted January 24, 2019 Posted January 24, 2019 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now