Electro88 Posted February 4, 2016 Posted February 4, 2016 what wrong guys ? line:6: attempt to perform arithmatic on a boolean value addEvent('onZombieWasted', true) addEventHandler('onZombieWasted', root, function (attacker) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(attacker)),aclGetGroup("Soldier")) then if (getElementType ( attacker ) == "player") and (getElementType ( source ) == "ped") then setElementData(attacker, "health", getElementData( attacker, "health" ) + 5 ) end end end )
1LoL1 Posted February 4, 2016 Posted February 4, 2016 addEvent("onZombieWasted", true) addEventHandler("onZombieWasted", getRootElement(), function (attacker) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(attacker)),aclGetGroup("Soldier")) then if (getElementType ( attacker ) == "player") and (getElementType ( source ) == "ped") then setElementHealth(attacker, getElementHealth(attacker) + 5) end end end )
1LoL1 Posted February 4, 2016 Posted February 4, 2016 Same error Try this: addEvent("onZombieWasted", true) addEventHandler("onZombieWasted", getRootElement(), function (attacker) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(attacker)),aclGetGroup("Soldier")) then setElementHealth(attacker, (getElementHealth(attacker) or 0) + 5) end end)
OnlineCheater Posted February 4, 2016 Posted February 4, 2016 I think 1Lol1's code @line6 is wrong because second argument of setElementData or getElementData is the information which you need to know, it's like: getElementData(player, "data") or setElementData(player, "data", value) Your problem may come from another line but debugscript understands it differently, I can't help you since I don't know how is done the whole script which you're using..
1LoL1 Posted February 4, 2016 Posted February 4, 2016 I think 1Lol1's code @line6 is wrong because second argument of setElementData or getElementData is the information which you need to know, it's like: getElementData(player, "data") or setElementData(player, "data", value)Your problem may come from another line but debugscript understands it differently, I can't help you since I don't know how is done the whole script which you're using.. Wrong? if he want set health he must use only setElementHealth not setElementData..
OnlineCheater Posted February 4, 2016 Posted February 4, 2016 Wrong? if he want set health he must use only setElementHealth not setElementData.. Oh ye, I just noticied it was setElementHealth sry, your code should work normally then.
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