..:D&G:.. Posted November 28, 2013 Share Posted November 28, 2013 Hey, I tried searching everywhere but I couldn't find anything usefull so I thought I can just make a post I want to replace the CJ clothes with my own texture, but I don't know how, there is no such function for this If anyone can help me will be grate! P.S: MTA should make a function like replaceCjClothe Link to comment
myonlake Posted November 29, 2013 Share Posted November 29, 2013 As far as I know it's not possible to replace CJ's clothes. You can only switch his default skin to another skin (read here: viewtopic.php?f=91&t=67929#p636216). Link to comment
HunT Posted November 29, 2013 Share Posted November 29, 2013 With shader u can replace the texture. Link to comment
-.Paradox.- Posted November 29, 2013 Share Posted November 29, 2013 Try this you can also add the clothe you want to replace by adding another line without .txd ["name"] = id, textures = { ["name"] = id, ["name"] = id, ["name"] = id, ["name"] = id, } function replaceClothes() for cloth, id in pairs(textures) do local txd = engineLoadTXD (cloth..".txd") engineImportTXD(txd, id) end end addEventHandler ("onClientResourceStart", resourceRoot, replaceClothes) https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs Link to comment
..:D&G:.. Posted November 29, 2013 Author Share Posted November 29, 2013 Ok, so where it sais "name" do I have to put the name of the cloth? Or do I have to change 'id' into the cloth's id? -------EDITED------- This is what I done and it doesn't work: texturi = { ["capgangback"] = id, ["tuxedo"] = id, ["captruck"] = id, ["suit1trblk2"] = id, ["bandblack"] = id, ["bandred"] = id, ["capredback"] = id, ["sportjack"] = id, ["capredside"] = id, ["capredup"] = id, } function replaceClothes() for haina, id in pairs(texturi) do local txd = engineLoadTXD (haina..".txd") engineImportTXD(txd, id) end end addEventHandler ("onClientResourceStart", resourceRoot, replaceClothes) Link to comment
-.Paradox.- Posted November 30, 2013 Share Posted November 30, 2013 The script won't get the id automatically (check the site i give you) and dont change anything in the code, only add the line if you want add another clothing texture. textures = { ["capgangback"] = 30274, ["tuxedo"] = 30518, ["captruck"] = 30293, ["suit1trblk2"] = 30466, ["bandblack"] = 30217, ["bandred"] = 30228, ["capredback"] = 30289, ["sportjack"] = 30458, ["capredside"] = 30291, ["capredup"] = 30292, } function replaceClothes() for cloth, id in pairs(textures) do local txd = engineLoadTXD (cloth..".txd") engineImportTXD(txd, id) end end addEventHandler ("onClientResourceStart", resourceRoot, replaceClothes) Link to comment
..:D&G:.. Posted November 30, 2013 Author Share Posted November 30, 2013 Ok thanks, but I want to know more about this, gain more knowlege There is the word 'id' in the replacement like. If I put id in the script, does it gonna know that I am talking about an ID just by the word 'id'? And how does it know which one is the id? Link to comment
-.Paradox.- Posted November 30, 2013 Share Posted November 30, 2013 https://wiki.multitheftauto.com/wiki/Cl ... ponent_IDs Every clothing component has an id next to it. Link to comment
..:D&G:.. Posted November 30, 2013 Author Share Posted November 30, 2013 Anyway doesn't matter... MTA keeps closing all the time I put the moded cloth on Thanks for help BTW 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