-Blaze- Posted March 21, 2015 Share Posted March 21, 2015 hello everyone , is there a way to cancel the damage done to a player when he falls from a height? Link to comment
Derpy Posted March 21, 2015 Share Posted March 21, 2015 function cancelFallDamage(attacker) if not attacker then cancelEvent() end end addEventHandler("onClientPlayerDamage",getLocalPlayer(),cancelFallDamage) Link to comment
Addlibs Posted March 21, 2015 Share Posted March 21, 2015 The code above cancels all damage made without an attacker, not necessarily just falling damage. Link to comment
Derpy Posted March 21, 2015 Share Posted March 21, 2015 The code above cancels all damage made without an attacker, not necessarily just falling damage. that should be obvious, though i don't have time to create much more complicated script at the moment. Link to comment
TAPL Posted March 21, 2015 Share Posted March 21, 2015 addEventHandler("onClientPlayerDamage", localPlayer, function(_, wp) if wp == 54 then -- 54 is the fall id. cancelEvent() end end) https://wiki.multitheftauto.com/wiki/Death_Reasons 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