pappymta Posted May 3, 2012 Share Posted May 3, 2012 hy am new and i have a mta server and i want to relace the cars i have real cars mods and i want to put up on my server but i dont now how and i want a categori like real cars plz hel me out Link to comment
Wei Posted May 3, 2012 Share Posted May 3, 2012 http://mta.dzek.eu/peds/ Is easy way function applyMods() local skin = engineLoadTXD ( "(file).txd" ) engineImportTXD ( skin, (skin id) ) end addEventHandler("onClientResourceStart", getRootElement(), applyMods) It's a bit harder(for starter) but same. Link to comment
KenXeiko Posted May 3, 2012 Share Posted May 3, 2012 http://mta.dzek.eu/vehicle/ Probably he will change the DFF too. Not only the TXD. function applyMods() local txd = engineLoadTXD ( "(file).txd" ) engineImportTXD ( txd, [VehicleID] ) local dff = engineLoadDFF ( "(file).dff", [VehicleID] ) engineReplaceModel ( dff, [VehicleID] ) end addEventHandler("onClientResourceStart", getRootElement(), applyMods) https://wiki.multitheftauto.com/wiki/EngineReplaceModel Click link above for example to replace vehicle skin. Link to comment
Moderators Vinyard Posted May 3, 2012 Moderators Share Posted May 3, 2012 http://mta.dzek.eu/peds/Is easy way function applyMods() local skin = engineLoadTXD ( "(file).txd" ) engineImportTXD ( skin, (skin id) ) end addEventHandler("onClientResourceStart", getRootElement(), applyMods) It's a bit harder(for starter) but same. He said car mods. viewtopic.php?f=91&t=42687&p=431325#p431325 Use first "Search" function. Link to comment
meh Posted May 5, 2012 Share Posted May 5, 2012 how to keep both models at the same time? for example a user has a choice to keep the original look of a vehicle or switch to a modified one? Link to comment
DakiLLa Posted May 5, 2012 Share Posted May 5, 2012 meh engineRestoreModel should help you. Link to comment
meh Posted May 6, 2012 Share Posted May 6, 2012 addCommandHandler("replace", function () setTimer(function () engineImportTXD(engineLoadTXD("skin.txd", ID), ID) engineReplaceModel(engineLoadDFF("skin.dff", 0), ID) end, 1000, 1) end) addCommandHandler("restore", function () engineRestoreModel(ID) end) the default code for this should look like this? and what if i want to bind these actions? bindKey("F3", "up", function() replace = (not replace) if(replace)then outputChatBox("#FFFFFF[ENABLE]#FF5500Custom skin is now #00FF00enabled#FF5500!", 255, 128, 0, true) else outputChatBox("#FFFFFF[DISABLE]#FF5500Custom skin is now #FF0000disabled#FF5500!", 255, 128, 0, true) end Link to comment
KenXeiko Posted May 8, 2012 Share Posted May 8, 2012 Why did you need to use timer? And why you should put command if you want to bind it? local useMod = 0 -- You can name it as you wish actually bindKey("F3", "down", function() if useMod == 0 then engineImportTXD(engineLoadTXD("skin.txd", ID), ID) engineReplaceModel(engineLoadDFF("skin.dff", ID), ID) -- You should fill it with the object ID instead of 0 useMod = 1 outputChatBox("#FFFFFF[ENABLE]#FF5500Custom skin is now #00FF00enabled#FF5500!", 255, 128, 0, true) elseif useMod == 1 then engineRestoreModel(ID) useMod = 0 outputChatBox("#FFFFFF[DISABLE]#FF5500Custom skin is now #FF0000disabled#FF5500!", 255, 128, 0, true) end end ) But if you still want to let those command. Try this function. executeCommandHandler 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