warlitsh Posted July 18, 2013 Posted July 18, 2013 Hi , I need help. I can replace the car with: function Model() txd = engineLoadTXD("name.txd", 411 ) engineImportTXD(txd, 411) dff = engineLoadDFF("name.dff", 411 ) engineReplaceModel(dff, 411) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), Model) But I try to have the original car + Change car. how to do this? (Sorry for my bad english...) Thx for help.
warlitsh Posted July 18, 2013 Author Posted July 18, 2013 even with "control" (Example : /Newcar ) for activate ?
Castillo Posted July 18, 2013 Posted July 18, 2013 You can't have them at the same time, but you can desactivate/activate with commands, etc.
-.Paradox.- Posted July 18, 2013 Posted July 18, 2013 (edited) function newcar() txd = engineLoadTXD("name.txd", 411 ) engineImportTXD(dff, 411) dff = engineLoadDFF("name.dff", 411 ) engineReplaceModel(dff, 411) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), newcar) addCommandHandler ( "newcar", newcar ) Edited July 18, 2013 by Guest
xXMADEXx Posted July 18, 2013 Posted July 18, 2013 You can try this, but i havn't tested it. local isCarModEnabled = false function newcar ( ) if not isCarModEnabled then local txd = engineLoadTXD("name.txd", id ) engineImportTXD(dff, id) local dff = engineLoadDFF("name.dff", id ) engineReplaceModel(dff, id) isCarModEnabled = true else engineRestoreModel ( id ) isCarModEnabled = false end end addCommandHandler ( "newcar", newcar )
-.Paradox.- Posted July 18, 2013 Posted July 18, 2013 You can try this, but i havn't tested it. local isCarModEnabled = false function newcar ( ) if not isCarModEnabled then local txd = engineLoadTXD("name.txd", id ) engineImportTXD(dff, id) local dff = engineLoadDFF("name.dff", id ) engineReplaceModel(dff, id) isCarModEnabled = true else engineRestoreModel ( id ) isCarModEnabled = false end end addCommandHandler ( "newcar", newcar ) Both are working. x)
codeluaeveryday Posted July 18, 2013 Posted July 18, 2013 Remember to define the id or just replace it.
xXMADEXx Posted July 18, 2013 Posted July 18, 2013 You can try this, but i havn't tested it. local isCarModEnabled = false function newcar ( ) if not isCarModEnabled then local txd = engineLoadTXD("name.txd", id ) engineImportTXD(dff, id) local dff = engineLoadDFF("name.dff", id ) engineReplaceModel(dff, id) isCarModEnabled = true else engineRestoreModel ( id ) isCarModEnabled = false end end addCommandHandler ( "newcar", newcar ) Both are working. x) lolz, then why not post the correct one?
warlitsh Posted July 18, 2013 Author Posted July 18, 2013 You can try this, but i havn't tested it. local isCarModEnabled = false function newcar ( ) if not isCarModEnabled then local txd = engineLoadTXD("name.txd", id ) engineImportTXD(dff, id) local dff = engineLoadDFF("name.dff", id ) engineReplaceModel(dff, id) isCarModEnabled = true else engineRestoreModel ( id ) isCarModEnabled = false end end addCommandHandler ( "newcar", newcar ) Thanks you ! Is perfect for my server ! Sorry I debuted in script I'll add you to the credit of my server!
xXMADEXx Posted July 18, 2013 Posted July 18, 2013 You can try this, but i havn't tested it. local isCarModEnabled = false function newcar ( ) if not isCarModEnabled then local txd = engineLoadTXD("name.txd", id ) engineImportTXD(dff, id) local dff = engineLoadDFF("name.dff", id ) engineReplaceModel(dff, id) isCarModEnabled = true else engineRestoreModel ( id ) isCarModEnabled = false end end addCommandHandler ( "newcar", newcar ) Thanks you ! Is perfect for my server ! Sorry I debuted in script I'll add you to the credit of my server! No problem.
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