iPanda Posted July 14, 2013 Share Posted July 14, 2013 I have a question for you - how to replace DFF model the clothes on the server? I found a topic Vicky, who helps to solve this problem https://wiki.multitheftauto.com/wiki/Clothing_Component_IDs But! When I replace my clothes on - Multiplayer MTA closes by itself. Crash. I need your help. Help change the model, because I'm certainly doing something wrong. I look forward to your response! txd = engineLoadTXD( "hockey.txd" ) engineImportTXD( txd, "hockey" ) dff = engineLoadDFF( "hockeymask.dff", "hockeymask" ) engineReplaceModel( dff, "hockeymask" ) Crash! ps. Help to replace model a hockey mask to gas mask! - - Link to comment
Vector Posted July 15, 2013 Share Posted July 15, 2013 to replace models/textures, you need to specify the ID number, not it´s name. the texture name of the hockey mask is "capgangover" the model name of the hockey mask is "capovereye" you can get texture ID, model ID with this function getTypeIndexFromClothes -> textureID, modelID = getTypeIndexFromClothes ("capgangover", "capovereye"); txd = engineLoadTXD ("hockey.txd"); engineImportTXD (txd, textureID); dff = engineLoadDFF ("hockeymask.dff", modelID); engineReplaceModel (dff, modelID); Link to comment
iPanda Posted July 15, 2013 Author Share Posted July 15, 2013 to replace models/textures, you need to specify the ID number, not it´s name.the texture name of the hockey mask is "capgangover" the model name of the hockey mask is "capovereye" you can get texture ID, model ID with this function getTypeIndexFromClothes -> textureID, modelID = getTypeIndexFromClothes ("capgangover", "capovereye"); txd = engineLoadTXD ("hockey.txd"); engineImportTXD (txd, textureID); dff = engineLoadDFF ("hockeymask.dff", modelID); engineReplaceModel (dff, modelID); First: the texture and model hockey mask = "hockey" , "hockeymask" Second: Your example still does not replace the model and texture! ... Link to comment
Vector Posted July 15, 2013 Share Posted July 15, 2013 oh, sorry... textureID, modelID = getTypeIndexFromClothes ("hockey", "hockeymask"); txd = engineLoadTXD ("hockey.txd"); engineImportTXD (txd, textureID); dff = engineLoadDFF ("hockeymask.dff", modelID); engineReplaceModel (dff, modelID); Link to comment
iPanda Posted July 15, 2013 Author Share Posted July 15, 2013 oh, sorry... textureID, modelID = getTypeIndexFromClothes ("hockey", "hockeymask"); txd = engineLoadTXD ("hockey.txd"); engineImportTXD (txd, textureID); dff = engineLoadDFF ("hockeymask.dff", modelID); engineReplaceModel (dff, modelID); Your example still does not replace the model and texture! ... Link to comment
Castillo Posted July 15, 2013 Share Posted July 15, 2013 I'm not sure, but I think that you can't replace clothes model, just textures. Link to comment
iPanda Posted July 15, 2013 Author Share Posted July 15, 2013 I'm not sure, but I think that you can't replace clothes model, just textures. But there must be ways to change clothes, I'm sure! Link to comment
-.Paradox.- Posted July 16, 2013 Share Posted July 16, 2013 Ahh...if you want replace just the txd you could use textures = { ["hockey"] = 30376, } function replaceClothes() for cloth, id in pairs(textures) do local txd = engineLoadTXD(cloth..".txd") engineImportTXD(txd, id) end end addEventHandler("onClientResourceStart", resourceRoot, replaceClothes) you can just replace the txd, but dff i dont think you can replace.. 1 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