Raised This Month: $ Target: $400
 0% 

Get Damage in TF2


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
naris
AlliedModders Donor
Join Date: Dec 2006
Old 12-31-2007 , 12:03   Get Damage in TF2
Reply With Quote #1

I have written a script to calculate the amount of damage in player_hurt for TF2 (since valve does not provide a it in the event).

To do this, I have to track the amout of health for all players and subtract the health in the player_hurt event form the previous health of the wounded client.

I placed the stocks in damage.inc and have provided an example test_damage.sp plugin that shows damage and weapon info in chat and logs it.

Oh, I also have stocks to detect gametype (cstrike, dod, tf2, etc...), health and maxhealth (for TF2).
Attached Files
File Type: inc damage.inc (1.3 KB, 522 views)
File Type: inc util.inc (1.8 KB, 465 views)
File Type: inc health.inc (1.8 KB, 469 views)
File Type: sp Get Plugin or Get Source (test_damage.sp - 521 views - 2.5 KB)

Last edited by naris; 12-31-2007 at 12:04. Reason: typo
naris is offline
 



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 21:48.


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