Skip to content

Get "previous player health" on player_hurt event #294

Answered by saul
redismx asked this question in Questions
Discussion options

You must be logged in to vote

You can do this by keeping track of every player's last health value when it changes (listen on the entities change event). Let me know if you need a hand with the code.

With that said, are you sure you don't want to track dmg_health? If you have 1hp and I headshot you, it feels wrong to track that as a 1hp hit.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@redismx
Comment options

@freakazzz
Comment options

Answer selected by redismx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants