View Single Post
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 01-28-2007 , 15:35   Re: Water Fall Damage
Reply With Quote #5

Cheap_Suit: Probably not with just that. Damage is based on their falling velocity when they hit the ground, and a few defines. When I was adding hostage fall damage to my plugin, I had to try to find Counter-Strike's values (they are different from the base HL ones), and this is what I came up with.

Code:
// not exact, but pretty darn close  #define PLAYER_MAX_SAFE_FALL_SPEED 488.5  #define PLAYER_FATAL_FALL_SPEED    988.5  #define DAMAGE_FOR_FALL_SPEED    100.0 / (PLAYER_FATAL_FALL_SPEED - PLAYER_MAX_SAFE_FALL_SPEED)

So far it seems to be 100% accurate after the rounding occurs. Maybe you could try this code (ie, this would make them take 10.0 fall damage):

Code:
new Float:damage = 10.0 set_pev(id,pev_watertype,CONTENTS_SOLID); set_pev(id,pev_flags,pev(id,pev_flags) & FL_ONGROUND); set_pev(id,pev_flFallVelocity,PLAYER_MAX_SAFE_FALL_SPEED + (damage / DAMAGE_FOR_FALL_SPEED));

It might have to be executed in one of the thinks.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline