[FREE] [STANDALONE] SpaceELS - Optimized ELS & Siren Controller with In-Game UI

Hey everyone! :waving_hand:

Today I’m releasing SpaceELS, a lightweight, standalone, and ultra-optimized Emergency Lighting System (ELS) controller designed for FiveM emergency vehicles.


:glowing_star: Features

  • :high_voltage: Ultra Optimized
  • :light_bulb: Dynamic Environmental Lighting: Optional 3D ground & ambient reflections for immersive roleplay.
  • :control_knobs: In-Game ELS UI: Sleek, clean, interactive control panel (/els or default U).
  • :file_folder: JSON Vehicle Profiles: Easy setup for stages, patterns, and light extras in vehicle_profiles.json.
  • :keyboard: Configurable Controls: Customize stage keys, siren toggles, manual horn, and sound volume.
  • :busts_in_silhouette: Passenger Controls: Optional setting to allow passengers to manage the lighting/siren.

:video_game: Default Controls

Action Key
Toggle ELS UI U
Cycle Light Stage J
Toggle Siren CTRL
Manual Horn E

:package: Installation

  1. Download the resource and place SpaceELS into your server’s resources directory.
  2. Add ensure SpaceELS to your server.cfg.
  3. Configure config.lua and add vehicle profiles in vehicle_profiles.json using the command /controlels
  4. Restart your server or type refresh && start SpaceELS.

:link: Links & Community


:information_source: Resource Details

Code is accessible Yes
Subscription-based No
Lines (approximately) +1200
Requirements None
Support Yes
10 Likes

crazy script, you boomed all ELS systems - and that for free! love it!

2 Likes

thank you :heart:

1 Like

When I want to add stages or use the panel, the script keep freezed and I have to reload it. Someone knows what happened?

1 Like

what do the vehicle profiles need to look like in the .json file?

2 Likes

I Updated the files :heart:

Looks real promising, gotta test this one :victory_hand:

1 Like

good work keep it up

1 Like

nice work.

1 Like

Concept looks solid, so I gave it a try. Short version, facts plus fixes.

Tested on QBCore, current main. Works, but performance degrades over a session and a few things need fixing.

  1. Custom keybinds do nothing. customSirenControl and friends (els.lua 111-134) are set but never read, there is no IsControlJustPressed in the client. Only the four RegisterKeyMapping calls work. Fix: add a control thread that polls the cached controls, or drop the layer and document that keys are set through the FiveM keybind menu. Also KEY_TO_CONTROL maps J to -1, which is invalid.
  2. No cleanup. trackedVehicles, activeEnvVehicles and activeSequencerVehicles are keyed by entity handle and never pruned, and neither loop checks DoesEntityExist. Handles get reused, so a new vehicle inherits the old state, and the sequencer keeps working stale entries, which is where the frame time goes over a longer session. Fix: check DoesEntityExist inside both loops and nil the entry when it fails, or key by network ID.
  3. Sound IDs leak. They are only released in onResourceStop. Fix: release in the same cleanup pass as point 2.
  4. Sender gets its own sync back. Server broadcasts with TriggerClientEvent(-1), so every stage switch runs twice locally, which is the audible stutter. Fix: loop over GetPlayers and skip source, or ignore the event client-side when the netId belongs to a vehicle you control.
  5. Siren enable sets data.stage = 3 without SetupVehicleStageData, so the UI shows stage 3 while no lights run. Fix: call SetupVehicleStageData right after.
  6. isClearingIntersection is only reset if the vehicle still exists after 4200 ms, otherwise it stays true and the feature is dead until restart. The thread also uses GetTargetVehicle instead of the captured veh. Fix: reset unconditionally, use the captured handle.
  7. Server events are unvalidated. netId is never checked against the sender, and saveVehicleProfile / resetVehicleProfile write the file with no permission check, no debounce, no size limit, so any player can wipe all profiles or spam disk writes. Fix: verify the sender owns the entity, gate the two profile events behind an ace permission, and debounce SaveProfiles.
  8. The control disabler and SetVehicleHasMutedSirens apply to every vehicle entered, not just profile vehicles, so the horn is dead in civilian cars and other siren systems get muted. Fix: only run both when GetProfileForVehicle returns a profile.
  9. Airhorn on E collides with the standard interaction key on most frameworks. Suggest a neutral default.
  10. Config keys Command, CommandAlias, StudioCommand, StudioCommandAlias, DefaultKey, AllowPassengers and SoundVolume are never referenced. Either wire them up or remove them.
  11. index.html loads Google Fonts and Font Awesome from CDNs, so restricted clients get an unstyled panel. Ship them locally.
  12. Shipped vehicle_profiles.json is empty, nothing flashes out of the box. A sample profile for one vanilla vehicle would save everyone the first hour.

Happy to retest once some of this lands. Thanks for the work, hoping for fixes soon.

Best regards
NebelRebell

1 Like

You reported these issues on GitHub β€” sorry, I forgot to reply :heart: Thanks! All fixed in the latest version.

1 Like

thx :wink: