Raised This Month: $66 Target: $400
 16% 

Hook damage that will kill the player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 05-19-2018 , 18:04   Hook damage that will kill the player
Reply With Quote #1

I want to hook damage event that will kill the player, and block the damage. Should I use SDKHooks_TakeDamage?
__________________


Accepting private work. Contact me if you're interested.
eyal282 is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Brexit
Old 05-19-2018 , 18:33   Re: Hook damage that will kill the player
Reply With Quote #2

Yes use SDKHooks
Use the hook "SDKHooks_OnTakeDamage"
__________________
Lux is offline
BraveFox
BANNED
Join Date: May 2015
Location: Israel
Old 05-20-2018 , 07:08   Re: Hook damage that will kill the player
Reply With Quote #3

Use sdkhook ontakedamage and check if the damage is bigger or equal to the player's health.
BraveFox is offline
Neuro Toxin
Veteran Member
Join Date: Oct 2013
Location: { closing the void; }
Old 05-20-2018 , 09:16   Re: Hook damage that will kill the player
Reply With Quote #4

You should use the SDKHooks_OnTakeDamage_Alive hook for this

The player is still alive during this hook. Just check the players health netprop and compare to the damage parameter in the hook.

Here is an example of the hook.
__________________

Last edited by Neuro Toxin; 05-20-2018 at 09:18.
Neuro Toxin is offline
Reply


Thread Tools
Display Modes

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 07:50.


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