- Works With
The Rust plugin provides players with instant access to virtual storage containers filled with unlimited items. Server admins can create multiple armories with different item sets and control access through permissions. Players can open armories using chat commands or by holding the USE key (configurable). Perfect for any PVP or battlefield-focused server.
Creating Your First Armory
1. Create the armory:2. Add items:
- A storage container opens automatically
- Add items from your inventory or spawn them
- Arrange items as desired
- Close the container when done
- The plugin will tell you the permission (e.g.,
armory.1)
Creating Additional Armories
Repeat the process for different item sets:- Armory #1: Basic starter kit
- Armory #2: PVP loadout
- Armory #3: Building materials
- etc.
Permissions
armory.use- Required to open armories. Players must have this permission AND permission for at least one specific armory to access the system.
armory.N(where N is the armory number)armory.1- Access to armory #1armory.2- Access to armory #2armory.3- Access to armory #3- etc.
armory.admin- Required to use admin commands for creating, editing, and managing armories.
Commands
Player Commands:/arm- Opens the armory interface if the player has permission.
/arma- Displays help information for admin commands./arma create- Creates a new armory and opens a container for item configuration./arma edit <number>- Edits an existing armory's contents./arma remove <number>- Permanently deletes an armory./arma list- Lists all created armories with their details./arma info <number>- Displays detailed information about a specific armory.
Configuration
JSON:
{
"Version": "1.4.0",
"Open Armory Chat Command": "arm",
"Enable Hold Use To Open Armory": false,
"Cooldown Between Opens Seconds": 0.0
}
Open Armory Chat Command- The chat command players use to open armories.Enable Hold Use To Open Armory- When enabled, players can hold the USE key for 3 seconds to open armoriesCooldown Between Opens Seconds- Time in seconds players must wait between opening armories. Set to 0 to disable cooldown.
Stored Data
JSON:
{
"Permission": "armory.1",
"Icon": "assets/prefabs/weapons/smg/smg.icon.png",
"Items": [
{
"Short Name": "rifle.ak",
"Display Name": null,
"Skin Id": 0,
"Amount": 1,
"Blueprint": false
},
{
"Short Name": "ammo.rifle",
"Display Name": null,
"Skin Id": 0,
"Amount": 500,
"Blueprint": false
},
]
}
1.json, 2.json, etc.Icon Customization
Common icon paths:Weapons:
assets/prefabs/weapons/ak47u/ak47u.icon.pngassets/prefabs/weapons/smg/smg.icon.pngassets/prefabs/weapons/bolt rifle/bolt_rifle.icon.png
assets/prefabs/clothes/hat.coffeecan/hat.coffeecan.pngassets/prefabs/clothes/vest.roadsign/vest.roadsign.icon.png
assets/prefabs/ammo/rifle/ammo_rifle.pngassets/prefabs/plants/corn/corn.icon.png
assets/prefabs/weapons/pickaxe/pickaxe.icon.pngassets/prefabs/weapons/bandage/bandage.icon.png
Localization
JSON:
{
"Error.NoPermission": "You do not have permission to use this.",
"Error.OnCooldown": "You must wait {0} before opening another armory.",
"Error.NoArmoryAccess": "You do not have access to any armories.",
"Error.InvalidNumber": "'{0}' is not a valid armory number.",
"Error.NotFound": "Armory #{0} does not exist.",
"Admin.Help": "<size=16><color=#FFD700>Armory Admin Commands</color></size>\n<color=#90EE90>/arma create</color> - Create a new armory\n<color=#90EE90>/arma edit <number></color> - Edit an existing armory\n<color=#90EE90>/arma remove <number></color> - Remove an armory\n<color=#90EE90>/arma list</color> - List all armories\n<color=#90EE90>/arma info <number></color> - View armory details",
"Admin.UnknownCommand": "Unknown command '{0}'. Type <color=#90EE90>/arma</color> for help.",
"Admin.SessionInProgress": "An editing session is already in progress. Close the current container first.",
"Admin.MaxReached": "Maximum number of armories (10) has been reached.",
"Admin.BoxCreateFailed": "Failed to create the armory container.",
"Admin.NoneExist": "No armories have been created yet. Use <color=#90EE90>/arma create</color> to create one.",
"Admin.CannotRemoveWhileEditing": "Cannot remove armory #{0} while it is being edited.",
"Admin.Created": "Created armory <color=#90EE90>#{0}</color> with permission <color=#FFD700>{1}</color>.\nAdd items to the container and close it to save.",
"Admin.EditUsage": "Usage: <color=#90EE90>/arma edit <number></color>\nExample: /arma edit 1",
"Admin.Loaded": "Loaded armory <color=#90EE90>#{0}</color> for editing.\nModify items and close the container to save changes.",
"Admin.Saved": "Saved <color=#90EE90>{0}</color> items to armory <color=#90EE90>#{1}</color>.",
"Admin.RemoveUsage": "Usage: <color=#90EE90>/arma remove <number></color>\nExample: /arma remove 1",
"Admin.Removed": "Removed armory <color=#90EE90>#{0}</color>.",
"Admin.ListHeader": "<size=16><color=#FFD700>Armories</color></size>",
"Admin.ListEntry": " <color=#90EE90>#{0}</color> - {1} items - <color=#FFD700>{2}</color>",
"Admin.InfoUsage": "Usage: <color=#90EE90>/arma info <number></color>\nExample: /arma info 1",
"Admin.InfoHeader": "<size=16><color=#FFD700>Armory #{0}</color></size>",
"Admin.InfoPermission": " Permission: <color=#FFD700>{0}</color>",
"Admin.InfoIcon": " Icon: {0}",
"Admin.InfoItemCount": " Items: <color=#90EE90>{0}</color>",
"Admin.InfoContents": " Contents:",
"Admin.InfoContentEntry": " - {0} x{1}",
"Admin.InfoMoreItems": " <color=#808080>... and {0} more items</color>"
}
Developer Hooks
C#:
object CanOpenArmoryBox(BasePlayer player)
Parameters:
player- The player opening the armory
null- Allow openingfalse- Prevent opening (silent)string- Prevent opening and show message to player
C#:
object CanOpenArmoryBox(BasePlayer player)
{
// Prevent in combat zones
if (IsInCombatZone(player))
return "You cannot open armories in combat zones!";
// Prevent if raiding
if (IsRaiding(player))
return false;
// Allow otherwise
return null;
}
