Jump to content

custom paintjobs


botshara

Recommended Posts

It is possilble make custom paintjobs on custom car mod ? I have a script which change paint job on elegy but it doesnt works on custom car mod. I think need something change in texture but I dont know what, please help.

Here is texture.fx

texture gTexture; 
  
technique hello 
{ 
    pass P0 
    { 
        Texture[0] = gTexture; 
    } 
} 
  

client side

local shaderPJ = dxCreateShader ( "texture.fx" ) 
local shaderPJ2 = dxCreateShader ( "texture.fx" ) 
local shaderPJ3 = dxCreateShader ( "texture.fx" ) 
  
--Elegy paintjob 1 
function elegyPaintjob1( ) 
        local elegyPaintjob1 = dxCreateTexture ( "paintjobs/pj1.png") 
        dxSetShaderValue ( shaderPJ, "gTexture", elegyPaintjob1 ) 
        engineApplyShaderToWorldTexture ( shaderPJ, "elegy1body256" )    
    end 
addEventHandler ( "onClientResourceStart", resourceRoot, elegyPaintjob1)     
--Elegy paintjob 2 
function elegyPaintjob2( ) 
        local elegyPaintjob2 = dxCreateTexture ( "paintjobs/pj2.png") 
        dxSetShaderValue ( shaderPJ2, "gTexture", elegyPaintjob2 ) 
        engineApplyShaderToWorldTexture ( shaderPJ2, "elegy2body256" )   
    end 
addEventHandler ( "onClientResourceStart", resourceRoot, elegyPaintjob2)     
--Elegy paintjob 3 
function elegyPaintjob3( ) 
        local elegyPaintjob3 = dxCreateTexture ( "paintjobs/pj3.png") 
        dxSetShaderValue ( shaderPJ3, "gTexture", elegyPaintjob3 ) 
        engineApplyShaderToWorldTexture ( shaderPJ3, "elegy3body256" )   
    end 
addEventHandler ( "onClientResourceStart", resourceRoot, elegyPaintjob3) 
  
  

Link to post
  • 2 weeks later...

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...