Chat UI Pattern with RPC Broadcasting
Chat UI with RPC Broadcasting A Razor UI component for game chat that handles local input, RPC broadcasting, Steam filtering, and automatic message expiration. …
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…
RPC-based chat system with avatars and Steam filtering
RPC-Based Chat System with Avatar Support This example shows a complete chat system using Razor, RPC broadcasting, Steam filtering, and avatar display. Key Feat…
s&box achievement unlocking with Rpc.FilterInclude targeting
s&box Achievement Unlocking with Rpc.FilterInclude This example shows achievement unlocking using s&box's Services.Achievements, Services.Stats, and Rpc.FilterI…
BanSystem Pattern for Player Management
BanSystem - Player Ban Management A GameObjectSystem that manages player bans with persistent storage. Demonstrates , persistence, and RPC commands. Implementat…
PlayerInventory Weapon Switching
PlayerInventory Weapon Switching Weapon switching with host authority and IPlayerEvents delegation. Key Features Sync'd ActiveWeapon with Change callback for ne…
Sync Properties for Networked State
Sync Properties for Multiplayer The attribute automatically synchronizes property values to all clients when they change. Basic Sync Sync Flags Customize sync b…
Randomized Clothing for NPC Citizens using Dresser.Randomize() on Prefabs
Overview This demonstrates how to create NPC citizen prefabs with randomized clothing using the built-in component. Each time the prefab spawns or is enabled, i…
Sandbox: ToolMode system — creating custom Tool Gun modes
ToolMode System — Creating Custom Tool Gun Modes is the base class for all Tool Gun tools in Sandbox. Tools are components on the Toolgun and are enabled/disabl…
Sandbox: BaseCarryable — unified AimRay, WeaponModel resolution, and seat-aware damage
BaseCarryable — Unified Weapon Base with AimRay and Seat Support is the root class for all holdable items. It handles viewmodel/worldmodel management, a unified…
CleanupSystem: Map reset and baseline restoration
CleanupSystem: Map Reset and Baseline Restoration This example shows the CleanupSystem which tracks the baseline scene state and allows resetting the map to its…
GameObject.FindNetworkRoot() extension method
GameObject.FindNetworkRoot() Extension Method This example shows an extension method for finding the network root of a GameObject hierarchy. Usage Example Key F…
Reusable World-Space Interaction Prompt Framework
A small, compartmentalized interaction framework can be built from three pieces: : the base component placed on objects the player can use. : the player-side ra…
DynamiteEntity Explosive Entity Pattern
DynamiteEntity - Simple Explosive Entity A simple explosive entity that can be triggered via damage or player input. Demonstrates , , and prefab cloning pattern…
CleanupSystem Pattern for Map Reset and Scene Management
CleanupSystem - Scene State Management and Map Cleanup A that captures the baseline scene state and allows resetting the map to its original state. Removes spaw…
Playing Sounds
Playing Sounds in s&box s&box provides both 2D and 3D sound playback through code and components. Quick Sound Playback Sound Handle Store the handle to control …