This script is used to control the sirens of emergency vehicles.
The Q key turns on the siren lights, the Alt key activates the siren sound, and the Y key changes the siren tone. (Keys can be customized via FiveM keybindings and the config file).
The script utilizes FiveM’s Entity State feature for synchronization.
Includes a config option that automatically mutes the siren sound when you exit the vehicle.
Features custom button press sound effects when interacting with the siren keys.
3 siren tones + model-based sound sets — includes separate tone sets for vanilla and ONX/WiseGuy vehicles; vehicles equipped with an ONX lightbar automatically switch to the ONX sound set.
Specially optimized for ONX vehicles:
ONX custom sirens are spawned client-side for each user and attached to the vehicle. Additionally, collisions for these custom sirens are disabled so your target scripts will not falsely detect these custom sirens as vehicles.
Exports are available, allowing you to manage and trigger sirens from your other scripts.
Airhorn behavior: the main siren tone mutes while the airhorn is being pressed and resumes from where it left off once released.
Extras: distant AI police siren sounds are disabled, the radio is blocked in emergency vehicles, the siren stops when the driver exits (configurable), and it includes optional tone synchronization withtgiann-pursuitmode.
Note: You don't necessarily need ONX vehicles to use this script! you can use it with any vehicle.