Raised This Month: $ Target: $400
 0% 

fall damage function


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tokot
Junior Member
Join Date: Sep 2007
Old 12-09-2007 , 07:54   fall damage function
Reply With Quote #1

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?
Tokot is offline
Wilson [29th ID]
Veteran Member
Join Date: Nov 2005
Location: London
Old 12-09-2007 , 09:00   Re: fall damage function
Reply With Quote #2

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)
__________________

Day of Defeat AMXX Community

FakeMeta Research . Voice Proximity . Advanced Deploy . Technician
Wilson [29th ID] is offline
Send a message via ICQ to Wilson [29th ID] Send a message via AIM to Wilson [29th ID] Send a message via MSN to Wilson [29th ID] Send a message via Yahoo to Wilson [29th ID]
Tokot
Junior Member
Join Date: Sep 2007
Old 12-10-2007 , 17:45   Re: fall damage function
Reply With Quote #3

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
Tokot is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 12-10-2007 , 18:34   Re: fall damage function
Reply With Quote #4

Quote:
Originally Posted by Tokot View Post
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.
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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