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 "PlayerData Player" 14 results closeClear
codeAPI Reference
May 12, 2026

s&box IToolActionEvents: Tool action callbacks

IToolActionEvents Interface API Reference IToolActionEvents allows listening to tool actions across the scene. Implement this on a Component to receive callback…

codeAPI Reference
May 3, 2026

PlayerData Component for Stats and Respawn

PlayerData Component Persistent player data component tracking stats (kills, deaths), respawn state, and providing connection lookup. Key Properties Connection …

terminalCode Example
May 4, 2026

Sandbox: Player spawn flow with PlayerData, events, and NetworkSpawn

Player Spawn Flow in s&box Sandbox The Sandbox game uses a (a ) to handle player connections and spawning. Here's the full pattern: GameManager spawns players o…

codeAPI Reference
May 12, 2026

s&box Global.ISpawnEvents: Spawn event callbacks

Global.ISpawnEvents Interface API Reference Global.ISpawnEvents is an interface for Components that want to listen to spawn events across the scene. Implement t…

terminalCode Example
May 3, 2026

GameManager INetworkListener Pattern

GameManager INetworkListener Pattern Game manager implementing connection lifecycle with player spawning and cleanup. Implemented Interfaces INetworkListener - …

terminalCode Example
May 4, 2026

Sandbox: ISpawner interface — custom spawner pattern with ISpawnEvents

ISpawner Interface — Custom Spawner Pattern The interface defines the contract for anything that can be spawned via the spawn menu. Implementations include , , …

terminalCode Example
May 4, 2026

Sandbox: BaseConstraintToolMode — two-stage constraint creation with IToolActionEvents

BaseConstraintToolMode — Two-Stage Constraint Creation Pattern is the base for all two-point constraint tools (Weld, Rope, BallSocket, Elastic, Hydraulic, NoCol…

codeAPI Reference
May 12, 2026

s&box IToolActionEvents: Tool action event interface

IToolActionEvents API Reference IToolActionEvents is a scene-wide interface for listening to toolgun actions before and after they execute. Type Signature Actio…

codeAPI Reference
May 3, 2026

Global.ISpawnEvents Spawn Event Interface

Global.ISpawnEvents Interface Scene-wide event interface for listening to spawn operations. Implement on components to receive pre/post spawn callbacks. Interfa…

terminalCode Example
May 10, 2026

Extensible Player Data Save Hooks for World Components

This pattern lets gameplay components plug into a player's save/load flow without putting every feature directly inside one large class. The framework has three…

codeAPI Reference
May 3, 2026

Player Component with Static Accessors

Player Component Main player component that manages health, damage, camera, and interfaces with the inventory system. Static Accessors Key Properties HUD Visibi…

codeAPI Reference
May 3, 2026

Player Event Interfaces (Local and Global)

Local.IPlayerEvents and Global.IPlayerEvents Event interfaces for player lifecycle, damage, inventory, and camera events. Local fires to player hierarchy only; …

groupsCommunity
May 4, 2026

Sandbox: Full codebase architecture — systems, player components, weapons, tools, NPCs

Sandbox Codebase Architecture Overview The Facepunch Sandbox game is a large reference implementation. Here's a map of the major systems and how they connect. C…

terminalCode Example
May 3, 2026

HTTP Requests

s&box provides the static class for asynchronous HTTP requests. Allowed URLs Domains only (no IP addresses) permitted on ports: 80, 443, 8080, 8443 Use command …