jdmark Posted April 16, 2013 Share Posted April 16, 2013 (edited) hello can someone help me i want to replace the paintjobs of somecars but i dont know how to start making that script can someone help me whit that grt jdmark Edited April 17, 2013 by Guest Link to comment
jdmark Posted April 16, 2013 Author Share Posted April 16, 2013 oke is that the first line of the script? or not Link to comment
iPrestege Posted April 16, 2013 Share Posted April 16, 2013 Hmm.. how u will make it with gui panel? Link to comment
Mega9 Posted April 16, 2013 Share Posted April 16, 2013 I believe he meant replace the textures, not set vehicle's paintjob. He also pmed me about vehicle rims and as I had no clue and never even worked with those I told him it's possible with shaders, and probably replacing some texture files. If anyone has any more informations about this, please help him. Link to comment
jdmark Posted April 17, 2013 Author Share Posted April 17, 2013 i made a lua script/meta.xml lua script textures = { "elegy3body256", "elegy2body256", "elegy1body256", "sultan2body256", "sultan3body256", "jester3body256", "uranus3body256", "faketurf_law", "des_crackeddirt1" } for k, v in ipairs (textures) do texture = dxCreateTexture ( ""..v..".png" ) shader, tec = dxCreateShader( "texreplace.fx" ) engineApplyShaderToWorldTexture ( shader, tostring(v) ) dxSetShaderValue ( shader, "gTexture", texture ) end --engineImportTXT(2691 meta.xml "Shader_paintjob" version="0.0.5" type="script" /> but it don't work can someone help me ? Link to comment
KenXeiko Posted April 17, 2013 Share Posted April 17, 2013 first, the paintjob textures are located at 'paintjobs' folder (as typed @ meta.xml) so it should be textures = { "elegy3body256", "elegy2body256", "elegy1body256", "sultan2body256", "sultan3body256", "jester3body256", "uranus3body256", "faketurf_law", "des_crackeddirt1" } for k, v in ipairs (textures) do texture = dxCreateTexture ( "paintjobs/"..v..".png" ) shader, tec = dxCreateShader( "texreplace.fx" ) engineApplyShaderToWorldTexture ( shader, tostring(v) ) dxSetShaderValue ( shader, "gTexture", texture ) end if i missed something on your code, pardon me, because i'm not in mood to check the whole code, lol Link to comment
jdmark Posted April 17, 2013 Author Share Posted April 17, 2013 i made a new script but the server still not see the resource addEventHandler('onClientResourceStart', resourceRoot, function replaceModel() dff = engineLoadDFF ( "wheel/wheel_gn1.dff", 1082) engineReplaceModel ( dff, 1082) dff = engineLoadDFF ( "wheel/wheel_gn2.dff", 1085) engineReplaceModel ( dff, 1085) dff = engineLoadDFF ( "wheel/wheel_gn3.dff", 1096) engineReplaceModel ( dff, 1096) dff = engineLoadDFF ( "wheel/wheel_gn4.dff", 1097) engineReplaceModel ( dff, 1097) dff = engineLoadDFF ( "wheel/wheel_gn5.dff", 1098) engineReplaceModel ( dff, 1098) dff = engineLoadDFF ( "wheel/wheel_lr1.dff", 1077) engineReplaceModel ( dff, 1077) dff = engineLoadDFF ( "wheel/wheel_lr2.dff", 1083) engineReplaceModel ( dff, 1083) dff = engineLoadDFF ( "wheel/wheel_lr3.dff", 1078) engineReplaceModel ( dff, 1078) dff = engineLoadDFF ( "wheel/wheel_lr4.dff", 1076) engineReplaceModel ( dff, 1076) dff = engineLoadDFF ( "wheel/wheel_lr5.dff", 1084) engineReplaceModel ( dff, 1084) dff = engineLoadDFF ( "wheel/wheel_or1.dff", 1025) engineReplaceModel ( dff, 1025) dff = engineLoadDFF ( "wheel/wheel_sr1.dff", 1079) engineReplaceModel ( dff, 1079) dff = engineLoadDFF ( "wheel/wheel_sr2.dff", 1075) engineReplaceModel ( dff, 1075) dff = engineLoadDFF ( "wheel/wheel_sr3.dff", 1074) engineReplaceModel ( dff, 1074) dff = engineLoadDFF ( "wheel/wheel_sr4.dff", 1081) engineReplaceModel ( dff, 1081) dff = engineLoadDFF ( "wheel/wheel_sr5.dff", 1080) engineReplaceModel ( dff, 1080) dff = engineLoadDFF ( "wheel/wheel_sr6.dff", 1073) engineReplaceModel ( dff, 1073) txd = engineLoadTXD ( "wheel/wheel_gn1.txd", 1082) engineImportTXD ( txd, 1082) txd = engineLoadTXD ( "wheel/wheel_gn2.txd", 1085) engineImportTXD ( txd, 1085) txd = engineLoadTXD ( "wheel/wheel_gn3.txd", 1096) engineImportTXD ( txd, 1096) txd = engineLoadTXD ( "wheel/wheel_gn4.txd", 1097) engineImportTXD ( txd, 1097) txd = engineLoadTXD ( "wheel/wheel_gn5.txd", 1098) engineImportTXDl ( txd, 1098) txd = engineLoadTXD ( "wheel/wheel_lr1.txd", 1077) engineImportTXD ( txd, 1077) txd = engineLoadTXD ( "wheel/wheel_lr2.txd", 1083) engineImportTXD ( txd, 1083) txd = engineLoadTXD ( "wheel/wheel_lr3.txd", 1078) engineImportTXD ( txd, 1078) txd = engineLoadTXD ( "wheel/wheel_lr4.txd", 1076) engineImportTXD ( txd, 1076) txd = engineLoadTXD ( "wheel/wheel_lr5.txd", 1084) engineImportTXD ( txd, 1084) txd = engineLoadTXD ( "wheel/wheel_or1.txd", 1025) engineImportTXD ( txd, 1025) txd = engineLoadTXD ( "wheel/wheel_sr1.txd", 1079) engineImportTXD ( txd, 1079) txd = engineLoadTXD ( "wheel/wheel_sr2.txd", 1075) engineImportTXD ( txd, 1075) txd = engineLoadTXD ( "wheel/wheel_sr3.txd", 1074) engineImportTXD ( txd, 1074) txd = engineLoadTXD( "wheel/wheel_sr4.txd", 1081) engineImportTXD ( txd, 1081) txd = engineLoadTXD( "wheel/wheel_sr5.txd", 1080) engineImportTXD ( txd, 1080) txd = engineLoadTXD ( "wheel/wheel_sr6.txd", 1073) engineImportTXD ( txd, 1073) endaddEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler ( "reloadwheel", replaceModel ) meta.xml "Fanatec Scripting Team" type="script" description="Wheels-system"/> can someone tell me how to fix it? Link to comment
nadeeja Posted April 17, 2013 Share Posted April 17, 2013 https://forum.multitheftauto.com/viewtopic.php?f=91&t=57204 I have exact same question as you do. As for the wheelpack; in meta you included "J2_wheels.txd" but didn't include it in the script.(Actually there is no texture called J2_wheels.txd to replace. So you can't load that txd file which can cause issues like white wheels due to lack of textures.) I guess there is actually no way you can replace wheels until mta allows us to edit veh_mods.ide located inside data folder. I don't think that anyone else ever managed to replace wheels. 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