How to get real damage before it has been dealt
[CSGO]
So, I want to prevent lethal damage once, but the problem is to get real damage, not theorical. I tried to use SDK hooks on take damage, but it is not actually real. For example, if someone does headshot with m4 and enemy has helmet he shouldnt die, real damage is about 90, but on take damage shows over 100. with ontake damage alive it sometimes shows too low damage, because I compare damage with player health and sometimes when health is enough, player anyways dies. Is it possible to get exact real damage? Probably any extensions? Thanks in advance PHP Code:
|
Re: How to get real damage before it has been dealt
There is a player_hurt event which gives you info on hp damage and armour damage, but afaik this happens after the player takes damage. Perhaps you could try it in a pre-hook and then change the clients health using SetEntityHealth. Not sure if it'll work, most likely the player will die before health changes but you could give it a try.
|
Re: How to get real damage before it has been dealt
Just check if the player is getting hit in the head or chest and has helmet or kevlar.
Some of the math for a base source game: https://github.com/ValveSoftware/sou...ayer.cpp#L1158 It may be slightly different in csgo |
Re: How to get real damage before it has been dealt
Sdkhook ontakedamage_ALIVE
|
Re: How to get real damage before it has been dealt
SDKHook_OnTakeDamageAlive
|
Re: How to get real damage before it has been dealt
I have tried SDK on take damage ALIVE but I find it unreliable, because, as I write in first post, actual ingame damage is more than it is supposed to be.
|
Re: How to get real damage before it has been dealt
Quote:
|
Re: How to get real damage before it has been dealt
Quote:
|
Re: How to get real damage before it has been dealt
Quote:
|
Re: How to get real damage before it has been dealt
You use it like this:
Code:
SDKHook_OnTakeDamageAlive |
All times are GMT -4. The time now is 09:22. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.