Hello, I have this code:
Code:void OnPlayerDie(BasePlayer player, HitInfo info) { Puts("OnPlayerDie works!"); } void OnPlayerRecover(BasePlayer player) { Puts("OnPlayerRecover works!"); }
If the player is dropped and raised, everything is fine, the OnPlayerRecover hook is working.
But if a player just kills, there will be such an order in the console:
Code:OnPlayerDie works! OnPlayerRecover works!
Why? Is it a feature or a bug? Thanks for the answer!
OnPlayerRecover with OnPlayerDie
Discussion in 'Rust Development' started by Kostya Aghanim, Oct 17, 2017.
-
Can anyone tell me please?
@Wulf <3 -
Wulf Community Admin
So your concern is just the order of the hooks?
-
Hello! Thanks for your reply!
No, the main problem is, why does the hook work out at death OnPlayerRecover -
Wulf Community Admin
-
OK thank you very much!
I'll just add a health check.
I just asked a question, after reading the documentation
Code:Called when the player is about to recover from the ‘wounded’ state
issue is closed