Raised This Month: $ Target: $400
 0% 

Get damage to armor


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ZeaLot
New Member
Join Date: May 2006
Old 05-20-2006 , 13:45   Get damage to armor
Reply With Quote #1

Hello, the basic problem is this:

I want to get the damage done to armor when someone gets hit. According to documentation I know 2 ways how to capture it:
Damage event (via register_event)
Damage message (via register_message)

In both cases, when my function gets called, the first argument, as I understand, is supposed to be the damage done to armor, and the second is the damage done to health.

Everything works fine with health. However, the armor variable is always 0. Is it a bug? Or have I missed something?

Wanted to pratice some CS to improve my skill. So figured to use the Headshot plugin, but didn't like it because it doesn't show the damage received which is NOT a headshot. Perhaps I'm trying to re-invent a bicycle by writing the plugin myself and there is already such a plugin available? [Couldn't find one ]
ZeaLot is offline
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 05-21-2006 , 16:37  
Reply With Quote #2

im pretty sure you are correct that there aren't many if any variations of the headshot plugin
SubStream is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 05-21-2006 , 16:39  
Reply With Quote #3

If you knew the calculation to get damage to armor then you could extrapolate it based on damage to health and where it hit, but I don't think that's really a good idea since it would take forever and probably be inaccurate.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Identity
Member
Join Date: Mar 2007
Old 03-15-2007 , 21:22   Re: Get damage to armor
Reply With Quote #4

Someone knows how?
Quote:
to get the damage done to armor when someone gets hit.
Identity is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 03-15-2007 , 22:39   Re: Get damage to armor
Reply With Quote #5

Yeah, check the "Damage" event:
http://wiki.tcwonline.org/index.php/..._Events#Damage

It's the DamageSave parameter.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Identity
Member
Join Date: Mar 2007
Old 03-15-2007 , 23:00   Re: Get damage to armor
Reply With Quote #6

DamageSave is always 0.
Identity is offline
JoshGomez
Member
Join Date: Apr 2006
Location: Sweden
Old 09-11-2007 , 10:19   Re: Get damage to armor
Reply With Quote #7

Maby you can check the old armour and match it against the new armour and return how much armour you have lost.

Oh sorry old post... lol
JoshGomez 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 16:34.


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