Raised This Month: $32 Target: $400
 8% 

[SOLVED] How can I get damage bits out of Ham_TakeDamage?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 07-12-2012 , 01:52   [SOLVED] How can I get damage bits out of Ham_TakeDamage?
Reply With Quote #1

How can I get damage bits out of Ham_TakeDamage?
I need this in Ham_Killed to use proper staff that should accompany player's death.
__________________

Last edited by isotonic; 12-15-2013 at 11:54.
isotonic is offline
Y060N
BANNED
Join Date: Dec 2011
Location: www.equilibriumcs.com
Old 07-12-2012 , 02:06   Re: How can I get damage bits out of Ham_TakeDamage?
Reply With Quote #2

The last parameter is the damage type, and I am guessing that is what you are looking for.
Y060N is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-12-2012 , 02:38   Re: How can I get damage bits out of Ham_TakeDamage?
Reply With Quote #3

Quote:
Originally Posted by isotonic View Post
I need this in Ham_Killed to use proper staff that should accompany player's death.
http://wiki.alliedmods.net/CBaseMonster_(CS)

Use m_bitsDamageType offset and make a check on your forward.

PHP Code:
#define m_bitsDamageType 76
if(get_pdata_int(iVictimm_bitsDamageType5) & DMG_BLAST)
   
client_print(0print_chat"Killed by C4"
Only an example.
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross

Last edited by meTaLiCroSS; 07-12-2012 at 11:44.
meTaLiCroSS is offline
isotonic
AlliedModders Donor
Join Date: Jun 2011
Location: Moscow, Russia
Old 07-12-2012 , 02:44   Re: How can I get damage bits out of Ham_TakeDamage?
Reply With Quote #4

meTaLiCroSS I love you! Also thanks for the dmgbit for C4 ( I planned to search for it ;)


Quote:
Originally Posted by Y060N View Post
The last parameter is the damage type, and I am guessing that is what you are looking for.
Ham_TakeDamage forward then player's health is below 0 is called AFTER Ham_Killed.
__________________

Last edited by isotonic; 07-12-2012 at 03:00.
isotonic is offline
meTaLiCroSS
Gaze Upon My Hat
Join Date: Feb 2009
Location: Viņa del Mar, Chile
Old 07-12-2012 , 11:44   Re: How can I get damage bits out of Ham_TakeDamage?
Reply With Quote #5

Quote:
Originally Posted by isotonic View Post
meTaLiCroSS I love you! Also thanks for the dmgbit for C4 ( I planned to search for it ;)




Ham_TakeDamage forward then player's health is below 0 is called AFTER Ham_Killed.
At least DMG_BLAST is the dmgbit that uses C4 because when killing people it doesn't call the DeathMsg event on players.

If you want to detect last player hitgroup before death, check the m_LastHitGroup offset
__________________
Quote:
Originally Posted by joropito View Post
You're right Metalicross
meTaLiCroSS 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 03:09.


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