- Used By
This plugin gives players an always-stocked supply box that never runs out, instantly refilling items as they are taken. Players can open it using a chat command or by holding the use key. Admins can configure multiple item sets, each with its own permission, allowing different player groups to access their own unique armory boxes. Perfect for any pvp and battlefield-focused server.
Permissions
armory.use
- Allows players to open an armory box and take items.armory.admin
- Allows admins to manage armory sets, including creating, editing, and removing stored item lists.
Commands
/armory
- Opens the armory box for the player.
/a.create
- Creates a new armory file./a.edit <number>
- Edits an existing armory file./a.remove <number>
- Removes a specified armory file.
Configuration
JSON:
{
"Version": "1.0.0",
"Open Armory Chat Command": "armory"
}
Open Armory Chat Command
- Defines the command that players use to access the armory box.
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": "blunderbuss",
"Display Name": null,
"Skin Id": 0,
"Amount": 1,
"Blueprint": false
},
]
}
Localization
JSON:
{
"NoPermission": "You do not have permission to use this command.",
"HelpUsage": "Usage:\n- /a.create\n- /a.edit <number>\n- /a.remove <number>",
"SessionInProgress": "Another editing session is in progress. Please close that container first.",
"InvalidNumber": "Please specify a valid number (e.g. /a.edit 2).",
"FileNotFound": "Could not find armory file '{0}'.",
"FileRemoved": "Removed armory file '{0}'.",
"CreateBoxFail": "Failed to create container. Prefab may be missing or invalid.",
"CreatedEmptyFile": "Created a new file '{0}'. Place your items, then close the container to save.",
"FileLoaded": "Loaded file '{0}'. Adjust items and close to save changes.",
"ContainerSaved": "Saved {0} items to file '{1}.",
"MaxArmoriesReached": "You cannot create more than 10 armories.",
"NoArmoryData": "You have no armories available."
}
Developer Hooks
C#:
object CanOpenArmoryBox(BasePlayer player)
- Returning
false
denies opening the box with no message. - Returning a
string
means 'Block, and show this string as a message to the player'. - Returning
null
ortrue
allows the box to open normally.