GCMod

Secure Zone

gcm_secureZone is a flexible zone management system for FiveM servers that allows staff to create, edit, and delete Safe Zones and Red Zones directly in-game using a polygon-based editor.



Overview

The Secure Zone system gives administrators full control over server zone behavior, allowing them to configure protected areas or combat-enabled zones with customizable rules.

Core Features

  • Polygon Zone Editor – Create and modify zones directly in-game using an interactive map editor.
  • Safe Zones & Red Zones – Configure zones for protected areas or combat-enabled regions.
  • Per-Zone Behavior Settings – Customize gameplay rules per zone.
  • Staff Administration Panel – Manage zones through an in-game admin interface.
  • Persistent Storage – All zones are stored in MySQL and automatically loaded on server start.

Zone Behavior Options

Each zone can be configured with custom gameplay rules, including:

  • Damage restrictions
  • Weapon disarming
  • Player collision settings
  • Vehicle speed limits
  • Whitelist access rules
  • HUD notifications
  • Map blip visibility

Runtime Architecture

The system is designed to integrate easily with common FiveM server frameworks.

Framework Detection

The resource automatically detects the framework in use:

  • qbx_core
  • qb-core
  • es_extended

Framework detection is handled automatically during resource initialization in init.lua.

Core Dependencies

Required libraries used by the resource:

  • ox_lib
  • oxmysql

UI System

The zone editor interface is built using a Vue-based UI application, served from: web/dist

Database Persistence

All zones are stored in the following table: gcm_securezone

This table contains polygon coordinates, zone settings, and configuration data.


System Flow

The Secure Zone lifecycle operates as follows:

  1. The resource starts and verifies the database structure.
  2. Zone data is loaded from the gcm_securezone table into the zone manager.
  3. Staff members open the admin panel using the /securezone command (default).
  4. Zone creation, editing, or deletion updates the database and synchronizes changes with connected clients.
  5. While players are inside zone polygons, the client runtime applies the configured zone behavior rules.

Secure Zones allow administrators to dynamically control gameplay areas while maintaining server safety and gameplay balance.