Jump to content

[QUESTION]Is possible make this?


Recommended Posts

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.

Link to comment
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 :(

Link to comment

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 by Guest
Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...