diff --git a/managed/CounterStrikeSharp.API/ConVarFlags.cs b/managed/CounterStrikeSharp.API/ConVarFlags.cs index a8a291009..726022a14 100644 --- a/managed/CounterStrikeSharp.API/ConVarFlags.cs +++ b/managed/CounterStrikeSharp.API/ConVarFlags.cs @@ -22,11 +22,21 @@ namespace CounterStrikeSharp.API { [Flags] public enum ConVarFlags - { + { None = 0, Unregistered = (1 << 0), DevelopmentOnly = (1 << 1), Notify = (1 << 8), - Replicated = (1<<13) + Replicated = (1 << 13) } -} + + public enum ConCommandFlags + { + FCVAR_LINKED_CONCOMMAND = (1 << 0), + + FCVAR_DEVELOPMENTONLY = + (1 << 1), // Hidden in released products. Flag is removed automatically if ALLOW_DEVELOPMENT_CVARS is defined. + FCVAR_GAMEDLL = (1 << 2), // defined by the game DLL + FCVAR_CLIENTDLL = (1 << 3), // defined by the client DLL + } +} \ No newline at end of file diff --git a/managed/CounterStrikeSharp.API/Core/BasePlugin.cs b/managed/CounterStrikeSharp.API/Core/BasePlugin.cs index b613fab2b..b85ee5e9e 100644 --- a/managed/CounterStrikeSharp.API/Core/BasePlugin.cs +++ b/managed/CounterStrikeSharp.API/Core/BasePlugin.cs @@ -147,7 +147,7 @@ public void AddCommand(string name, string description, CommandInfo.CommandCallb }); var subscriber = new CallbackSubscriber(handler, wrappedHandler, () => { RemoveCommand(name, handler); }); - NativeAPI.AddCommand(name, description, false, 0, subscriber.GetInputArgument()); + NativeAPI.AddCommand(name, description, false, (int)ConCommandFlags.FCVAR_LINKED_CONCOMMAND, subscriber.GetInputArgument()); CommandHandlers[handler] = subscriber; }