Zones Manager for Rust

Advanced zone manager for creating in-game zones

Total Downloads: 16,566 - First Release: Apr 3, 2015 - Last Update: Dec 15, 2017 at 10:54 PM

4.93694/5, 111 likes
  1. k1lly0u
    Configuration File:
    Yes
    Commands - Only accessible for players with authlevel 2 or the permission "zonemanager.zone"
    /zone_add
    - Create a new zone on your location
    /zone_edit <zone ID> - Edit the zone with the specified ID
    /zone_list - List all zones with their corresponding zone ID
    /zone_remove <zone ID> - Remove the zone with the specified ID
    /zone_reset - Deletes all zones
    /zone_player <player ID or name> - Display information about the zones the specified player is in
    /zone_stats - Display the count of various entities in all zones

    Permissions
    zonemanager.zone - Allows access to chat/console commands
    zonemanager.ignoreflag.<flagtype> - Allows players to bypass any flag set on a zone. Replace <flagtype> with the flag you wish to ignore

    Zone Flags
    Zone flags are conditions you can apply to a zone.
    To set a zone flag you must first be editing the target zone. You can then apply flags to the zone by typing "/zone <option> <value>"
    You can apply multiple flags in one line by continuing the pattern of <option> <value>

    Flag types:
    Flag name - Values - Description
    • autolights - true/false - Toggles lights on and off automatically depending on the time (time's can be set in the config)
    • eject - true/false - All players will be kicked from the zone when trying to enter it (will not kick players with authlevel 2 and players in the whitelist (for use with other plugins))
    • ejectsleepers - true/false - Players will be moved out of the zone when they go to sleep
    • kill - true/false - Players will be killed when they enter the zone
    • killsleepers - true/false - Players will be killed when they go to sleep
    • nobleed - true/false - Prevent players from bleeding
    • noboxloot - true/false - Prevent players from looting boxes
    • nobuild - true/false - Prevent players from building
    • nochat - true/false - Prevent player from using chat
    • nocollect - true/false - Prevent players from picking up collectables
    • nocorpse - true/false - Remove player corpses if they die
    • nocraft - true/false - Disable crafting in the zone
    • nocup - true/false - Prevent players from placing a Tool Cupboard
    • nodecay - true/false - Stop decay-able entities from taking decay damage
    • nodeploy - true/false - Prevent players from deploying items
    • nodrop - true/false - Removes dropped items
    • nodrown - true/false - Prevent players from drowning
    • nogather - true/false - Prevent players from gathering resources
    • nohelitargeting - true/false - Stops helicopters from targeting players and sends them to a new location
    • nokits - true/false - Prevent players from claiming kits (Kits plugin)
    • nolootspawns - true/false - Prevent loot from spawning in the zone
    • nonpcspawns - true/false - Prevent animals from spawning in the zone
    • nooventoggle - true/false - Prevent players from toggling on/off ovens/lights/fires etc
    • nopickup - true/false - Prevent players from picking up items
    • noplayerloot - true/false - Prevent players from looting other players
    • nopve - true/false - Animals will be invincible to player attacks
    • noremove - true/false - Prevent players using the remove tool (RemoveTool plugin)
    • nosignupdates - true/false - Prevent players from updating signs
    • noshop - true/false - Prevent players from using a shop (GUIShop/ServerRewards)
    • nostability - true/false - Disable structure stability
    • nostash - true/false - Prevent players from hiding a stash
    • nosuicide - true/false - Prevent players from using the suicide command
    • notp - true/false - Prevent players from using teleportation (Teleportation plugin)
    • notrade - true/false - Prevent players from trading (Trade plugin)
    • noturrettargeting - true/false - Stops turrets from targeting players (autoturret/flameturret/guntrap)
    • noupgrade - true/false - Buildings can not be upgraded
    • novending - true/false - Prevent players from using vending machines
    • nowounded - true/false - Skip the wounded state when a player dies
    • npcfreeze - true/false - Stop animals from moving around
    • pvegod - true/false - Players will have PVE god mode
    • pvpgod - true/false - Players will have PVP god mode
    • sleepgod - true/false - Sleeping players will have god mode
    • undestr - true/false - Buildings will not take damage
    Zone options
    There are also zone options that can be set/adjusted in the same way you would set a flag.

    Option - Values - Description
    • name - "Zone Name" - Set the zone name
    • id - "ID number" - Set the zone ID
    • location - "here" or "x y z" - By using the value "here" the zone location will move to your position, otherwise set the position manually by typing the co-ordinates (x y z)
    • radius - Number amount - Set the radius of the zone (if using a sphere shaped zone)
    • size - "width height length" - Set the size of the zone (for use when creating rectangle zones. Be sure to type the width, height and length as numbers representing the size you wish the zone to be
    • rotation - "y rotation" or no value - Rotate a rectangle zone to the Y value specified, or if no value is given it will be the direction you are facing
    • radiation - Number amount - Add radiation to this zone
    • enter_message - "Any message in quotation marks" - Set a message to display to players when they enter the zone
    • leave_message - "Any message in quotation marks" - Set a message to display to players when they leave the zone
    • ejectspawns - "Spawnfile name" - Designate a spawnfile to eject players to as an alternative to teleporting them outside of the zone
    • permission - "Permission name" - Assign a permission to this zone to prevent players without the permission entering it
    • enabled - true/false - Enable or disable this zone

    Example zone creation for an admin house

    /zone_add
    /zone nobuild true nodeploy true name "Admin House" undestr true

    Here you can see we have created a new zone, named it "Admin House" and set the nobuild, nodeploy and undest flags to true. This will stop players from building, deploying items and damaging buildings in the zone

    Config
    Code (C#):
    {
      "AutoLights": { // Autolight timers
        "Lights Off Time": "8.0",
        "Lights On Time": "18.0"
      },
      "Chat": { // Prefix for plugin response's in chat
        "Prefix": "<color=#FA58AC>ZoneManager:</color> "
      },
      "Notifications": { // Use PopupNotifications to display enter and leave messages to players
        "Use Popup Notifications": true
      }
    }
    Hooks
    Code (C#):

    (void) OnEnterZone(string ZoneID, BasePlayer player) // Called when a player enters a zone
    (void) OnExitZone(string ZoneID, BasePlayer player) // Called when a player leaves a zone
     
    API
    Code (C#):
    (bool) CreateOrUpdateZone(string ZoneID, string[] args, Vector3 position = default(Vector3)) // Create or Update a Zone from an external plugin
    // Parameter 1: is the Zone ID that you want (can be a name)
    // Parameter 2: are the options as you would put them in /zone ex:
    // args[0] = "name"
    // args[1] = "Jail"
    // args[2] = "eject"
    // args[3] = "true"
    // args[4] = "enter_message"
    // args[5] = "Welcome to the jail"
    // args[6] = "radius"
    // args[7] = "120"
    // Parameter 3 (optional): is to set or edit the location of the zone
    // Returns true if the zone is valid, else returns false if it was saved but not created (only reason would be that no position for the zone was set)

    (bool) EraseZone(string ZoneID) // Erase a zone by ZoneID or name.
    // Returns true if the zone was deleted or false if the zone doesn't exist

    (List<BasePlayer>) GetPlayersInZone(string ZoneID) // Get the list of players in the specified zone

    (bool) isPlayerInZone(string ZoneID, BasePlayer player) // Returns true if the player is in the specified zone, else returns false

    (bool) AddPlayerToZoneWhitelist(string ZoneID, BasePlayer player) // *Requires zone flag: Eject* Allow the specified player to enter the zone.
    // Returns true if all went accordingly, or false if the zone does not exit

    (bool) RemovePlayerFromZoneWhitelist(string ZoneID, BasePlayer player) // *Requires zone flag: Eject* Revoke access for the specified player to enter the zone. The player will need to leave the zone before they will be ejected.
    // Returns true if all went accordingly, or false if the zone does not exit

    (bool) AddPlayerToZoneKeepinlist(string ZoneID, BasePlayer player) // Will "jail" the player to the specified zone and keep them from leaving. If the player is not already in the zone they will need to be moved before this will take effect.
    // Make sure that if you have the zone flag "eject" set to true that you add the player to the zone whitelist before forcing them inside!
    // Returns true if all went accordingly or false if the zone does not exist

    (bool) RemovePlayerFromZoneKeepinlist(string ZoneID, BasePlayer player) // Will allow previously "jailed" players to leave the zone. This will not teleport the player out of the zone.
    // Returns true if all went accordingly or false if the zone does not exist

    (object) GetZoneRadius(string zoneID) // Returns the radius (float), or null if the zone does not exist.

    (object) GetZoneSize(string zoneID) // Returns the size (Vector3), or null if the zone does not exist.

    (object) GetZoneName(string zoneID) // Returns the zone name (string), or null if the zone does not exist.

    (object) CheckZoneID(string zoneID) // Returns the zone ID (string) if it exists, or null if the zone does not exist.

    (object) GetZoneIDs() // Returns the a string[] or zone ID's, or null if no zones exist.

    (Vector3) GetZoneLocation(string zoneId) // Returns the position of the specified zone, or Vector3.zero if the zone does not exist.

    (bool) EntityHasFlag(BaseEntity entity, string flagString) // Returns true if the entity is in any zone with the specified flag, else returns false

    (string[]) GetPlayerZoneIDs(BasePlayer player) // Returns a string[] of IDs for zones the specified player is currently in, or null if none found
     
    RussianMan, Dharpha, hoppel and 25 others like this.