Storms System
gcm_storms is a session-based battle storm event system for FiveM servers.
It features join zones, shrinking storm circles, configurable kits and rewards, preset management, and a full admin control panel for managing storm events.
Overview
The Storms System allows administrators to run battle-style event sessions where players fight inside a dynamically shrinking zone until a winner is determined.
Core Features
- Storm Instances – Creates storm sessions with unique IDs and isolated routing buckets.
- Player Lifecycle Management – Handles join/leave logic, player lives, kill feed updates, and winner detection.
- Shrinking Storm Circle – Play zone shrinks over multiple stages while applying damage outside the zone.
- Configurable Loadouts – Players receive predefined kits when the storm starts.
- Reward System – Winners can receive configurable rewards.
- Preset Management – Save and reuse storm configurations.
- Admin Control Panel – Manage storms through a NUI interface.
Runtime Architecture
The system is designed to run efficiently within common FiveM server environments.
Core Dependencies
Required libraries used by the resource:
ox_liboxmysql
Database Persistence
Storm configuration presets are stored in the following database table: gcm_storm_presets
These presets allow administrators to quickly deploy previously configured storm setups.
State Synchronization
The system uses FiveM statebags to synchronize storm data between server and clients.
Key state values include:
stormData
These states manage storm visibility, player counts, and in-game zone markers.
User Interface
The system includes:
- NUI management panel for creating and controlling storms
- In-game HUD elements for storm status
- Map markers and overlays to visualize the storm circle
System Flow
The Storm event lifecycle operates as follows:
- An administrator creates a storm session or preset using the NUI control panel.
- Players enter the entry zone and join the storm before the start timer expires.
- The storm begins in a dedicated routing bucket, players receive their kits, and the play zone starts shrinking.
- Player lives and kills are tracked through server logic and state synchronization.
- Once a single player or team remains, the winner is determined and rewards are granted.
- The storm session is cleaned up and players are returned to the normal server state.
Storms create dynamic PvP events where players must survive the shrinking battlefield.