-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
EventBuymenuOpen Missing Userid / CCSPlayerController #533
Comments
Hey, we generate the game event classes based on the contents of the game events file in the vpk file, as seen below. This doesn't seem to have the userid defined. Do you know if the value is valid if you do a manual |
This issue has been marked |
@roflmuffin I tried, but the hook doesn't seem to be working. I don't see my HERE log statement. I've tried both Pre/Post hooks. Maybe I'm doing something dumb. [GameEventHandler(HookMode.Pre)]
public HookResult OnBuymenuOpenPost(EventBuymenuOpen @event, GameEventInfo info)
{
Logger.LogInformation("HERE");
Logger.LogInformation("{player} has opened the buy menu", @event.Get<CCSPlayerController>("userid").PlayerName);
return HookResult.Continue;
} edit: Also tried manually registering the event handler in my Load function, still don't see any logs: RegisterEventHandler<EventBuymenuOpen>((@event, info) =>
{
Logger.LogInformation("HERE");
Logger.LogInformation("{player} has opened the buy menu", @event.Get<CCSPlayerController>("userid").PlayerName);
return HookResult.Continue;
}); |
Searching in your discord, getting the player who opened the buy menu just isn't possible: https://discord.com/channels/1160907911501991946/1160907912445710480/1197209710277963867 Which is really weird in my opinion because the action is so user-specific (and it's provided in the buymenu close event lol), but obviously nothing you can do about it. The hook itself still seems broken since I can get any log statements, but closing as the original issue is resolved. |
According to the docs, EventBuymenuOpen should have the User instance. However, it's missing:
CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/GameEvents.g.cs
Line 944 in 5644921
EventBuymenuClose has it:
CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/GameEvents.g.cs
Line 936 in 5644921
The text was updated successfully, but these errors were encountered: