CounterStrikeSharp icon indicating copy to clipboard operation
CounterStrikeSharp copied to clipboard

[BUG] EventBotTakeover not fired

Open bet0v opened this issue 2 years ago • 4 comments

Hi, when writing this in the Load method of my plugin, I never see the corresponding log RegisterEventHandler<EventBotTakeover>((@event, info) => { Console.WriteLine($"EventBotTakeover"); return HookResult.Continue; }); Wether in Post or Pre HookMode. I'm correctly registering to many other events without issues. Please note that I do see a message in the logs when taking control of a bot (that is weirdly ordered if I'm honest) : Player [BotName] took control bot [PlayerName] ([PlayerIndex])

My goal is to set the bot pawn's health when a player takes control of it (so the new player's pawn). Please tell me if I am trying to use the wrong event to achieve this goal.

Thanks in advance and keep up the good work!

bet0v avatar May 31 '24 22:05 bet0v

Does the event fire if hooked at a later stage? Would you be able to try adding the event handler in the OnMapStart listener and see if that works?

roflmuffin avatar Jul 26 '24 12:07 roflmuffin

This issue has been marked needs-author-action and may be missing some important information.

github-actions[bot] avatar Jul 26 '24 12:07 github-actions[bot]

This issue has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.

github-actions[bot] avatar Aug 10 '24 03:08 github-actions[bot]

This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days.

github-actions[bot] avatar Aug 25 '24 03:08 github-actions[bot]