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