Raised This Month: $ Target: $400
 0% 

[SOLVED] Detect head damage


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-18-2016 , 07:21   [SOLVED] Detect head damage
Reply With Quote #1

A simple question - I would like to know how to detect if a player was shot in the head, using Ham_TakeDamage event.

Last edited by OciXCrom; 06-27-2016 at 17:57.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
SpeeDeeR
Veteran Member
Join Date: Mar 2010
Location: Bulgaria
Old 01-18-2016 , 08:16   Re: Detect head damage
Reply With Quote #2

PHP Code:
m_LastHitGroup 75
XO_PLAYER 
5
get_pdata_int
(victimm_LastHitGroupXO_PLAYER) == HIT_HEAD 

Last edited by SpeeDeeR; 01-18-2016 at 08:17.
SpeeDeeR is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 01-18-2016 , 09:03   Re: Detect head damage
Reply With Quote #3

Мерси! (ty)
OciXCrom is offline
Send a message via Skype™ to OciXCrom
georgik57
Veteran Member
Join Date: Oct 2008
Location: 🎧Music World
Old 01-18-2016 , 16:25   Re: Detect head damage
Reply With Quote #4

also remember to check
Code:
// CS Player PData Offsets (win32) const PDATA_SAFE = 2 // Prevent server crash if entity's private data not initalized if (pev_valid(victim) != PDATA_SAFE)     return;
or else you may get crashes
__________________
georgik57 is offline
Send a message via MSN to georgik57 Send a message via Yahoo to georgik57 Send a message via Skype™ to georgik57
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 02-20-2016 , 19:36   Re: Detect head damage
Reply With Quote #5

new head_shot = read_data(3)
EFFx is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 02-20-2016 , 19:40   Re: Detect head damage
Reply With Quote #6

Quote:
Originally Posted by EFFx View Post
new head_shot = read_data(3)
That's with DeathMsg, not Ham TakeDamage.
Quote:
Originally Posted by OciXCrom View Post
A simple question - I would like to know how to detect if a player was shot in the head, using Ham_TakeDamage event.
__________________

Last edited by Bugsy; 02-20-2016 at 19:41.
Bugsy 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:26.


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