TheSmart Posted July 23, 2015 Share Posted July 23, 2015 Hey Guys! i heard somewhere that some server use 3 skin mods on 1 skin so i wanted to do same so anyone can tell me how to do? Thanks Link to comment
TheSmart Posted July 23, 2015 Author Share Posted July 23, 2015 can you explain me more? to do it because im nab Link to comment
GTX Posted July 23, 2015 Share Posted July 23, 2015 https://wiki.multitheftauto.com/wiki/Shader_examples Here are some good examples. Link to comment
Ren_712 Posted July 23, 2015 Share Posted July 23, 2015 TheSmart - most of the ped models have only 1 texture, also You might replace textures per entity (eg. localPlayer, or any other player, ped) client.lua local texture = dxCreateTexture("textrue.png",dxt1) local shader = dxCreateShader("replace.fx",0,0,false,"ped") dxSetShaderValue(shader,"sTexreplace",texture) engineApplyShaderToWorldTexture(shader,"*",localPlayer) replace.fx texture sTexreplace; technique replaceTexture { pass P0 { Texture[0] = sTexreplace; } } Link to comment
TheSmart Posted July 24, 2015 Author Share Posted July 24, 2015 that should work? but it not working no error in debugscript 3 function applyShader ( ) local shader = dxCreateShader ( "shader.fx" ); -- creating shader local texture = dxCreateTexture ( "test.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, 1 ); -- setting skin to player engineApplyShaderToWorldTexture ( shader, "*", localPlayer ); -- applying shader for player who used command end end addCommandHandler ( "shader", applyShader ); -- creating command /shader to applyShader function. Link to comment
Ren_712 Posted July 24, 2015 Share Posted July 24, 2015 TheSmart - when you create a shader that is supposed to be applied to ped, you need to specify that. dxCreateShader("replace.fx",0,0,false,"ped") 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