You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I didn't know how to catch the event when the client sends the command.
What I want to do is that there are times when I need to set sv_cheats to 1 for some cvars that the map changes on its own, so I want to catch such an event and temporarily enable sv_cheats. (This is mainly useful on minigame maps)
At first, I thought of catching the server_cvar event, but if sv_cheats is disabled, cvar is not changed, so no event is issued, so I could not catch it.
I wish there was something like OnClientCommand, but if there is another way please let me know, Thanks!
The text was updated successfully, but these errors were encountered:
okey, i was finally able to accomplish what i wanted on my own.
even if remove the cheat flag from the cvar, the FakeConvar system will still detect the cheat flag so this solution is not useful.
Also, for some reason EntityOutputHook for point_servercommand and logic_auto does not work.
like this:
[EntityOutputHook("point_servercommand(or, logic_auto)","*")]publicHookResultOnHook(CEntityIOOutputoutput,stringname,CEntityInstanceactivator,CEntityInstancecaller,CVariantvalue,floatdelay){Logger.LogInformation("[EntityOutputHook Attribute] point_servercommand with ({name}, {activator}, {caller}, {delay})",name,activator.DesignerName,caller.DesignerName,delay);returnHookResult.Continue;}
in the end, i decided to put a hook on all entities and check the output target type.
i may be doing something wrong or there may be another way, so i will leave the issue open for now.
I didn't know how to catch the event when the client sends the command.
What I want to do is that there are times when I need to set sv_cheats to 1 for some cvars that the map changes on its own, so I want to catch such an event and temporarily enable sv_cheats. (This is mainly useful on minigame maps)
At first, I thought of catching the server_cvar event, but if sv_cheats is disabled, cvar is not changed, so no event is issued, so I could not catch it.
I wish there was something like OnClientCommand, but if there is another way please let me know, Thanks!
The text was updated successfully, but these errors were encountered: