al_lightbars is a lightbar, siren, and airhorn resource that has support for custom attached lightbars that support the new GTA lightbar mod option.
It supports:
- attached lightbar objects
- synced emergency lights
- synced script sirens
- synced airhorn
- per-model siren overrides
- per-lightbar siren overrides
ox_lib
Q= toggle emergency lightsLeft Alt= toggle siren on/offR= cycle siren tone, or temporary wail when siren is offE= airhorn
All of these are configurable in shared/config.lua.
Emergency keybinds (lights, siren toggle, tone / temp wail, airhorn) are ignored while sirenKeysBlocked() is true. This can be changed in client/keybinds.lua
| Option | What it does |
|---|---|
useAttachedLightbarObjects |
Spawn roof lightbar objects for custom lightbar IDs (ONX support). false = siren/audio only, no objects. |
checkIntervalSpeed |
ms between main loop ticks while you have at least one lightbar object attached. |
lightbarScanInterval / lightbarScanRange |
How often / how far to scan for other vehicles that need a lightbar object. |
sirenCycleTurnsOn |
true: Lights on, siren off: true = pressing R turns the siren on and cycles the tone once. false: same case = hold R temp wail. With siren already on, R still cycles tone. |
sirenShutOff |
Driver exits seat, then siren + airhorn gets shut off. |
muteSirenWhenAirhorn |
While airhorn is held, siren audio is muted. |
useEngineHealth / damagedSiren |
Below threshold = broken siren sound; which health to use. |
keybinds / keyFeedback |
Input mapper names + optional sound feedback on press. |
lightbarModels |
Slot 49 mod index (Lightbar customisation mod option), object model hash (ONX defaults in repo config). |
sirenConfig.sounds |
Master list: name + siren audio name; optional ref / bank for add-on packs. |
sirenConfig.profiles |
Named sets (POLICE, AMBULANCE, …): sirens = tone order (names from sounds), horn = which sounds entry for airhorn. |
sirenConfig.overrides |
Map vehicle model hash → profiles key (e.g. ambulance models = "AMBULANCE"). |
sirenConfig.lightbarOverrides |
Lightbar mod index → profile key (same indices as lightbarModels when using that system). |
Replacing onx-evp-b-lightbars (If you don't use ONX's lightbar system / pack, then ignore this part)
al_lightbars can replace the scripted behavior from onx-evp-b-lightbars.
To make this compatible with ONX's resource:
- keep the ONX resource for models / meta / stream files
- remove the ONX Lua logic
al_lightbarswill then handle lights, sirens, airhorn and lightbar vehicle objects
- Keep
onx-evp-b-lightbarsas an asset-only resource - Remove
client,server, andsharedscript folders from the ONX resource - Keep only the streamed assets and the data folder, along with the version.lua
- Start
onx-evp-b-lightbarsbeforeal_lightbars.
Expected ONX layout after removing the extra files:
onx-evp-b-lightbars/
├── data/
│ ├── handling.meta
│ ├── vehicles.meta
│ └── carvariations.meta
├── stream/
├── .fxap
└── fxmanifest.lua
└── version.lua
Example asset-only + version.lua check fxmanifest.lua for onx-evp-b-lightbars:
fx_version 'cerulean'
game 'gta5'
author 'ONX'
description 'WiseGuy Emergency Vehicles Pack Lightbars'
version '1.3.0'
lua54 'yes'
data_file 'HANDLING_FILE' 'data/handling.meta'
data_file 'VEHICLE_METADATA_FILE' 'data/vehicles.meta'
data_file 'VEHICLE_VARIATION_FILE' 'data/carvariations.meta'
files {
'data/*.meta'
}
client_scripts {
'data/vehicle_names.lua',
}
server_scripts {
'version.lua',
}
escrow_ignore {
'data/*.meta',
'stream/*.ytd',
'data/*.lua',
}
dependency '/assetpacks'Resource start order:
ensure ox_lib
ensure onx-evp-b-lightbars
ensure al_lightbars-
This resource supports vehicles using the new lightbar mod customisation slot for lightbars.
-
If
useAttachedLightbarObjectsis disabled, the siren system still works like normal, but that will disable the support for the custom lightbar models spawned. -
Support: questions and bug reports - AutLaaw Discord
- Some logic was inspired / taken from Renewed-Sirensync, credits goes to the maintainers of that resource.