Jump to content

[HELP] Replacing CJ clothes skin mod


..:D&G:..

Recommended Posts

Posted

Hey, I tried searching everywhere but I couldn't find anything usefull so I thought I can just make a post :P

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 :P

Posted

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

Posted

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) 

Posted

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) 

Posted

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?

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...