Mr.DeViLsS Posted December 27, 2017 Share Posted December 27, 2017 (edited) function skins ( commandName ) -- cj_ped_head local textSkin = dxCreateTexture ( "img.png" ) local skin = dxCreateShader( "tex_names.fx", 0, 0, true, "ped" ) engineApplyShaderToWorldTexture ( skin, "cj_ped_head", localPlayer ); dxSetShaderValue ( skin, "texure0", textSkin ) end addCommandHandler ( "cSkin", skins ) Shader: // // tex_names.fx // float Time : TIME; // Make everything all flashy! float4 GetColor() { return float4( cos(Time*10), cos(Time*7), cos(Time*4), 1 ); } //----------------------------------------------------------------------------- // Techniques //----------------------------------------------------------------------------- technique tec0 { pass P0 { MaterialAmbient = GetColor(); MaterialDiffuse = GetColor(); MaterialEmissive = GetColor(); MaterialSpecular = GetColor(); AmbientMaterialSource = Material; DiffuseMaterialSource = Material; EmissiveMaterialSource = Material; SpecularMaterialSource = Material; ColorOp[0] = SELECTARG1; ColorArg1[0] = Diffuse; AlphaOp[0] = SELECTARG1; AlphaArg1[0] = Diffuse; Lighting = true; } } Please tell me, why not replace the texture? Result: https://imgur.com/a/vciyC Texture: https://imgur.com/a/VCcbO Edited December 27, 2017 by Mr.DeViLsS Link to comment
Mr.DeViLsS Posted December 27, 2017 Author Share Posted December 27, 2017 Is anybody can help? Link to comment
ميدوح Posted December 28, 2017 Share Posted December 28, 2017 https://community.multitheftauto.com/index.php?p=resources&s=details&id=14707 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