bazq blackout
A highly optimized, feature-rich blackout system for FiveM. Turn off the city lights and force players to rely on generators and safezones to survive the darkness.
Features
Global Blackout Management
Toggle the entire city's artificial lights with a single command.
Optimized Performance: Idle usage
0.00ms(unified scanner system, event-based toggling).
Static Safezones
Define safe areas using Sphere or PolyZone shapes. Lights remain ON in these zones regardless of the global blackout state.
Dynamic Generators
Functionality:
Toggle On/Off: Turn generators off manually to save fuel.
Maintenance: Generators lose durability over time. Repair them to keep them running.
Fuel System: Real-time consumption. Requires refueling (configurable items).
Synergy Bonus: Stacking generators within range increases their light radius.
Interaction:
Drag & Drop: Move generators manually using
Alt-Eye -> Drag.Towing: Tow generators with specific pickup trucks (model-based restrictions).
Persistence:
Location, Fuel, Durability, and On/Off state are saved automatically to JSON.
Inventory Support
Automatically detects and supports:
ox_inventory
qb-inventory (and variants)
esx_inventory (default)
core_inventory (C8Re)
Dependencies
Required resources:
ox_lib
ox_target
Installation
Configuration
The config.lua contains detailed settings:
Generators: Define models, base radius, drag/tow offsets.
Fuel: Consumption rates, refuel items (
waterby default).Maintenance: Enable/Disable durability, set repair items (
repairkit), decay rates.Towing: Allowed vehicles (e.g.,
bison,sadler), items required.Safezones: List of predefined areas that are always lit.
Commands
/blackout- Toggles the blackout state.
Requires ACE permission: command.blackout
