Jump to content

Parachutes system


Recommended Posts

Posted (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 by FaydenFX.
Posted

 

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?

Posted

You can use onPlayerDamage and check if he had parachute so you can cencel the event

من أراد الفشل عليه بالنجاح

Posted

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.

6C73yFv.png

Did I help you?

Mmpe7Jm.gif


NeXuS™#0001

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...