Categories
cfx-noisiak-lightbars - Documentation
1️⃣Requirements
| Dependency | Notes |
| ox_lib | Required - used for localization, zones, keybinds, notifications, model loading |
| Framework | One of: ox_core, es_extended, qb-core, qbx_core - or none (custom bridge) |
| Renewed SirenSync | Recommended - improves siren synchronization and stability |
| Luxart Vehicle Control | Optional - only if you use Luxart siren sync |
The script auto-detects your framework on startup - no manual setup required.
2️⃣ Installation
- Drop the
noisiak-lightbarsfolder into yourresources/directory - Add to
server.cfg(afterox_liband framework):
ensure noisiak-lightbars- Configure:
configs/config-shared.luaconfigs/config-vehicles.lua
- Restart the resource or reboot the server
3️⃣ fxmanifest.lua - What to Uncomment
🔊 Luxart Siren Sync
If you are using Luxart Vehicle Control, uncomment:
'modules/bridge-sync/luxart/client.lua', -- UNCOMMENT THIS LINEWithout this → native state bags are used
With Luxart → script syncs usingIsVehicleSirenOn()
4️⃣ Configuration - config-shared.lua
All core settings are located in:
configs/config-shared.lua
👮 Job / Permission Check
Config.Shared.CheckJob = false| Value | Behavior |
false | Anyone in supported vehicle can open menu |
true | Requires job defined in config |
Config.Shared.Jobs = {
['police'] = true,
['mechanic'] = true,
-- ['ambulance'] = 3
}➡️ true = any grade
➡️ number = minimum required grade
🎮 Menu Open Method
Config.Shared.OpenMethod = 'command'| Value | Description |
command | /lightbars |
keybind | Key (default F7) |
radial | ox_lib radial menu |
nil | use export only |
Config.Shared.OpenMethodCommand = 'lightbars'
Config.Shared.OpenMethodKeybind = 'F7'
📍 Zone Restriction
Config.Shared.AccessOnlyInZone = trueIf enabled → menu works only inside defined zones.
Config.Shared.Zones = {
{
name = "mr_pd",
thickness = 4.0,
points = {
vec3(428.0, -1013.0, 29.0),
vec3(426.86, -1031.0, 29.0),
vec3(459.07, -1026.43, 29.0),
vec3(456.10, -1011.94, 29.0),
},
},
}Keybind & radial menu auto-disable outside zones
5️⃣ Framework Bridges
Framework is detected automatically.
Supported Frameworks
| Framework | Resource | Notes |
| Ox Core | ox_core | requires >= 0.21.3 |
| ESX | es_extended | uses job + grade |
| QBCore | qb-core | job + gang + grade |
| QBX | qbx_core | group system |
| Custom | - | see below |
🔧 Internal Format
PlayerData.groups = {
['police'] = 2,
['ballas'] = 0,
}
6️⃣ Custom Bridge
Used if no framework is detected.
📡 Client Events
TriggerClientEvent('noisiak-lightbars:bridge:setGroups', source, {['police'] = 2,})
TriggerClientEvent('noisiak-lightbars:bridge:setGroup', source, 'police', 3)
TriggerClientEvent('noisiak-lightbars:bridge:logout', source)
🖥️ Server Events
TriggerNetEvent('noisiak-lightbars:bridge:setGroups', source, {['police'] = 2,})
TriggerNetEvent('noisiak-lightbars:bridge:setGroup', source, 'police', 3)
TriggerNetEvent('noisiak-lightbars:bridge:logout', source)
🧩 Example Implementation
AddEventHandler('myFramework:playerLoaded', function(source, playerData)
local groups = {
[playerData.job] = playerData.jobGrade,
}
TriggerClientEvent('noisiak-lightbars:bridge:setGroups', source, groups)
TriggerNetEvent('noisiak-lightbars:bridge:setGroups', source, groups)
end)
7️⃣ Exports (API)
🎯 Client
exports['noisiak-lightbars']:OpenMenu()
exports['noisiak-lightbars']:setLightbar(index, ignoreChecks)
local ok, reason = exports['noisiak-lightbars']:CanMakeAction()
Example
RegisterCommand('policelightbar', function()
exports['noisiak-lightbars']:OpenMenu()
end)exports['noisiak-lightbars']:setLightbar(1, true)
8️⃣ Translations
- Located in
locales/ - Included:
en.jsonpl.json
Auto-selected via ox_lib
➕ Add New Language
- Copy:
locales/en.json- Rename:
locales/de.json- Translate values
fxmanifest.lua
files {
'locales/*.json'
}