CobbTheWarriorsRPG Posted April 29, 2015 Posted April 29, 2015 Well i have a question... Its possible to change the .txd textures of the character cj? Thanks.
WhoAmI Posted April 29, 2015 Posted April 29, 2015 It is. engineApplyShaderToWorldTexture -> When replacing the texture for a ped using the CJ skin, set textureName to "CJ"-> CJ body parts textures can be replaced by using: "cj_ped_head", "cj_ped_torso", "cj_ped_legs", "cj_ped_feet" and maybe some other things like "cj_ped_necklace", "cj_ped_watch" etc. Latest version of shader_tex_names will show what is being used.
CobbTheWarriorsRPG Posted April 29, 2015 Author Posted April 29, 2015 It is. engineApplyShaderToWorldTexture -> When replacing the texture for a ped using the CJ skin, set textureName to "CJ"-> CJ body parts textures can be replaced by using: "cj_ped_head", "cj_ped_torso", "cj_ped_legs", "cj_ped_feet" and maybe some other things like "cj_ped_necklace", "cj_ped_watch" etc. Latest version of shader_tex_names will show what is being used. Hmm can you give me an example bro? i doesnt understand the example of the wiki
WhoAmI Posted April 29, 2015 Posted April 29, 2015 (edited) shader.fx: //-- Declare the texture. These are set using dxSetShaderValue( shader, "Tex0", texture ) texture Tex0; technique simple { pass P0 { //-- Set up texture stage 0 Texture[0] = Tex0; //-- Leave the rest of the states to the default settings } } some client LUA code: function applyShader ( ) local shader = dxCreateShader ( "shader.fx" ); -- creating shader local texture = dxCreateTexture ( "someimage.png" ); -- creating texture from image if ( shader and texture ) then -- checking if everything is okay dxSetShaderValue ( shader, "Tex0", texture ); -- applying texture to shader setElementModel ( localPlayer, 0 ); -- setting CJ skin to player engineApplyShaderToWorldTexture ( shader, "cj_ped_torso", localPlayer ); -- applying shader to CJ's torse for player who used command end end addCommandHandler ( "applyshader", applyShader ); -- creating command /applyshader to applyShader function. Edited April 29, 2015 by Guest
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