Armory
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.
Each armory set also has its own unique permission, defined in its configuration. Players must have the corresponding permission to access that specific armory box.

Commands

  • /armory - Opens the armory box for the player.
These commands allow admins to set up and manage armories:
  • /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.
Note: Players can also hold the 'use' key for 3 seconds to open the 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)
Called when a player attempts to open an armory box.
  • 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 or true allows the box to open normally.
  • Like
Reactions: (Manky)sieve
Author
VisEntities
License duration
Unlimited
Price
10.00 USD
First release
Last update

Ratings

0.00 star(s) 0 reviews

Also by VisEntities

  • Remineration
    Remineration
    Spawns additional ore nodes close to mined spots
  • Volcano
    Volcano
    Adds volcanoes that release lava, ash clouds, and debris
  • Advanced Backup
    Advanced Backup
    Creates scheduled backups of your server

Latest updates

  1. 1.1.0

    Added hook CanOpenArmoryBox to let plugins intercept or block players' attempts to open armory...
Back
Top
Cart