FaydenFX. Posted April 6, 2017 Share Posted April 6, 2017 (edited) Hello, I have a question like this: How to create a parachutes system available to the guard? Does it mean that a player is jumping on an object and not receiving damage? Edited April 6, 2017 by FaydenFX. Link to comment
#BrosS Posted April 6, 2017 Share Posted April 6, 2017 Can you give more details please Link to comment
FaydenFX. Posted April 6, 2017 Author Share Posted April 6, 2017 After all, everything is described here. I mean, if a player jumps from a building etc. The object does not get hurt. How to do something like that? Link to comment
Pembo Posted April 8, 2017 Share Posted April 8, 2017 Do you mean how to prevent a player from taking damage when they jump off something high? Link to comment
FaydenFX. Posted April 8, 2017 Author Share Posted April 8, 2017 Exactly so, I want to stop the injury if the player jumps from height to the object. Can you do that? Link to comment
#BrosS Posted April 8, 2017 Share Posted April 8, 2017 You can use onPlayerDamage and check if he had parachute so you can cencel the event Link to comment
FaydenFX. Posted April 8, 2017 Author Share Posted April 8, 2017 Is there any other way without a parachute? Link to comment
NeXuS™ Posted April 10, 2017 Share Posted April 10, 2017 I think your native language is not english, so it's kinda hard to understand what you are trying to say. local posY = 0 addEventHandler("onClientPlayerDamage", localPlayer, function(attackerP, dmgType) local _, _, posN = getElementPosition(localPlayer) if (posN + 10 < posY) and dmgType == 54 and attackerP == localPlayer then cancelEvent() end end) setTimer(function() if isPedOnGround(localPlayer) then _, _, posY = getElementPosition(localPlayer) end end, 100, 0) This one should work I think, but not sure. It meant to block all damage from falling, if he jumped from a height from the ground of 10. 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