MickeyPoo Posted April 28, 2017 Share Posted April 28, 2017 (edited) Hey guys, I'm really bad at scripting, and was wondering if someone can help me a little bit. Does anyone have a public script or something else that can help me, to get custom skin textures bound to a class. So for example there are two classes one is called Police1 and one is called Police2. Police 1 = a normal police skin. LAPD1 Police 2 = a modified police skin with custom textures. Also LAPD1 Edited April 28, 2017 by MickeyPoo Link to comment
Mr.Loki Posted April 28, 2017 Share Posted April 28, 2017 How are you defining the classes? ACL,data,XML etc....? Link to comment
Syntrax# Posted April 29, 2017 Share Posted April 29, 2017 19 hours ago, Mr.Loki said: How are you defining the classes? ACL,data,XML etc....? Probably ElementData Link to comment
MickeyPoo Posted April 29, 2017 Author Share Posted April 29, 2017 On 4/28/2017 at 23:04, Mr.Loki said: How are you defining the classes? ACL,data,XML etc....? ACL Link to comment
Mr.Loki Posted April 29, 2017 Share Posted April 29, 2017 Just now, MickeyPoo said: ACL How are you setting the skin? Is it a shader or TXD? Link to comment
MickeyPoo Posted April 29, 2017 Author Share Posted April 29, 2017 1 minute ago, Mr.Loki said: How are you setting the skin? Is it a shader or TXD? It's a shader, something like this; Link to comment
aka Blue Posted April 29, 2017 Share Posted April 29, 2017 @MickeyPoo This is the .png file of the .txd file. All you need to do is export this image from the edited skin of the police and make it work with shaders in MTA. If you bring me that .png image of the edited police i will make it for you for free 2 Link to comment
aka Blue Posted April 30, 2017 Share Posted April 30, 2017 I dont test it buy, i think it should work shader.fx file // Variable to fetch the texture from the script texture gTexture; // My nice technique. Requires absolutely no tools, worries nor skills technique TexReplace { pass P0 { // Set the texture Texture[0] = gTexture; // LET THE MAGIC DO ITS MAGIC! } } client.lua file local texture = dxCreateTexture( "lapd.png" ) -- Here you add the path of the edited .png file of the police addCommandHandler( "jacket", function( cmd ) local shader = dxCreateShader( "shader.fx", 0, 0, true, "ped" ) -- We load the shader (or create) setElementModel( localPlayer, 280 ) -- We add the police clothes to the player engineApplyShaderToWorldTexture( shader, "lapd1", localPlayer ) -- We apply the shader to the model dxSetShaderValue( shader, "gTexture", texture ) -- We apply the texture to the shader outputChatBox( "¡Hi! You set the jacket to the officer" ) end ) And here you have the script with the meta, etc. http://www74.zippyshare.com/v/WWBHahoV/file.html Hope i help you! 1 Link to comment
Avagard Posted May 1, 2017 Share Posted May 1, 2017 20 hours ago, aka Blue said: I dont test it buy, i think it should work shader.fx file // Variable to fetch the texture from the script texture gTexture; // My nice technique. Requires absolutely no tools, worries nor skills technique TexReplace { pass P0 { // Set the texture Texture[0] = gTexture; // LET THE MAGIC DO ITS MAGIC! } } client.lua file local texture = dxCreateTexture( "lapd.png" ) -- Here you add the path of the edited .png file of the police addCommandHandler( "jacket", function( cmd ) local shader = dxCreateShader( "shader.fx", 0, 0, true, "ped" ) -- We load the shader (or create) setElementModel( localPlayer, 280 ) -- We add the police clothes to the player engineApplyShaderToWorldTexture( shader, "lapd1", localPlayer ) -- We apply the shader to the model dxSetShaderValue( shader, "gTexture", texture ) -- We apply the texture to the shader outputChatBox( "¡Hi! You set the jacket to the officer" ) end ) And here you have the script with the meta, etc. http://www74.zippyshare.com/v/WWBHahoV/file.html Hope i help you! can we do it to weapon models too? Link to comment
aka Blue Posted May 1, 2017 Share Posted May 1, 2017 @Avagard I dont try it but i think is possible, replacing the colt/uzi/mp4 texture... Link to comment
MickeyPoo Posted May 1, 2017 Author Share Posted May 1, 2017 It worked @aka Blue you're amazing thanks, also learnt a lot from this. Link to comment
Avagard Posted May 2, 2017 Share Posted May 2, 2017 20 hours ago, aka Blue said: @Avagard I dont try it but i think is possible, replacing the colt/uzi/mp4 texture... how? please tell me Link to comment
aka Blue Posted May 2, 2017 Share Posted May 2, 2017 Search the colt texture and try to remplace it. Now that i think, its not possible. You need to create a colt object in the ped's hand and change the texture. Link to comment
joriss11 Posted January 15, 2018 Share Posted January 15, 2018 Anyone still has a working link to this script including meta and :~? cause the current link is broken Link to comment
Axel Posted January 17, 2018 Share Posted January 17, 2018 You need this: https://community.multitheftauto.com/index.php?p=resources&s=details&id=10145 Link to comment
joriss11 Posted January 18, 2018 Share Posted January 18, 2018 Got it working already haha, thanks anyways! 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