[CS:GO] Detecting player death
Well, the question is simple:
What're your method(s) to detect ALL the deaths of a player? When I say all, it means: > Killed by another player. > Suicide (Using "kill" for example). > Killed by the bomb. > ... ----- OnTakeDamage / HookEvent("player_death") doesn't seem to detect everything. However a combination of both of them should do the trick. I'm currently hooking "CCSPlayer::Event_Killed" (Linux offset: 71) with Dhooks, which seems to detect everything (Disadvantage: the offset can change because of a Valve update - but it shouldn't be all day :bee:). I would like to know if you have other reliable method(s) with or without Dhooks, to see what's available :bacon!:. |
Re: [CS:GO] Detecting player death
|
Re: [CS:GO] Detecting player death
For CS:GO - https://wiki.alliedmods.net/Counter-...s#player_death
I tested it, it doesn't detect the players killed by a bomb (The callback isn't called). PHP Code:
|
Re: [CS:GO] Detecting player death
what about get a c4 entity id and treat it on OnTakeDamage
|
Re: [CS:GO] Detecting player death
[css] player death C4 explosion
https://forums.alliedmods.net/showthread.php?t=179830 Old topic... and code look funny. SDKHook is better way to do it as @Starbish mentioned |
Re: [CS:GO] Detecting player death
Indeed, SDKHook_OnTakeDamage is good to detect deaths by players / bomb. Its only issue is to detect a suicide ("kill", "explode", switch_team, ...).
|
Re: [CS:GO] Detecting player death
Quote:
Then you can look entity with GetEntityClassname is it planted_c4 |
Re: [CS:GO] Detecting player death
lol yes I know, no issue here like I said in #6 to detect player deaths by another entity (player, bomb...) using SDKHook_TakeDamage. The issue is that it doesn't detect everything, aka death by the commands "kill", "explode", switch team (--> Suicide)...
|
Re: [CS:GO] Detecting player death
Indeed.
You maybe can handle OnTakeDamagePost, then check is player alive. If player is still alive, use RequestFrame to check again. *...I'm going to quick look this later, will it work |
Re: [CS:GO] Detecting player death
*indeed not recognize suicide command....
Check this
Spoiler
|
All times are GMT -4. The time now is 18:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.