OnServerInitialized
OnServerInitialized is called by Oxide once the server has fully started and map data is ready, and again with false whenever a plugin is (re)loaded while the server is already running.
void OnServerInitialized(bool initial)Parameters
| Parameter | Type | Description |
|---|---|---|
initial | bool | True when the hook fires once during normal boot after the server finished loading; false when it fires because a plugin was reloaded or hotloaded into an already running server. |
Return value
The return value is ignored. Both call sites treat the hook as void and continue with their own code regardless of what the plugin returns, so there is nothing to influence by returning a value.
How it works
This hook is invoked by Oxide core rather than a patched game method. RustCore.IOnServerInitialized runs after the initial map and world load completes, sets its internal serverInitialized flag and calls OnServerInitialized with that flag (true). The second path, RustCore.OnPluginLoaded, fires when a plugin loads while serverInitialized is already true, passing false – this is what happens on oxide.reload, hotloads and Carbon reloads.
That means initial lets you separate one-time startup work (spawning entities, building caches, scheduling long timers) from re-initialisation after a reload, where the world already reflects earlier runs. Guard against duplicate spawns by checking for existing entities before creating new ones when initial is false.
This is the right place for work that needs the map, world and all plugins to exist: reading BaseNetworkable.serverEntities, requiring permissions, creating data files, and reading config. Do not assume it fires exactly once per process – reloads trigger it again. Keep the hook short; heavy synchronous loops here delay startup.
Example plugin: Broadcast server uptime on a command
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using UnityEngine;
namespace Oxide.Plugins
{
[Info("Server Start Info", "RustPluginGenerator", "1.0.0")]
[Description("Reports server uptime and a configurable server name through a chat command.")]
public class ServerStartInfo : RustPlugin
{
private const string PermUse = "serverstartinfo.use";
private PluginConfig config;
private DateTime startedAt;
private bool bootedFromInitial;
private class PluginConfig
{
[JsonProperty("Server display name")]
public string ServerName = "My Rust Server";
[JsonProperty("Require permission to use the command")]
public bool RequirePermission = true;
}
protected override void LoadDefaultConfig() => config = new PluginConfig();
protected override void LoadConfig()
{
base.LoadConfig();
try
{
config = Config.ReadObject<PluginConfig>();
if (config == null) throw new Exception();
}
catch
{
PrintWarning("Configuration file is invalid, using defaults");
LoadDefaultConfig();
}
SaveConfig();
}
protected override void SaveConfig() => Config.WriteObject(config);
protected override void LoadDefaultMessages()
{
lang.RegisterMessages(new Dictionary<string, string>
{
["Response"] = "{0} - up to {1} hours {2} minutes online (boot: {3}).",
["NoPermission"] = "You do not have permission to use this command."
}, this);
}
private string Msg(string key, string userId = null, params object[] args) => string.Format(lang.GetMessage(key, this, userId), args);
private void Init()
{
permission.RegisterPermission(PermUse, this);
}
private void OnServerInitialized(bool initial)
{
if (initial)
{
startedAt = DateTime.UtcNow;
bootedFromInitial = true;
}
else if (startedAt == default(DateTime))
{
// Plugin was reloaded after boot; keep the process alive time unknown.
startedAt = DateTime.UtcNow;
bootedFromInitial = false;
}
}
[ChatCommand("startinfo")]
private void CmdStartInfo(BasePlayer player, string command, string[] args)
{
if (player == null) return;
if (config.RequirePermission && !permission.UserHasPermission(player.UserIDString, PermUse))
{
player.ChatMessage(Msg("NoPermission", player.UserIDString));
return;
}
var uptime = DateTime.UtcNow - startedAt;
if (uptime.TotalSeconds < 0) uptime = TimeSpan.Zero;
player.ChatMessage(Msg("Response", player.UserIDString,
config.ServerName,
Mathf.FloorToInt((float)uptime.TotalHours),
uptime.Minutes,
bootedFromInitial ? "initial load" : "plugin reload"));
}
}
}The plugin records the startup moment and answers a startinfo chat command with uptime, a configured server name and whether the hook fired on boot or on a reload. OnServerInitialized stores DateTime.UtcNow only when initial is true, so reloading the plugin does not reset the uptime clock. Permissions (serverstartinfo.use) are registered in Init, and all player text goes through the language file. A small config object holds the display name and whether the command is permission gated. No timers or entity spawning are involved, so the hook stays cheap even on repeated reloads.
Common use cases
One-time world setup
Spawn custom monuments, vendor NPCs or supply crates only when
initialis true, and checkBaseNetworkable.serverEntitiesbefore spawning on reloads so you do not double up.Startup logging and reports
Print map size, entity counts and loaded plugin versions to the console once the server is ready, giving admins a clear boot record.
Deferred cache building
Build lookup tables for recyclers, quarries or loot containers that only exist after the map has loaded, refreshing them when the hook fires with false.
Pitfalls
It fires more than once per process
Every reload or hotload of your plugin calls the hook again with
initialfalse. Anything that creates entities or writes data must be idempotent.Do not rely on other plugins being ready
Plugin load order is not guaranteed. If you depend on another plugin via
[PluginReference], check that it is not null here and handle the case where it loads later.Blocking work delays the server
Long loops over
serverEntitiesor large data file writes run synchronously during startup and can cause a connection queue. Cache what you need and spread heavy work over timers.
Plugin recipes that use OnServerInitialized
- How to make a Rust admin command logger plugin (Oxide)Records every console command executed by a player with admin rights into an oxide/data file, optionally echoes it to the server console, and shows the last entries with /adminlog. It hooks OnServerCommand.
- How to make a Rust admin entity remover plugin (raycast kill and prefab killall)Adds an admin-only /kill command that raycast-targets the entity you are looking at and removes it, plus /killall <shortprefabname> which asks for a confirmation within 10 seconds before wiping every matching entity. Uses OnServerInitialized to log readiness and no gameplay hooks.
- How to make a Rust AFK kick plugin (idle timer with warning)Tracks each connected player's movement and look direction with a repeating timer and kicks anyone who stays idle past a configured limit after a chat warning. Exempt permission and a minimum player-count gate are built in.
- How to make a Rust announcement banner plugin (CUI top-screen messages)Adds an /announce chat command that draws a CUI banner at the top of every connected player's screen for a configurable duration, plus timed scheduled banners read from the config. Uses OnPlayerConnected and OnServerInitialized to re-show or start banners.
- How to make a Rust auto broadcast plugin (timed chat announcements)AutoBroadcast sends a list of chat messages to every online player on a repeating timer, in order or random order, and fills {players} and {time} placeholders before sending. It needs only Init to register data paths, OnServerInitialized to start the timer, and Unload to stop it.
- How to make a Rust auto code lock plugin (personal codes)Automatically attaches a code lock with the player's saved personal code to every door or box they place, consuming a code lock from their inventory. Uses OnEntityBuilt plus a stored per-player PIN.
- How to make a Rust auto upgrade on build plugin (grade per player)Lets each player pick a building grade with /up 1-4, then upgrades every building block they place to that grade using resources taken from their inventory. It uses OnEntityBuilt and the BuildingBlock grade system.
- How to make a Rust bounty plugin (scrap bounty pool)A scrap bounty system where players fund a pool on a target and the killer collects it, using the OnEntityDeath hook plus a data file for persistence and team checks to block friendly claims.
- How to make a Rust chat logger plugin (rolling log + search)Records every chat message with timestamp, SteamID, name, channel and text into a capped oxide/data file, and adds a /chatlog command that prints a player's recent messages. Uses the OnPlayerChat hook with BasePlayer, string and Chat.ChatChannel.
- How to make a Rust chat mute plugin (timed, persistent)A timed chat mute plugin: `/mute <player> <minutes> [reason]` stores a mute with an expiry in a data file, `/unmute <player>` clears it, and `OnPlayerChat` blocks global chat from muted players while team and local chat keep working.
- How to make a Rust chat word filter plugin (whole-word asterisk masking)This plugin replaces blocked words in player chat with asterisks using case-insensitive whole-word matching and re-broadcasts the cleaned line under the sender's name. It hooks OnPlayerChat and returns a non-null value to suppress the original message.
- How to make a Rust clan plugin (tag, invite, friendly fire block)Adds a lightweight clan system with /clan create, invite, join, leave and info, stores clans in a data file, prefixes members' chat with their tag and blocks damage between clanmates via OnPlayerChat and OnEntityTakeDamage.
- How to make a Rust command alias plugin (Oxide chat shortcuts)This plugin maps short chat commands like /h and /k to longer ones such as /home and /kit, defined entirely in its config file, using the OnPlayerCommand hook to intercept and reroute the alias.
- How to make a Rust corpse loot protection plugin (solo and team lock)Locks a dead player's corpse and dropped backpack to the owner and their current team for a configurable number of minutes. It watches spawned containers with OnEntitySpawned and blocks other players in CanLootEntity, with a permission-based admin bypass.
- How to make a Rust custom NPC loot plugin (corpse loot tables)Rewrites the items inside corpses left by configured NPCs, using a weighted per-prefab loot table. It uses the OnCorpsePopulate hook, which fires before the corpse's container is filled.
- How to make a Rust daily rewards plugin (Oxide C#)Adds a /daily command that lets each player claim one reward from a configurable weighted list every 24 hours, with a streak bonus that scales while claims stay within 48 hours of each other. Claims and streaks are persisted to oxide/data with the Oxide data file API.
- How to make a Rust day and night control plugin (Oxide/Carbon)Skips or shortens night by advancing the in-game clock to a configurable morning time, and adds /day and /night admin commands. Uses OnServerInitialized and a repeating timer on TOD_Sky.
- How to make a Rust death cause stats plugin (Oxide/Carbon)This plugin records every player death, classifies the cause from the HitInfo passed to OnPlayerDeath, and stores running totals per player so /deaths can print a breakdown of PvP kills, NPCs, animals, falls, drowning, cold and other causes.
- How to make a Rust death penalty plugin (scrap transfer on PvP death)Moves a configurable percentage of a dead player's carried scrap to their killer using OnPlayerDeath, with min/max clamps and separate handling for team kills and NPC kills.
- How to make a Rust default item skins plugin (skin per crafted item)Lets each player store a default skin ID per item shortname with /skin and applies it to every item the player crafts through the OnItemCraftFinished hook. Skins are saved per Steam ID in oxide/data.
- How to make a Rust deployable limits plugin (per-prefab caps with VIP tiers)Caps how many of each deployable (by short prefab name) a player can own, with per-permission-group limits, using OnEntityBuilt to enforce, CanBuild to block placement early, and OnEntityKill plus a startup scan of BaseNetworkable.serverEntities to keep counts accurate.
- How to make a Rust double gather event plugin (scheduled multiplier)Runs scheduled or admin-triggered double gather windows that multiply dispenser and collectible yields for a fixed duration, with start and end announcements. It uses OnDispenserGather and OnCollectiblePickup to scale item amounts.
- How to make a Rust entity cleanup plugin (tool cupboard aware)Adds a console command and an optional timed job that delete configured entity types by short prefab name unless they are inside a tool cupboard range, then reports the removal count. It uses OnServerInitialized to start the timer and BaseNetworkable.serverEntities to scan.
- How to make a Rust farming yield plugin (per-crop multipliers)Multiplies the amount of crops a player receives when harvesting planter crops or wild plants, with a separate multiplier per item shortname. It uses OnGrowableGathered to change the harvested Item amount before it enters the player's inventory.
- How to make a Rust first blood plugin (announce + reward first kill)Announces the first player kill after a restart as First Blood and pays the killer a configured reward. It listens to OnEntityDeath, stores the claim time in oxide/data so it survives restarts, and optionally wipes that data on a new save via OnNewSave.
- How to make a Rust gather bonus plugin (VIP tiers)Gives players with tiered permissions extra resources when they gather from nodes with a ResourceDispenser or pick up collectible entities, using OnDispenserGather and OnCollectiblePickup.
- How to make a Rust gather statistics plugin (wipe totals)Tracks wood, stone, metal ore, sulfur ore and cloth gathered per player for the current wipe, persists the totals in oxide/data, and shows them with /gathered. Uses OnDispenserGathered, OnCollectiblePickup and OnNewSave.
- How to make a Rust give kit plugin (admin /givekit command)This plugin adds an admin /givekit command plus a matching console command that hands a config-defined kit to any online or sleeping player, bypassing cooldowns. It needs no game hooks beyond Init and Loaded-style startup checks and reads kit contents from the config file.
- How to make a Rust god mode plugin (damage immunity + full needs)Adds a permission-gated /god toggle that blocks all damage through OnEntityTakeDamage and keeps health, food and water topped up from a repeating timer. State is dropped in OnPlayerDisconnected.
- How to make a Rust headshot announcement plugin (bonus item on headshot kill)Announces headshot kills in chat with killer, victim, weapon and distance, and grants a configurable bonus item when the shot traveled at least a minimum distance. Uses OnEntityDeath and reads HitInfo.isHeadshot.
- How to make a Rust heli and Bradley loot lock plugin (PvE ownership)Tracks damage dealt to the Patrol Helicopter and Bradley APC per player and locks the crates they drop for a configurable time, allowing only the top damager and their team to loot. Uses OnEntityTakeDamage, OnEntityDeath, OnEntitySpawned and CanLootEntity.
- How to make a Rust high ping kick plugin (Oxide timer and permission)Checks every online player's average network ping on a repeating timer and kicks anyone who stays above the configured limit for three checks in a row. A permission exempts chosen players, and a chat warning is sent before the kick.
- How to make a Rust home teleport plugin (warmup, cooldown, damage cancel)Adds /sethome, /home, /delhome and /homes with per-permission home limits, a warmup timer that is cancelled when the player takes damage, and a teleport cooldown. It uses OnEntityTakeDamage to break the warmup and a per-tick timer for the countdown.
- How to make a Rust horse spawn plugin (Oxide/Carbon cooldown)Adds a /horse command that spawns a ridable horse beside the player, tracks one horse per player, removes that player's previous horse and enforces a permission-gated cooldown. It uses OnEntityKill to forget horses that were destroyed by other means.
- How to make a Rust kill feed plugin (CUI, last 5 kills)Draws a CUI kill feed on the right side of every player's screen showing the last 5 player kills with killer, weapon and victim, using OnEntityDeath. Entries expire after a configurable number of seconds.
- How to make a Rust kill streak plugin (Oxide/Carbon)Tracks consecutive player kills per user, announces configurable milestones in global chat and grants item rewards, then resets the streak when the player dies or disconnects. Uses OnEntityDeath and OnPlayerDisconnected.
- How to make a Rust kits plugin with cooldowns (Oxide/Carbon)Adds permission-aware kits with per-kit cooldowns and per-wipe use limits. Uses OnNewSave to reset stored cooldowns and uses when a new save is created.
- How to make a Rust last seen plugin (Oxide /seen command)Records a timestamp for every player on disconnect and answers /seen <name> with a relative time such as '2 hours ago' or 'online now'. Uses OnPlayerDisconnected, OnPlayerConnected and a data file in oxide/data.
- How to make a Rust leaderboard UI plugin (CUI top 10)Tracks kills, deaths and K/D per player in oxide/data and renders a CUI top-10 board with /top. Uses OnEntityDeath to record kills/deaths and OnServerSave to flush data.
- How to make a Rust locked crate event plugin (timed monument drops)Spawns a hackable locked crate at a random configured monument on a repeating timer, announces the monument in chat, and removes the previous event crate before each new one. Uses OnServerInitialized, OnCrateHack, OnEntityKill and OnServerShutdown with a repeating Oxide timer.
- How to make a Rust longest shot plugin (Oxide/Carbon)Tracks each player's longest projectile kill distance and the server-wide record, saved to oxide/data, with a /longest chat command and an announcement when the server record is beaten. It uses OnPlayerDeath.
- How to make a Rust map grid location plugin (chat /grid command)A /grid chat command that converts a player's world position into a Rust map grid cell (like G12) using the server's world size, with exact coordinates shown only to admins. It uses OnServerInitialized to cache the world size and OnPlayerConnected to announce the player's grid on join.
- How to make a Rust monument build-block plugin (radius zones)Blocks building placement inside a configurable radius of any listed monument, with per-monument radius overrides, using the CanBuild hook and a chat command that reports the nearest monument. The denial message names the monument that caused the block.
- How to make a Rust new player protection plugin (raid protection)Blocks damage to buildings owned by players under a configurable playtime threshold, tracks playtime per player in oxide/data, and removes protection early when the protected player damages another player's base. Uses OnEntityTakeDamage and OnNewSave.
- How to make a Rust no-decay plugin (per-category multipliers)Scales or disables decay damage for building blocks by grade, deployables and vehicles using configurable multipliers. It hooks OnEntityTakeDamage, reads the damage type and the entity type, and returns null when decay should be cancelled.
- How to make a Rust NPC ignore permission plugin (Oxide/Carbon)Adds a permission and a toggle command that make hostile NPCs and animals skip a player when they pick targets. It uses the Oxide OnNpcTarget hook to cancel targeting before the NPC commits.
- How to make a Rust NPC kill counter plugin (scientists and animals)Tracks how many NPCs each player kills, split into scientist and animal totals, stores them in oxide/data, and announces every 100th kill. It uses the OnEntityDeath hook and the /npckills chat command.
- How to make a Rust NPC loot lock plugin (owner + team only)Locks NPC corpses to the killer and their team for a configurable number of seconds after death, then opens them to everyone. Uses OnEntityDeath to record ownership and CanLootEntity to gate looting.
- How to make a Rust NPC spawn points plugin (respawn timers)This plugin lets admins record NPC spawn points with a chat command and keeps a scientist spawned at each point, respawning it N seconds after death. It uses OnEntityDeath to detect kills, OnServerInitialized to respawn saved points, and the Oxide data file system plus a timers-based respawn loop.
- How to make a Rust offline raid protection plugin (cupboard based)Scales damage to building blocks and deployables when every player authorized on the covering tool cupboard has been offline for a configurable delay. Uses OnEntityTakeDamage and OnPlayerDisconnected, with a repeating timer that turns protection on and off.
- How to make a Rust outpost and bandit teleport plugin (/outpost, /bandit)Adds /outpost and /bandit chat commands that warm up, then teleport the player to the Outpost or Bandit Camp monument found by name in TerrainMeta.Path.Monuments, with configurable warmup, cooldown and a permission bypass.
- How to make a Rust patrol helicopter event plugin (admin calls + timer)This plugin spawns a patrol helicopter on demand with /callheli or on a repeating timer, announces the spawn to chat, and broadcasts who destroyed it using OnEntityDeath.
- How to make a Rust player report plugin (Oxide/Carbon /report command)Adds a `/report <player> <reason>` chat command that saves the report with timestamp and reporter, notifies online admins with permission, lists recent reports via `/reports`, and enforces a per-player cooldown. It is built from chat command handlers and data persistence, with no game hooks required.
- How to make a Rust player stats plugin (K/D tracker)A plugin that records kills, deaths, headshots and NPC kills per player in oxide/data, shows them with /stats [player], and optionally wipes the data on a new save. It uses OnEntityDeath to detect who killed whom and OnNewSave to reset on wipe.
- How to make a Rust playtime group promotion plugin (Oxide/Carbon)Tracks each player's connected playtime in oxide/data and moves them into stacked Oxide groups when they cross configured hour thresholds. Uses OnPlayerConnected and OnPlayerDisconnected to start and stop counting.
- How to make a Rust playtime rewards plugin (AFK-safe, Oxide)Pays players configured items every N minutes of active play, skips anyone who has not moved during the interval, and applies a permission-based multiplier for VIPs. Built on OnPlayerConnected, OnPlayerDisconnected and a repeating Oxide timer.
- How to make a Rust private messages plugin (with /ignore)A private messaging plugin that adds /pm, /r and /ignore with a per-player cooldown and a configurable message length limit. It uses the OnPlayerDisconnected hook to clear reply targets and cooldown timers.
- How to make a Rust PvE raid hours plugin (weekly raid windows)Blocks player-versus-player damage and player damage to other players' buildings outside configured weekly raid windows, using OnEntityTakeDamage plus a /raidtime command that reports the next opening.
- How to make a Rust PvP kill log plugin (rolling history + /kills lookup)Records every PvP kill (killer, victim, weapon, distance, headshot flag, position, timestamp) into a capped data file and lets admins read any player's last 10 kills with /kills <name>. Built on the OnPlayerDeath hook.
- How to make a Rust PvP toggle plugin (Oxide/Carbon)Adds a /pvp command that switches each player between PvP and PvE mode with a per-player cooldown, stores the choice in oxide/data, and blocks player-versus-player damage unless both sides have PvP enabled. It uses OnEntityTakeDamage(BasePlayer, HitInfo) to cancel damage.
- How to make a Rust raid alert plugin (chat warnings for base owners)Chat-alerts online owners and tool cupboard authed players when explosives damage their building, with the attacker name and map grid, throttled to one alert per building per minute. It uses OnEntityTakeDamage and reads the building's BuildingPrivlidge list.
- How to make a Rust raid block plugin (block tpr/home after explosives)Places a temporary raid block on attackers and on the owner of a building that takes explosive damage, blocking configured chat commands such as /home and /tpr and printing the remaining time. Uses OnEntityTakeDamage to start the block and OnPlayerCommand to enforce it.
- How to make a Rust raid logger plugin (explosive hit tracking)Logs explosive damage on player buildings to oxide/data, merges nearby hits into single raid events, and lists them with /raids for admins. Uses OnEntityTakeDamage filtered to BuildingBlock hits with Explosion damage.
- How to make a Rust safe PvE zones plugin (spherical, no damage)Creates configurable spherical safe zones where damage between players and to buildings is cancelled, with entry and exit chat notices checked on a repeating timer. It uses OnEntityTakeDamage plus a timer loop.
- How to make a Rust scheduled commands plugin (timed console tasks)A plugin that runs server console commands on a real-world time of day (HH:mm) or every N minutes, with per-entry enable switches, built from config on OnServerInitialized and driven by a single repeating timer.
- How to make a Rust scheduled restarts plugin (daily countdown warnings)Runs the configured server restart command at fixed daily times, broadcasts chat warnings at 15, 10, 5 and 1 minutes, and saves the server right before restarting. Uses timers plus the OnPlayerConnected and OnServerSave hooks.
- How to make a Rust sell items plugin (scrap economy)Adds /sell and /sell all <shortname> chat commands that remove items from a player's inventory and pay configured scrap prices per shortname. It uses item shortnames from your config and the Oxide chat command API; no Rust hooks are required.
- How to make a Rust server currency plugin (Oxide balances + /pay)A wallet plugin that stores per-player balances in a data file, exposes /balance, /pay and admin give/take console commands, saves on OnServerSave, and publishes GetBalance/Deposit/Withdraw for other plugins.
- How to make a Rust server HUD plugin (CUI)Builds a small persistent CUI panel with the server name, online player count and in-game clock, updated from an Oxide timer for every connected player. Visibility is saved per Steam ID with OnPlayerConnected and OnPlayerDisconnected plus the /hud toggle.
- How to make a Rust server info panel plugin (CUI tabs)Builds a tabbed CUI window opened with /info that shows rules, commands and wipe information sourced from the config, with an optional one-time auto-open when a player first connects. Uses OnPlayerConnected plus a chat command and console commands for tab switching.
- How to make a Rust sleeper protection plugin (timed spawn protection)Gives sleeping players a configurable grace period after disconnect during which other players cannot damage them, and optionally blocks looting their body. It uses OnPlayerDisconnected to start the timer, OnEntityTakeDamage to block hits, and CanLootPlayer to deny looting.
- How to make a Rust sleeping bag cooldown plugin (Oxide/Carbon)Overrides the respawn cooldown on sleeping bags and beds to a fixed number of seconds, with a separate shorter cooldown for a VIP permission. Uses OnEntitySpawned, OnPlayerRespawned and a startup sweep in OnServerInitialized.
- How to make a Rust sleeping bag teleport plugin (bag list, warmup, cooldown)Adds /bag, which lists the player's sleeping bags, beds and beach towels with grid references, and /bag <number> to teleport to one after a warmup timer with a per-player cooldown. It relies on the OnEntitySpawned and OnEntityKill hooks to keep an index of placed spawn points.
- How to make a Rust stack size plugin (global, category and per-item multipliers)Rewrites ItemDefinition.stackable on server start using a global multiplier, per-category multipliers and per-item overrides, then restores the original values on unload. Uses OnServerInitialized and Unload.
- How to make a Rust team switch cooldown plugin (leave/kick lockout)Blocks a player from joining a team for N hours after leaving or being kicked, using OnTeamLeave, OnTeamKick and OnTeamAcceptInvite with per-player UTC timestamps saved in oxide/data.
- How to make a Rust team tags in chat plugin (Oxide/Carbon)Lets the leader of a Rust team pick a 2-5 character tag with /tag, stores it per team in oxide/data, and prefixes every team member's chat line with [TAG] inside an OnPlayerChat hook that formats the message.
- How to make a Rust team teleport plugin (/tpteam)Adds a /tpteam <name> command that teleports a player to a teammate after a warmup, with a per-player cooldown and an opt-out toggle via /tpteam off. It compares Player.currentTeam on both players and drives the warmup with Oxide timers.
- How to make a Rust team-only sleeping bag plugin (CanAssignBed)Blocks sleeping bag and bed assignment unless the target player is on the assigner's team (or is the assigner), using the CanAssignBed hook.
- How to make a Rust timed airdrop plugin (Oxide/Carbon)A plugin that spawns a cargo plane supply drop on a repeating timer whenever the online player count meets a minimum, announces the drop in chat, and lets admins call one manually with /airdrop. It uses a repeating Oxide timer, a warm-up tick and OnServerInitialized, plus a chat command and a console status command.
- How to make a Rust top players command plugin (stat leaderboard)Tracks kills, deaths and playtime per player and prints a top 10 leaderboard in chat through /top kills|deaths|playtime. Uses OnEntityDeath and OnPlayerDisconnected.
- How to make a Rust vehicle limit plugin (per player, per type)Caps how many vehicles each player can own per vehicle type, blocking purchases and entity spawns once the limit is reached and allowing higher caps through permissions. It uses OnEntitySpawned and OnEntityKill to count and track vehicles.
- How to make a Rust vehicle owner lock plugin (team sharing)Adds per-vehicle ownership: a player can claim a vehicle with /claim, and only the owner and their team members can mount it. Ownership is enforced in the CanMountEntity hook and handed out when a vehicle is deployed.
- How to make a Rust vehicle recall plugin (despawn command)Adds a /despawn chat command that removes the vehicle the player is looking at when they own it and nobody is mounted, then refunds a configurable item. It uses no Oxide hooks, only a ChatCommand handler.
- How to make a Rust vehicle spawn command plugin (owner-locked)Adds /mini, /scrapheli and /rowboat chat commands that spawn a vehicle in front of the player, with a permission per vehicle, a per-type active limit, cooldowns and OwnerID set on the spawned entity. It uses OnEntityKill to free the player's slot when their vehicle is destroyed.
- How to make a Rust VIP kit plugin (tiered permissions)Adds tiered VIP kits (vip1/vip2/vip3) where every tier has its own permission, item list and cooldown, and /vipkit grants the highest tier the player is allowed to claim. Uses OnServerInitialized to register tier permissions and persists claim times through the Oxide data file.
- How to make a Rust warn system plugin (warning counts with auto kick and ban)A moderator command plugin that records warnings per player in an Oxide data file, lists them, and automatically kicks or bans a player once their warning count reaches configurable thresholds. It uses no game hooks: everything runs through chat commands.
- How to make a Rust warp points plugin (named warps)Adds admin-created named warp points that save to oxide/data, with a /warp and /warps command set, an optional per-warp permission and a shared cooldown. It uses OnServerInitialized for loading, OnPlayerDisconnected to clear cooldown state and a short timer for the countdown.
- How to make a Rust welcome messages plugin (first-join aware)Sends a configurable multi-line private welcome message when a player fully wakes up, with a separate message for players who have never joined the server before. Uses OnPlayerConnected to mark new players and OnPlayerSleepEnded to deliver the text.
- How to make a Rust wipe countdown plugin (UTC schedule)WipeCountdown shows players how long is left until the next wipe, either from a fixed date/time in the config or from the first Thursday of the month at a configured UTC hour. It caches the next wipe on server start, answers /wipe, and broadcasts reminders on a timer.
- How to make a Rust wipe day kit plugin (Oxide)Adds a one-time starter kit that can only be claimed during the first N hours after a map wipe, using OnNewSave to start the window and /wipekit to claim or show it is closed.
Build a plugin with OnServerInitialized
Describe what should happen and get a compiled plugin that uses this hook.
Edit the prompt on the next screen. 2 free plugins a month, no card.
Last updated Oct 26, 2026. Found a mistake? Email support@rustplugingenerator.com.
Build a plugin with OnServerInitialized
Generate