AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   fall damage function (https://forums.alliedmods.net/showthread.php?t=64144)

Tokot 12-09-2007 07:54

fall damage function
 
I need to take some action when player falls down and take fall damage. for player-to-player damage there is client_damage function. which is for fall case?

Wilson [29th ID] 12-09-2007 09:00

Re: fall damage function
 
client_damage does not hook fall damage? I'm surprised to hear that..have you tried?

Anyway, another method would be to use hamsandwich..
RegisterHam(Ham_TakeDamage, "player", "hurt_hook")
goes in plugin_init

then make a function below..
public hurt_hook(id, idinflictor, idattacker, Float:damage, damagebits)
idinflictor would be 0 for ground (that bastard named world always hurtin us)

Tokot 12-10-2007 17:45

Re: fall damage function
 
i didnt understand a word from your post, and didnt find such a fuction in docs, but i wrote this plugin tracking Health messages and comparing get_user_attacker with victim's index

Zenith77 12-10-2007 18:34

Re: fall damage function
 
Quote:

Originally Posted by Tokot (Post 561939)
i didnt understand a word from your post, and didnt find such a fuction in docs, but i wrote this plugin tracking Health messages and comparing get_user_attacker with victim's index

The Wiki has yet to be updated. He gets the RegisterHam() native from the HamSandwich Module (yes, it is a real module). Look in the change log, or it may still be in the module forums.


All times are GMT -4. The time now is 11:06.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.