Hook damage that will kill the player
I want to hook damage event that will kill the player, and block the damage. Should I use SDKHooks_TakeDamage?
|
Re: Hook damage that will kill the player
Yes use SDKHooks
Use the hook "SDKHooks_OnTakeDamage" |
Re: Hook damage that will kill the player
Use sdkhook ontakedamage and check if the damage is bigger or equal to the player's health.
|
Re: Hook damage that will kill the player
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. |
All times are GMT -4. The time now is 03:30. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.