Safe Zone Commands

Safe Zone Commands 1.2.1

Sign in to download
Execute and block commands in safe zones
This plugin lets you run commands when players come in or out of safe zones, and also block certain commands from being executed within them.






Permissions

  • safezonecommands.ignore - Allows the player to use commands that are otherwise blocked in the safe zone.

Configuration

JSON:
{
  "Version": "1.2.0",
  "Safe Zones": [
    {
      "Monument Name": "compound",
      "Blacklisted Commands": [
        "kit",
        "tp"
      ],
      "Run Random Command ": false,
      "Commands To Run": [
        {
          "Type": "Chat",
          "Trigger": "Enter",
          "Command": "Hello! {PlayerName} here, currently at {MonumentName} in grid {Grid} to recycle some items."
        },
        {
          "Type": "Client",
          "Trigger": "Leave",
          "Command": "heli.calltome"
        },
        {
          "Type": "Server",
          "Trigger": "Enter",
          "Command": "inventory.giveto {PlayerId} scrap 50"
        }
      ],
      "Enter Message": "Welcome to {MonumentName}, {PlayerName}!",
      "Leave Message": "Goodbye, {PlayerName}. Hope you had a great time at {MonumentName}!"
    }
  ]
}
  • Monument Name- The name of the monument that the safe zone belongs to. The following monuments have safe zones:
    • compound
    • bandit_town
    • fishing_village_a
    • fishing_village_b
    • fishing_village_c
    • stables_a
    • stables_b
  • Blacklisted Commands - A list of chat commands that are blocked within the safe zone.
  • Run Random Command - If set to true, only one random command from the Commands To Run list is executed when the player enters or leaves the safe zone. If false, all commands in the list are executed.
  • Commands To Run- A list of commands that are executed when players enter or exist the safe zone.
    • Type- The type of command to execute.
      • Chat - Sends the command as a chat message.
      • Server - Executes the command on the server.
      • Client - Runs the command directly on the player's client.
    • Trigger - The event that triggers the command (Enter or Leave).
    • Command - The command string to be executed, which can include placeholders such as {PlayerId}, {MonumentName}, etc.
  • Enter Message and Leave Message - Sends a message to the player when they enter or leave the safe zone. The same placeholders used in commands can also be included here.

Command Placeholders

Available placeholders for commands:
  • {PlayerName} - The name of the player.
  • {PlayerId} - The player's id.
  • {MonumentName} - The monument the player has just entered or left.
  • {PositionX}, {PositionY}, {PositionZ} - The player's coordinates.
  • {Grid} - The player's grid location.

Localization

JSON:
{
  "CommandBlocked": "You cannot use this command in the safe zone."
}
Author
VisEntities
Downloads
30
First release
Last update

Ratings

5.00 star(s) 1 reviews

Also by VisEntities

  • Custom Unwrap Rewards
    Custom Unwrap Rewards
    Lets you modify the loot from unwrapable items such as easter eggs and christmas presents
  • Horse Equipment
    Horse Equipment
    Allows horses to be equipped with random gear when they spawn
  • No Stuck Arrows
    No Stuck Arrows
    Fixes arrows and spears remaining stuck on players even after they respawn

Latest updates

  1. 1.2.1

    Patched for December 6th Rust update.
  2. 1.2.0

    Added a config option to run a single random command from the list when a player enters or...
  3. 1.1.0

    You can now set custom messages that players will receive when they enter or leave a safe zone.

Latest reviews

Works like a charm. Thank you for the addition.
Back
Top
This plugin uses Oxide's permission system. Grant or revoke permissions using oxide.grant and oxide.revoke. You can assign them to individual players or groups using their Steam id or group name.
Chat commands start with a /, while console commands can be entered directly in the F1 console or server console. Use find <keyword> in console to search for available commands related to the plugin.
Settings are stored in the config file found under the config/ directory. You can edit this file manually, then reload the plugin to apply your changes.
Persistent data is saved in the data/ directory. This includes things like saved settings, usage stats, or player progress depending on the plugin. Deleting a data file will reset stored progress or customizations.
Language files are located in the lang/ folder. To translate messages, copy the en.json file into your target language folder (e.g. fr, de) and edit the values. Reload the plugin after changes to apply new messages.
This section lists public methods exposed by the plugin for use in other plugins. You can call these via the CallHook method. Make sure the plugin is loaded before calling its API to avoid null reference errors.
These are custom hooks that other plugins can listen for. Simply define a method with the same name and expected parameters in your plugin to handle the event. Hooks are triggered at key moments and are useful for extending or reacting to plugin behavior.
These hooks are injected into the game's code using Harmony. They let the plugin run code at key points in the game's internal logic. You can return values to block or modify behavior. Use with caution — these are powerful and can affect core mechanics.
Cart