OnPlayerRevive hook not being calledSolved
Hello, Testing the example code for OnPlayerRevive does not seem to work.

object OnPlayerRevive(BasePlayer reviver, BasePlayer player)
{
string msg = ($"{reviver.displayName} revived {player.displayName}");
Puts(msg);
this.Server.Broadcast(msg);
return null;
}

Repro steps:
using the above code
1. Spawn a player using console command spawn player (also tested with real players)
2. Proceed to bash player in face with rock until wounded.
3. Revive player.. expect to see a message.. but there is none.

Maybe the hook needs to be looked at?

Thanks :)
The hook is only called for a specific event, but is indeed working and called. It's technically when you are assisting the player.

what specific event does it trigger under?

from what the doc says its triggered when a player is revived... so you can cancel the revive?

To be more specific, in game I am doing the following to trigger the hook
using the above code
1. Spawn a player using console command spawn player (also tested with real players)
2. Proceed to bash player in face with rock until wounded, laying on ground but not dead.
3. Holding E on the downed player until he gets back up, expect to see a message.. but there is none?

and this hook is working as intended?
can you provide me in game critera of how to trigger this hook?

I'm not trying to cancel the revive, I'm trying to track the reviving player after a successful assist of a downed player so I can track total revives for players..

the docs description seems misleading..

from what it says I thought it means when I hold E on a downed player

all the other hooks only provide the player being revived.. how can I get the reviving player?

is there an alternative I can use for my goals?

Thanks

It's called when the player is helped up using a medical tool. The hook was likely added and named as such when that may have been the only way at the time if was added.

Thanks for the info, appreciate you taking the time to answer.

Looks like theres no alternative from what I've found, its a shame there isn't a working hook for my needs.

Maybe one day :)

Merged post

Just wanted to post an update incase anyone else is trying to achieve a similar goal and ran into issues.

I have found a hook that suits my needs.

private object OnPlayerAssist(BasePlayer target, BasePlayer reviver)
{
Puts("OnPlayerAssist works!");
return null;
}

 This hook is triggered AFTER a player has successfully been picked up by holding E :)
Locked automatically