Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

140 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TZones

Release (latest by date) Workflow Status License Downloads Issues

What is this?

This is the source code of a .NETFramework library written in C#. This library is a plugin made for Unturned 3.24.x+ servers.

Description

A basic zones plugin with database support.

Requirements

  • Unturned 3.24.x or later
  • RocketMod installed on the server

Installation

  1. Download the latest release and its libraries from the Releases page.
  2. Place TZones.dll into your server's Rocket/Plugins/ directory.
  3. Extract the libraries archive into Rocket/Libraries directory.
  4. Start or restart the server. The plugin will generate a default YAML configuration file on first load.
  5. Edit the configuration file to your liking, then reload the plugin or restart the server.

Commands

| - means or
[] - means required
<> - means optional

/flags add [name] [description] Description:
Permission(s): tzones.command.flags, tzones.command.flags.add
/flags list Description:
Permission(s): tzones.command.flags, tzones.command.flags.list
/flags remove [name] Description:
Permission(s): tzones.command.flags, tzones.command.flags.remove
/zones add [zone | node | flag | event | block] Description:
Permission(s): tzones.command.zones, tzones.command.zones.add
/zones list [zone] Description:
Permission(s): tzones.command.zones, tzones.command.zones.list
/zones list [node | flag | event | block] [zoneName] Description:
Permission(s): tzones.command.zones, tzones.command.zones.list
/zones remove [zone | node | flag | event | block] Description:
Permission(s): tzones.command.zones, tzones.command.zones.remove

Default Available Flags

Flag Description
NoDamage No damage is allowed
NoVehicleDamage No vehicle damage is allowed
AllowPlayerDamage Allows player damage.
NoPlayerDamage No player damage is allowed
NoAnimalDamage No animal damage is allowed
NoZombieDamage No zombie damage is allowed
NoTireDamage No tire damage is allowed
NoLockpick No lockpicking is allowed
NoBarricades No barricades can be placed
NoStructures No structures can be placed
NoBarricadeSalvage No barricades can be salvaged
NoStructureSalvage No structures can be salvaged
NoItemEquip No items can be equipped
NoItemUnequip No items can be unequipped
NoItemDrop No items can be dropped
NoEnter No entry is allowed into the zone
NoLeave No exit is allowed from the zone
NoZombie Zombies are not allowed within the zone
InfiniteGenerator The generator in the zone is infinite
NoVehicleCarjack Vehicle carjacking is not allowed
NoVehicleSiphoning Vehicle siphoning is not allowed
NoVehicleEnter Entering vehicles is not allowed
NoVehicleExit Exiting vehicles is not allowed

Event Types

Event Description
MESSAGE_ENTER Triggered when a player enters the zone
MESSAGE_LEAVE Triggered when a player leaves the zone
ADD_GROUP_ENTER Adds a group to the player when they enter the zone
ADD_GROUP_LEAVE Adds a group to the player when they leave the zone
REMOVE_GROUP_ENTER Removes a group from the player when they enter the zone
REMOVE_GROUP_LEAVE Removes a group from the player when they leave the zone
ADD_EFFECT_ENTER Adds an effect to the player when they enter the zone
ADD_EFFECT_LEAVE Adds an effect to the player when they leave the zone
REMOVE_EFFECT_ENTER Removes an effect from the player when they enter the zone
REMOVE_EFFECT_LEAVE Removes an effect from the player when they leave the zone

Node Types

Node Description
NONE No specific node type
UPPER Upper bound node
LOWER Lower bound node

Restriction Types

Restriction Description
BUILD Restricts building
EQUIP Restricts equipping items
UNEQUIP Restricts unequipping items
VEHICLE_ENTER Restricts entering vehicles
VEHICLE_EXIT Restricts exiting vehicles

The __global__ Zone

The __global__ zone is a special zone with no physical boundaries (it has no nodes) that applies its flags server-wide.

  • Create it like any other zone, but you cannot add nodes, events, or remove it.
  • Only flags assigned to it take effect.
  • Each flag's global behavior is controlled by the GlobalZoneFlagChecks section in the config:
Mode Description
ALWAYS The flag is enforced everywhere, even inside other zones
NOT_IN_ZONE The flag is only enforced when the player is not inside any other zone
NEVER The global flag is never enforced

A player is always restricted by a specific zone's flag, regardless of the global mode.

Building from Source

Prerequisites

  • .NET Framework 4.8 SDK / targeting pack

Build Steps

  1. Clone the repository:
    git clone https://github.com/TavstalDev/TZones.git
    
  2. Open TZones.sln in your IDE.
  3. Build the project:
    dotnet build -c Release
    
  4. The compiled TZones.dll will be in TZones/bin/Release/.

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.

Contact

For issues or feature requests, please use the GitHub issue tracker.

About

Unturned 3.x plugin for dynamic virtual zone creation and management.

Topics

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from TavstalDev/TExample