FantaItaly Posted April 29, 2018 Share Posted April 29, 2018 Hi guys, is possible replacing CJ dff's files? i've tried sometimes, but the most of times i crashed from my server! Link to comment
~Hades~ Posted April 30, 2018 Share Posted April 30, 2018 (edited) The only way to replace CJ is with shaders. Example; Client.lua addCommandHandler("change", function() triggerServerEvent( "Clothes", localPlayer) local shader1 = dxCreateShader( "shader.fx", 0, 0, false, "ped" ) local torso = dxCreateTexture ( "WhiteCJ/torso.png" )--path of torso.png engineApplyShaderToWorldTexture ( shader1, "cj_ped_torso", localPlayer, true )--body part of cj(torso) dxSetShaderValue ( shader1, "gTexture", torso ) local shader2 = dxCreateShader( "shader.fx", 0, 0, false, "ped" ) local face = dxCreateTexture ( "WhiteCJ/face.png" )--path of face.png engineApplyShaderToWorldTexture ( shader2, "cj_ped_head", localPlayer, true )--body part of cj(head) dxSetShaderValue ( shader2, "gTexture", face ) local shader3 = dxCreateShader( "shader.fx", 0, 0, false, "ped" ) local legs = dxCreateTexture ( "WhiteCJ/legs.png" )--path of legs.png engineApplyShaderToWorldTexture ( shader3, "cj_ped_legs", localPlayer, true )--body part of cj(legs) dxSetShaderValue ( shader3, "gTexture", legs ) local shader4 = dxCreateShader( "shader.fx", 0, 0, false, "ped" ) local foot = dxCreateTexture ( "WhiteCJ/foot.png" ) engineApplyShaderToWorldTexture ( shader4, "cj_ped_feet", localPlayer, true ) dxSetShaderValue ( shader4, "gTexture", foot ) end) shader.fx texture gTexture; technique replace { pass P0 { Texture[0] = gTexture; } } The only error that you have is that if you have clothes that are also equipped you will change the texture, it is something that I have not been able to solve. But if that is the code to replace CJ. This script helps you to know the name of the shaders in the game, so you can change them. https://nightly.multitheftauto.com/files/shaders/shader_tex_names.zip Edited April 30, 2018 by ~Hades~ Link to comment
JustinMTA Posted May 1, 2018 Share Posted May 1, 2018 It requires basic 3D modeling and shader skills. 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