old origin (fall damage)
Hello, I'm trying to save player's origin before of he fell and "teleport" him to this origin if he receive fall damage. Since is there no specific way to do this, what I did then was loop through players each 0.1 seconds, save their origin and teleport they when receive fall damage.
It's working but sometimes the saved origin is the same point from where they fall, so when I teleport them, they stay falling infinitly. Also, I tried to save origin while they climb ladder, but if I teleport them to this origin, same problem happen.
Spoiler
|
Re: old origin (fall damage)
Code:
/* Plugin generated by AMXX-Studio */ |
Re: old origin (fall damage)
Save only the last position when the player is on the ground.
|
Re: old origin (fall damage)
Quote:
|
Re: old origin (fall damage)
Quote:
Code:
Quote:
|
Re: old origin (fall damage)
You mean that the origin is in the air or it's on the ground but he's falling because he has some velocity?
If it's velocity, just reset it. Also, there's something similar on this plugin, you might want to take a look: https://forums.alliedmods.net/showthread.php?p=806220 |
Re: old origin (fall damage)
Do a check with traceline if the position is "safe" before saving it.
|
Re: old origin (fall damage)
O_o
Are you sure you read the code that I provided? Because all these suggestions are there... Quote:
|
Re: old origin (fall damage)
Quote:
|
Re: old origin (fall damage)
I really cant think about anything else than using player prethink forward in this.
PHP Code:
|
| All times are GMT -4. The time now is 07:37. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.