05.02.2018, 14:55
Falling damage isn't a given damage, it's a taken by the looks.
So you need to add in OnPlayerTakeDamage and check for the fall, and modify the health variable accordingly. That should make the variable track better.
And probably that is what you need to do in this (OnPlayerTakeDamage) callback... Check for invalid_player_id and use that to check for the fall. Just be careful and use output to the chat so you can check if it'll malfunction at all.
Ideally if you were to debug, you could output the damage information of everything (Give,Take,Death) to the chatlog so you can see what it's picking up.
So you need to add in OnPlayerTakeDamage and check for the fall, and modify the health variable accordingly. That should make the variable track better.
Код:
if(issuerid == INVALID_PLAYER_ID) { // code here }
Ideally if you were to debug, you could output the damage information of everything (Give,Take,Death) to the chatlog so you can see what it's picking up.