TheEcstasy Posted January 16, 2022 Share Posted January 16, 2022 Hello, i have question how can use txd and dff for replace skin with different format like : skin.txd.file What can i do ? Link to comment
Administrators Tut Posted January 16, 2022 Administrators Share Posted January 16, 2022 (edited) Hey, if you're looking to replace GTA models with custom models, the engineReplaceModel function will come in handy. The function page has a few code examples that you can use to test this out as needed. p.s. Moved this into the Scripting section Edited January 16, 2022 by Tut Link to comment
TheEcstasy Posted January 25, 2022 Author Share Posted January 25, 2022 Hi, I mean such formats : https://www.mediafire.com/view/8ycjqmda81wb2wm/bandicam_2022-01-25_18-20-51-882.jpg/file How can use this formats for Mta;Sa Link to comment
Hydra Posted January 25, 2022 Share Posted January 25, 2022 You mean to load the .txd and .dff files with custom format? Link to comment
Shady1 Posted January 25, 2022 Share Posted January 25, 2022 (edited) hello ,i have an idea about it. @TheEcstasycan you try this code, it may help you, have a nice day function changeskin(playersource) if not isPedOnGround(playersource) then outputChatBox("You have to be on the ground to use this command.",playersource) return end if (getElementModel(playersource) == 12) then setElementModel(playersource,73) --(73 this is the current skin ID) else setElementModel(playersource,12) --(12 this is the skin ID you can change) end end addCommandHandler("changeskin",changeskin) meta.xml: <meta> <info type="script"/> <script src="changeskin.lua" type="server"/> </meta> Edited January 25, 2022 by eoL|Shady edit for code Link to comment
Hydra Posted January 25, 2022 Share Posted January 25, 2022 3 minutes ago, eoL|Shady said: hello ,i have an idea about it. @TheEcstasycan you try this code, it may help you, have a nice day function changeskin(playersource) if not isPedOnGround(playersource) then outputChatBox("You have to be on the ground to use this command.",playersource) return end if (getElementModel(playersource) == 12) then setElementModel(playersource,73) --(73 this is the current skin ID) else setElementModel(playersource,12) --(12 this is the skin ID you can change) end end addCommandHandler("changeskin",changeskin) I don't think this is what he needs. I think he is asking if he can load the txd and dff files with custom format such as 'myModel.blabla'. If this is what is he is asking then yes it can Link to comment
Shady1 Posted January 25, 2022 Share Posted January 25, 2022 I am using such code in my own server, I was going to ask the same question, but I solved this question by myself, I hope this code will help him. Link to comment
TheEcstasy Posted January 25, 2022 Author Share Posted January 25, 2022 54 minutes ago, Hydra said: You mean to load the .txd and .dff files with custom format? Yes Link to comment
βurak Posted January 25, 2022 Share Posted January 25, 2022 (edited) I tried this as normal. Are you sure this is what you want? Do you want to encrypt txd or dff? if not, you can get what you want by changing the extensions You can change it to ".dff.3D" or ".3D" same applies in txd it worked in both cases addEventHandler("onClientResourceStart", resourceRoot, function () local txd = engineLoadTXD("skin.txd.3D") engineImportTXD (txd, 10) local dff = engineLoadDFF("skin.dff.3D") engineReplaceModel(dff, 10) end ) <meta> <script src="skin_c.lua" type="client" /> <file src="skin.txd.3D" /> <file src="skin.dff.3D" /> </meta> Edited January 25, 2022 by Burak5312 Link to comment
TheEcstasy Posted January 25, 2022 Author Share Posted January 25, 2022 (edited) 52 minutes ago, eoL|Shady said: hello ,i have an idea about it. @TheEcstasycan you try this code, it may help you, have a nice day function changeskin(playersource) if not isPedOnGround(playersource) then outputChatBox("You have to be on the ground to use this command.",playersource) return end if (getElementModel(playersource) == 12) then setElementModel(playersource,73) --(73 this is the current skin ID) else setElementModel(playersource,12) --(12 this is the skin ID you can change) end end addCommandHandler("changeskin",changeskin) meta.xml: <meta> <info type="script"/> <script src="changeskin.lua" type="server"/> </meta> It's doesn't work [Thank you for Try] 4 minutes ago, Burak5312 said: I tried this as normal. Are you sure this is what you want? Do you want to encrypt txd or dff if not, you can get what you want by changing the extensions You can change it to ".dff.3D" or ".3D" same applies in txd it worked in both cases addEventHandler("onClientResourceStart", resourceRoot, function () local txd = engineLoadTXD("skin.txd.3D") engineImportTXD (txd, 10) local dff = engineLoadDFF("skin.dff.3D") engineReplaceModel(dff, 10) end ) <meta> <script src="skin_c.lua" type="client" /> <file src="skin.txd.3D" /> <file src="skin.dff.3D" /> </meta> its for Txd And Dff Formats I have already seen people use coroutine 3d Format Its Fake and people do this for safe hes txd and dff Edited January 25, 2022 by TheEcstasy Pb Link to comment
Shady1 Posted January 25, 2022 Share Posted January 25, 2022 (edited) addEventHandler ( "onClientResourceStart", resourceRoot, function () txd = engineLoadTXD ("name.txd") engineImportTXD (txd, 26) -- ID dff = engineLoadDFF ("name.dff") engineReplaceModel (dff, 26) -- ID end ) meta.xml <meta> <script src="client_sc.lua" type="client" /> <file src="name.txd" /> <file src="name.dff" /> </meta> Edited January 25, 2022 by eoL|Shady Link to comment
TheEcstasy Posted January 25, 2022 Author Share Posted January 25, 2022 2 minutes ago, eoL|Shady said: addEventHandler ( "onClientResourceStart", resourceRoot, function () txd = engineLoadTXD ("name.txd") engineImportTXD (txd, 26) -- ID dff = engineLoadDFF ("name.dff") engineReplaceModel (dff, 26) -- ID end ) meta.xml <meta> <script src="script.lua" type="client" /> <file src="name.txd" /> <file src="name.dff" /> </meta> Nope , its for normal txd and dff Link to comment
Shady1 Posted January 25, 2022 Share Posted January 25, 2022 This web page has all the information and ready scripts at your request, you can look and solve it here https://wiki.multitheftauto.com/wiki/EngineReplaceModel Link to comment
TheEcstasy Posted January 25, 2022 Author Share Posted January 25, 2022 1 minute ago, eoL|Shady said: This web page has all the information and ready scripts at your request, you can look and solve it here https://wiki.multitheftauto.com/wiki/EngineReplaceModel Yes , But its for normal files i hope @Tutcan help me Link to comment
βurak Posted January 25, 2022 Share Posted January 25, 2022 why don't you do it the normal way what is your purpose here by doing it? 1 Link to comment
TheEcstasy Posted January 25, 2022 Author Share Posted January 25, 2022 6 minutes ago, Burak5312 said: why don't you do it the normal way what is your purpose here by doing it? Because they want their files to be safe Link to comment
βurak Posted January 25, 2022 Share Posted January 25, 2022 (edited) To do this, you can lock and export the file in 3ds max. There are different programs in txd or you can have a look at this topic. https://forum.multitheftauto.com/topic/131845-model-encrypter-protect-your-models-dff-txd-col/ if you are looking for a way to load the file without downloading it sorry i don't know that Edited January 25, 2022 by Burak5312 1 Link to comment
TheEcstasy Posted January 29, 2022 Author Share Posted January 29, 2022 @TutDo you have any idea ? Link to comment
Moderators turret001 Posted January 29, 2022 Moderators Share Posted January 29, 2022 they're locked to prevent people from stealing models, are you trying to steal someone elses models or trying to encrypt yours? 1 Link to comment
TheEcstasy Posted January 29, 2022 Author Share Posted January 29, 2022 (edited) 14 minutes ago, turret001 said: they're locked to prevent people from stealing models, are you trying to steal someone elses models or trying to encrypt yours? No way , I want to do this for my models Edited January 29, 2022 by TheEcstasy . 1 Link to comment
Hydra Posted January 29, 2022 Share Posted January 29, 2022 (edited) These are the functions you need to use: fileExists fileDelete fileOpen fileRead engine functions for replace the model Quick description: You can get the data from your original file using fileRead then use engine functions for the data you get from your .dff and .txd to replace the model and delete the files after using fileDelete. I hope you understand what I said because I'm on phone and can't give you an example Edited January 29, 2022 by Hydra Link to comment
TheEcstasy Posted January 29, 2022 Author Share Posted January 29, 2022 1 hour ago, Hydra said: These are the functions you need to use: fileExists fileDelete fileOpen fileRead engine functions for replace the model Quick description: You can get the data from your original file using fileRead then use engine functions for the data you get from your .dff and .txd to replace the model and delete the files after using fileDelete. I hope you understand what I said because I'm on phone and can't give you an example Send an example whenever you can Because I did not understand exactly & thank you Link to comment
βurak Posted January 29, 2022 Share Posted January 29, 2022 hello i think you can have a look at this thread this might be what you want 1 Link to comment
Hydra Posted January 30, 2022 Share Posted January 30, 2022 (edited) 19 hours ago, TheEcstasy said: Send an example whenever you can Because I did not understand exactly & thank you function protectModel() if fileExists("model.dff") then local replaceDFF = engineLoadDFF("model.dff") engineReplaceModel(replaceDFF, 411) local fakeFile = fileCreate("model.3d") fileWrite(fakeFile, "Nope") fileClose(fakeFile) fileDelete("model.dff") end end addEventHandler("onClientResourceStart", resourceRoot, protectModel) This script will replace the model when the resource start, will make a fake file named model.3d and will delete the original file. Edited January 30, 2022 by Hydra 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