esporta05 Posted July 22, 2014 Share Posted July 22, 2014 I have got pretty simple script. But my debugscript 3 is giving me error at my addeventhandler. here is my script: function Blood(loss,attacker,weapon,bodypart) local rootElement = getRootElement() local x, y, z = getElementPosition(source) local slapvalue = 5 local timervalue = 10000 local healthamount = 30 if loss > healthamount then fxAddBlood ( x, y, z-2, 0.00000, 0.00000, 0.00000, 1, 1 ) --setElementHealth ( targetPlayer, getElementHealth(targetPlayer) - slapvalue ) end end addEventHandler ("OnClientPlayerDamage",rootElement,Blood) Link to comment
manawydan Posted July 22, 2014 Share Posted July 22, 2014 try function Blood(loss,attacker,weapon,bodypart) local x, y, z = getElementPosition(source) local slapvalue = 5 local timervalue = 10000 local healthamount = 30 if loss > healthamount then fxAddBlood ( x, y, z-2, 0.00000, 0.00000, 0.00000, 1, 1 ) --setElementHealth ( targetPlayer, getElementHealth(targetPlayer) - slapvalue ) end end addEventHandler ("onClientPlayerDamage",root,Blood) 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