bazq Tebex | bazq Tebex | bazq-blackout | Blackout with Safezones and Generators
Docsbazq-blackout | Blackout with Safezones and Generators
Packages
bazq-blackout | Blackout with Safezones and Generators
A highly optimized, feature-rich, and Multiframework blackout system for FiveM.
A highly optimized, feature-rich, and Multiframework blackout system for FiveM. Turn off the city lights and force players to rely on generators and safezones to survive the darkness.
TIP
This script is fully compatible with ox_inventory, qb-inventory, and esx_inventory. It supports metadata out of the box for maintenance items.
🚀 Features
Multiframework Excellence: Native compatibility with Qbox, QB-Core, ESX, and Ox-Core.
Universal Target Bridge: A robust interop layer that makes and behave identically.
bazq-cradle
ox_target
qb-target
Global Blackout Management: Toggle the entire city's artificial lights with a single command.
Retrieves active generators or solar panels. If coords is provided, returns those nearby. If coords is nil, returns all active generators on the server.
maxDistance (number|nil): Optional. Proximity check radius. If nil, the generator's configured radius is used.
Returns:
generators (table): A list of tables containing active generator data.
lua
-- Get all active generators on the serverlocal allActive = exports['bazq-blackout']:getActiveGenerators()print("Total active generators:",#allActive)-- Get active generators within 100 meters of coordinateslocal nearbyGens = exports['bazq-blackout']:getActiveGenerators(coords,100.0)
Client Exports
isBlackoutActive() [Client]
Returns true if the blackout is active on the client.
lua
if exports['bazq-blackout']:isBlackoutActive()thenprint("It's dark outside!")end
isNearGenerator()
Returns true if the player is currently inside a powered area (near a working generator or in a static safezone).
lua
if exports['bazq-blackout']:isNearGenerator()then-- Do something that requires powerend
getNearbyGenerators()
Returns a list of generators currently being tracked by the client's scanner.
lua
local generators = exports['bazq-blackout']:getNearbyGenerators()for _, gen inipairs(generators)doprint('Found Generator at:', gen.coords,'Fuel:', gen.fuel)end
openCrafting(target)
Opens the crafting menu.
target: (entity|table|nil) Optional entity handle or target data table to position the camera/player.
lua
-- Open without entity (uses player front)exports['bazq-blackout']:openCrafting()-- Open with specific entityexports['bazq-blackout']:openCrafting(entity)
StartSkillCheck(difficulty, keys, type)
Triggers the built-in skill check minigame.
difficulty: 'easy', 'medium', or 'hard'.
keys: Table of keys to use (e.g., {'e'}).
type: Internal id (1, 2, or 3).
lua
local success = exports['bazq-blackout']:StartSkillCheck('medium',{'e'},2)if success thenprint("Success!")end
Modular Interop
Use the files in the shared/ folder to add custom logic without touching the core script. These files are open-source and will not be overwritten by Escrow.