Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stance update event does not work #67

Open
ReveinOFF opened this issue Aug 7, 2023 · 0 comments
Open

Stance update event does not work #67

ReveinOFF opened this issue Aug 7, 2023 · 0 comments

Comments

@ReveinOFF
Copy link

ReveinOFF commented Aug 7, 2023

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant