This is the source code of a .NETFramework library written in C#. This library is a plugin made for Unturned 3.24.x+ servers.
A basic zones plugin with database support.
- Unturned 3.24.x or later
- RocketMod installed on the server
- Download the latest release and its libraries from the Releases page.
- Place
TZones.dllinto your server'sRocket/Plugins/directory. - Extract the libraries archive into
Rocket/Librariesdirectory. - Start or restart the server. The plugin will generate a default YAML configuration file on first load.
- Edit the configuration file to your liking, then reload the plugin or restart the server.
| - 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
| 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 | 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 | Description |
|---|---|
NONE |
No specific node type |
UPPER |
Upper bound node |
LOWER |
Lower bound node |
| 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 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
GlobalZoneFlagCheckssection 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.
- .NET Framework 4.8 SDK / targeting pack
- Clone the repository:
git clone https://github.com/TavstalDev/TZones.git - Open
TZones.slnin your IDE. - Build the project:
dotnet build -c Release - The compiled
TZones.dllwill be inTZones/bin/Release/.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for more details.
For issues or feature requests, please use the GitHub issue tracker.