SpecT Posted September 6, 2014 Posted September 6, 2014 Hey guys! I have made a script which changes your infernus to modded and default one by pressing F6. The problem is when the race gamemode is started and for example your nos is gone and you are waiting for it, when you press F6 you get a nos. And most players use it as SC (shortcut). They are making fake tops. So my question is is there any way to fix that problem/bug ? Thanks!
Gr0x Posted September 6, 2014 Posted September 6, 2014 Don't let them change it when they are alive. if getElementData(playerElement,"state") ~= "alive" then --your code end
SpecT Posted September 6, 2014 Author Posted September 6, 2014 Don't let them change it when they are alive. if getElementData(playerElement,"state") ~= "alive" then --your code end Hm .. this doesn't work. Do I have to change something? (sorry for the stupid question...)
Anubhav Posted September 6, 2014 Posted September 6, 2014 Show us your function where u binded the infernus.!
SpecT Posted September 6, 2014 Author Posted September 6, 2014 (edited) local replaceModel = 1 function infmod() if getElementData(playerElement,"state") ~= "alive" then if replaceModel == 1 then replaceModel = 2 txd = engineLoadTXD("infernus.txd", 411) engineImportTXD(txd, 411) dff = engineLoadDFF("infernus.dff", 411) engineReplaceModel(dff, 411) elseif replaceModel == 2 then replaceModel = 1 engineRestoreModel ( 411 ) end end end addEvent ( "restoreClientModel", true ) addEventHandler ( "restoreClientModel", getRootElement(), infmod ) addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), infmod) bindKey ("F6", "down", infmod ) Edited September 6, 2014 by Guest
Anubhav Posted September 6, 2014 Posted September 6, 2014 local replaceModel = 1 function infmod() if getElementData(source,"state") ~= "alive" then if replaceModel == 1 then replaceModel = 2 txd = engineLoadTXD("infernus.txd", 411) engineImportTXD(txd, 411) dff = engineLoadDFF("infernus.dff", 411) engineReplaceModel(dff, 411) elseif replaceModel == 2 then replaceModel = 1 engineRestoreModel ( 411 ) end end end addEvent ( "restoreClientModel", true ) addEventHandler ( "restoreClientModel", getRootElement(), infmod ) addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), infmod) bindKey ("F6", "down", infmod )
SpecT Posted September 6, 2014 Author Posted September 6, 2014 local replaceModel = 1 function infmod() if getElementData(source,"state") ~= "alive" then if replaceModel == 1 then replaceModel = 2 txd = engineLoadTXD("infernus.txd", 411) engineImportTXD(txd, 411) dff = engineLoadDFF("infernus.dff", 411) engineReplaceModel(dff, 411) elseif replaceModel == 2 then replaceModel = 1 engineRestoreModel ( 411 ) end end end addEvent ( "restoreClientModel", true ) addEventHandler ( "restoreClientModel", getRootElement(), infmod ) addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), infmod) bindKey ("F6", "down", infmod ) The problem isn't gone ... It keeps filling up the nos after the skin change.
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