Buffalo Posted July 7, 2014 Posted July 7, 2014 (edited) Hi, As title says, is it possible? I'm pretty sure it is, but forgot how exactly its done. Snipet would be perfect. EDIT: Is it possible to add mods aswell? BTW, anyone having trouble connecting to mta irc channel? Edited July 9, 2014 by Guest
MightyAnimals Posted July 7, 2014 Posted July 7, 2014 It is possible to replace sa standard paintjobs with custom ones
MightyAnimals Posted July 8, 2014 Posted July 8, 2014 I'll give you an example of what I've got to do custom paintjobs though. Client sided - 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) You see elegy1body256? Ofcourse you do, that is the name of the first paintjob. You can find those Id's in the .txd files, use txdworkshop to find em. elegy.txd or savanna.txd etc. texture.fx: texture gTexture; technique TexReplace { pass P0 { Texture[0] = gTexture; } }
Buffalo Posted July 8, 2014 Author Posted July 8, 2014 That is what I have asked. Thanks. Anyone aware that mta irc cant be connected to? Is it just me, or custom paintjobs wont work on custom vehicles? only default ones
MightyAnimals Posted July 9, 2014 Posted July 9, 2014 Well, That's the mod causing it to bug. I've had a few mods where it did work.
tosfera Posted July 9, 2014 Posted July 9, 2014 Quite offtopic; h4x7o0r said this; Is there any paintjob for cheetah, turismo, infernus ? it should be possible to add new paintjobs, it's just a simple data that's being sent to the client. Am I right?
Buffalo Posted July 9, 2014 Author Posted July 9, 2014 Not with this method, no. You can change it (using shader tech) for all the models at once, but whats the point of modding then, right? At this point we have this: paintjobs can be changed for default vehicles, that accepts paintjobs, and also sometimes on modded cars. Is it possible to add other modifications to vehicle?
AboShanab Posted July 9, 2014 Posted July 9, 2014 @NL_Jelle : how you get this name "elegy1body256" ?
tosfera Posted July 9, 2014 Posted July 9, 2014 @NL_Jelle : how you get this name "elegy1body256" ? You can use shader_tex_names (thanks ccw) to find texture names to use with engineApplyShaderToWorldTexture.You can download it from the wiki. source: posting.php?mode=quote&f=91&p=370146
Et-win Posted July 9, 2014 Posted July 9, 2014 @NL_Jelle : how you get this name "elegy1body256" ? You can use shader_tex_names (thanks ccw) to find texture names to use with engineApplyShaderToWorldTexture.You can download it from the wiki. source: posting.php?mode=quote&f=91&p=370146 Your source = posting in this topic. Please check your links before posting a reply...
tosfera Posted July 9, 2014 Posted July 9, 2014 @NL_Jelle : how you get this name "elegy1body256" ? You can use shader_tex_names (thanks ccw) to find texture names to use with engineApplyShaderToWorldTexture.You can download it from the wiki. source: posting.php?mode=quote&f=91&p=370146 Your source = posting in this topic. Please check your links before posting a reply... Oh my... that was stupid. Well here is the real source; viewtopic.php?f=91&t=35778
MightyAnimals Posted July 9, 2014 Posted July 9, 2014 @NL_Jelle : how you get this name "elegy1body256" ? The Id was in the elegy.txd file, You can find it using txdworkshop
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