auto_stories

s&box MCP Knowledgebase

Documentation, API references, code examples and community knowledge for s&box development.

library_books 595 entries menu_book 352 Documentation code 133 API Reference terminal 100 Code Example groups 10 Community
Results for "Static" 149 results closeClear
codeAPI Reference
May 12, 2026

s&box GamePreferences: ConVar-based user settings with attributes

GamePreferences API Reference GamePreferences is a static class for defining user preferences using ConVar attributes with automatic persistence. Type Signature…

menu_bookDocumentation
May 4, 2026

Sandbox: BanSystem — persistent ban list with INetworkListener.AcceptConnection

Sandbox BanSystem — Persistent Ban List with INetworkListener is a that implements to intercept incoming connections and reject banned players before they join.…

groupsCommunity
May 3, 2026

Project Structure Recommendations

Project Structure Recommendations Community guide for organizing s&box projects based on Facepunch examples and successful community projects. Recommended Folde…

menu_bookDocumentation
May 12, 2026

s&box ServerSettings: Server-controlled settings

ServerSettings Static Class ServerSettings is a static class that defines server-controlled settings replicated to all clients. These ConVars control game-wide …

terminalCode Example
May 4, 2026

Sandbox: Ownable component — prop protection with IPhysgunEvent and IToolgunEvent

Ownable Component — Prop Protection and Physgun/Toolgun Access Control The component tracks which spawned a . It implements and to enforce ownership checks when…

terminalCode Example
May 3, 2026

Ownable Component Pattern for Prop Ownership

Ownable Component - Prop Ownership and Permission System A component that tracks which player spawned an object and enforces ownership-based permissions. Useful…

menu_bookDocumentation
May 12, 2026

s&box WeaponConVars: Global weapon settings

WeaponConVars Static Class WeaponConVars is a static class that defines console variables controlling global weapon behavior in s&box. These ConVars can be set …

menu_bookDocumentation
May 12, 2026

s&box WheelOverlay: Direction arrow overlay

WheelOverlay Static Class WheelOverlay is an internal static class that draws a spinning direction arrow overlay on wheel faces. Used by the Wheel tool to visua…

menu_bookDocumentation
May 12, 2026

s&box NpcConVars: Global NPC AI settings

NpcConVars Static Class NpcConVars is a static class that defines console variables controlling global NPC AI behavior in s&box. These ConVars can be set via co…

menu_bookDocumentation
May 20, 2026

Hotloading Pitfalls: Default Values, Types, Delegates, and Optimization

s&box hotloads code changes live when you save or files. Understanding the pitfalls helps avoid subtle bugs during development. How It Works IL Hotload (Fast): …

terminalCode Example
May 5, 2026

EnvmapProbe — local reflection captures with Static, Dynamic, and OnDemand modes

EnvmapProbe — Reflection Captures in s&box is a built-in s&box component that captures a cubemap at its world position for local specular reflections. The engin…

menu_bookDocumentation
May 20, 2026

CodeGenerator: Compile-Time Method and Property Wrapping via Attributes

The attribute in s&box lets you create custom attributes that wrap methods and properties at compile time. This is the mechanism behind properties and — you can…

terminalCode Example
May 12, 2026

s&box player management with RPC, ConCmd, and Connection APIs

s&box Player Management with RPC, ConCmd, and Connection APIs This example shows player kick/ban utilities using s&box's Connection, RPC, ConCmd, and Chat syste…

menu_bookDocumentation
May 12, 2026

s&box HUD: UI scale factor

HUD Static Class HUD is an internal static class that provides a scale factor for UI elements based on screen resolution. It ensures UI elements scale proportio…

codeAPI Reference
May 12, 2026

s&box ServerSettings: Replicated server-controlled settings

ServerSettings API Reference ServerSettings is a static class for server-controlled settings that are replicated to all clients. Type Signature Example Property…

terminalCode Example
May 5, 2026

Unit tests in s&box — MSTest setup, engine initialization, and component testing

Unit Tests in s&box s&box supports MSTest-based unit tests. Create a directory in your project folder and restart the editor — a test project is generated autom…

terminalCode Example
May 4, 2026

Sandbox: Physgun — grab, freeze, launch, and pull mechanics

Physgun — Grab, Freeze, Launch, and Pull Mechanics The Physgun () is a that lets players grab, move, freeze, and launch physics objects. It uses a struct to tra…

menu_bookDocumentation
May 5, 2026

ActionGraph — visual scripting with action nodes, delegates, and C# integration

ActionGraph — Visual Scripting ActionGraph is s&box's visual scripting system. Nodes represent actions or expressions, and links carry values or signals between…

terminalCode Example
May 3, 2026

BanSystem Pattern for Player Management

BanSystem - Player Ban Management A GameObjectSystem that manages player bans with persistent storage. Demonstrates , persistence, and RPC commands. Implementat…

menu_bookDocumentation
May 12, 2026

s&box DamageTags: Damage type constants

DamageTags Static Class DamageTags is a static class that defines constant string tags used for damage type identification in the s&box damage system. These tag…