How to know if a player has landed
#1

After skydiving, I want to check whether player has landed on land or not. I tried it with Z pos but when player lands on a building, it does not work.
Is there anyway to check player's parachute animation has stopped and has landed? thank you.
Reply
#2

I have never tried this but you could check if the player has a parachute. Like, getting the weapons info, don't quite remember the function's name but I think you get the gist.

Although the player would also lose his parachute if he presses ENTER, so I am not sure.

EDIT: You could use GetPlayerWeapon from the moment the player is in the air until the moment GetPlayerWeapon returns an ID of a weapon that is not a parachute. Once it is not a parachute that means the player either pressed ENTER or touched the ground. You can check if the player pressed ENTER and then you will know, if the player pressed ENTER he most likely haven't touched the ground and if the player did not press ENTER, and the parachute is gone, the player has touched the ground.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)