SmartlyDressedGames / Legally-Distinct-Missile

Fork of Rocket for Unturned maintained by the game developers.
MIT License
79 stars 29 forks source link

Stance update event does not work #67

Open ReveinOFF opened 1 year ago

ReveinOFF commented 1 year ago

Hey @SDGNelson I create my plugin where I try to do some action when a player's stance is updated but the update doesn't happen and when I downloaded someone else's code where there is some action after stance update to check and it doesn't work there either. For testing I'm just trying to output plain text to the logs so I can see if the event is working or not. I even tested 3 events (2 in UnturnedPlayerEvents and 1 in PlayerStance). When I load the plugin on the server, log in to the server and try to run, get in the car, lie down and sit down, nothing is output in the logs.

protected override void Load() { Instance = this; UnturnedPlayerEvents.OnPlayerUpdateStance += UnturnedPlayerEvents_OnPlayerUpdateStance; } private void UnturnedPlayerEvents_OnPlayerUpdateStance(UnturnedPlayer player, byte stance) { Rocket.Core.Logging.Logger.Log("Stance"); } protected override void Unload() { Instance = null; UnturnedPlayerEvents.OnPlayerUpdateStance -= UnturnedPlayerEvents_OnPlayerUpdateStance; }