xgaming.tools

s&box ConCmd / ConVar Generator

Generate s&box [ConCmd] console-command and [ConVar] console-variable C# snippets. All 11 ConVarFlags (Server, Saved, Replicated, Cheat, UserInfo, Hidden, Admin, GameSetting, etc.) pulled live from the official Facepunch C# API schema. Optional Connection caller hook for admin-tracking, plus Help / Min / Max constraints for variables. The backbone of every s&box admin script and debug tool.

ConCmd marks a static method as a console command. Players or admins type the command name in the in-game console to fire it.

Console name (case-insensitive). The C# method name is generated as PascalCase + "Command".

The engine auto-converts string console input to the parameter types you declare.

Flags accepted by both [ConCmd] and [ConVar] — pulled from the s&box C# API schema (Sandbox.ConVarFlags).

Tip: Mark commands you want only the server to execute with ConVarFlags.Server. Pair with the "Connection caller" checkbox above so you can tell which client triggered it.

What are ConCmds and ConVars in s&box?

s&box exposes admin commands, debug toggles, and runtime config through the Source-engine-style console. Anything tagged with [ConCmd] becomes a callable command (e.g. kick <steamId>). Anything tagged with [ConVar] becomes a settable variable (e.g. sv_cheats 1). They're the backbone of every server admin tool — moderation, balance tweaks, performance flags, debug helpers.

Both attributes accept a flag bitmask of ConVarFlagsvalues. The flag list above is pulled directly from the s&box C# API schema, so it's guaranteed to match the engine — no drift.

ConVarFlags Reference

FlagPurpose
ConVarFlags.None(no description)
ConVarFlags.SavedSaved and restored between sessions
ConVarFlags.ReplicatedThe value of this is synced on a server. Only the server or server admins may change the value.
ConVarFlags.CheatThis is a cheat command, don't run it unless cheats are enabled
ConVarFlags.UserInfoAdds to userinfo - making it accessible via the connection class on other clients
ConVarFlags.HiddenHide in find and autocomplete
ConVarFlags.ChangeNoticeTell clients when the value changes
ConVarFlags.ProtectedCan't be accessed via game code (can be changed manually via console, or tools)
ConVarFlags.ServerThis command will be run on the server in a multiplayer game
ConVarFlags.AdminOnly an admin of the server can run this command
ConVarFlags.GameSettingA game setting that is exposed to the platform for UI editing

Common Patterns

Server-only admin command with caller info

[ConCmd( "kick", ConVarFlags.Server | ConVarFlags.Admin )]
static void KickCommand( Connection caller, string steamId )
{
    if ( caller is null || !caller.HasPermission( "kick" ) )
    {
        Log.Warning( $"{caller?.DisplayName} tried to kick without permission" );
        return;
    }

    var target = Connection.All.FirstOrDefault( c => c.SteamId.ToString() == steamId );
    if ( target is null )
    {
        Log.Info( $"No player with SteamID {steamId}" );
        return;
    }

    target.Kick( $"Kicked by {caller.DisplayName}" );
}

Replicated server config

[ConVar( "sv_max_players", ConVarFlags.Server | ConVarFlags.Replicated, Help = "Soft cap on connected players", Min = 1f, Max = 64f )]
public static int MaxPlayers { get; set; } = 32;

Saved local preference

[ConVar( "ui_show_fps", ConVarFlags.Saved )]
public static bool ShowFps { get; set; } = false;

s&box ConCmd / ConVar Generator — FAQ

Is this s&box ConCmd / ConVar Generator free to use?

Yes, the s&box ConCmd / ConVar Generator is 100% free — no signup required, no hidden fees, no downloads. Everything runs in your browser.

How accurate is the s&box ConCmd / ConVar Generator?

Values are pulled from the s&box game files and community-verified formulas. Results match what you see in-game, and we update the tool when the game gets major patches.

Can I host a s&box server with XGamingServer?

Yes. XGamingServer offers instant s&box server hosting with mod support, automatic backups, DDoS protection, and 24/7 support. All popular game settings are pre-configured.

Does the ConCmd / ConVar Generator work on mobile?

Yes, the ConCmd / ConVar Generator is fully responsive and works on desktop, tablet, and mobile browsers.

You might also need

Built-In Tool

Config Tool Built Into XGamingServer

Get managed s&box hosting with this tool in your panel — configure, deploy, and play in minutes. No file uploads needed.

Built-In Config ToolInstant Server SetupDDoS ProtectionExpert 24/7 Support
Get 40% OFFNo setup fees · Cancel anytime