Skip to content
This page was translated from German using AI. If anything is unclear, the German version applies.

Server dev / extending

This page is aimed at server developers who want to integrate hm_ELSPlus into other scripts or extend it.

ExportReturns
IsElsVehicle(vehicle)true if the vehicle has an ELS or attachment config
IsBlueLightActive(vehicle)true if the emergency lights are on
HasNoFlashConfig(vehicle)true if “Ignored by speed cameras” is set for the vehicle
IsNoFlashActive(vehicle)true if NoFlash is set and the emergency lights are on

From version 1.9.3 additionally, on the client only:

ExportReturns
IsHotbarGesperrt()true while the hotbar lock is active for your own player (they are sitting in an ELS vehicle and the server mod is on)

For speed camera and radar scripts:

local function shouldFlash(vehicle)
if GetResourceState('hm_ELSPlus') == 'started'
and exports['hm_ELSPlus']:IsNoFlashActive(vehicle) then
return false
end
return true
end

All states are stored as state bags on the vehicle and can be read on client and server:

State bagMeaning
els_primary, els_ppl, els_secondary, els_tertiaryEmergency lights, PPL, front flashers, 3rd beacon
els_rearWarning, els_scene, els_interior, els_traumaRear warning, scene light, interior, trauma
els_matrix, els_matrix2, els_matrix3Matrix displays
els_estelle, els_kennleuchteIncident scene (E-Stelle), beacon mounted
els_siren_1, els_siren_2, els_siren_3Siren tones
els_pattern_indexActive pattern level (1–3)
els_att_modeLight colour of the attachments (blue / orange)
elsAttachmentsList of spawned attachments on the carrier vehicle
isElsPlusAttachmentOn the attachment itself: true if the entity is an ELS attachment (see Reading attachments)
local st = Entity(vehicle).state
if st.els_primary and st.els_siren_1 then
-- emergency run with tone 1
end

There is no dedicated siren export; the siren state bags are sufficient for that.

EventSideParameters
hm_ELSPlus:estelleClienton, netId, vehicle – incident scene mode was toggled
hm_ELSPlus:estelleServersource, netId, on
HM_ELSPlus:hotbarSperreClientgesperrt (true/false) – from 1.9.3: the hotbar lock turns on (getting into an ELS vehicle) or off

With the hotbar event another inventory can switch off its own quick slots in ELS vehicles (ELS Plus locks ox_inventory directly):

AddEventHandler('HM_ELSPlus:hotbarSperre', function(gesperrt)
-- lock your own hotbar (true) or release it again (false)
end)

You create your own control panel buttons and events without code under Templates → Actions & events. Client events receive netId, vehicle, server events source, netId.

config/
├─ einstellungen.lua settings from Server Mods → Server Settings and Templates (colours, groups) – takes precedence
├─ sirens.lua siren system, WM-Sirens, GTA tones, OISS presets (Templates → Siren packs)
├─ main.lua base values: keys, groups, control panels (ELSPlus.Skins), performance
├─ patterns.lua base patterns (steady, off) and base colours
├─ fahrzeuge/ ELS vehicles (one file per vehicle)
├─ attachments/ attachment configs per model or licence plate
├─ anbauteil_templates/ attachment templates
├─ layouts/ control panel layouts
├─ daten/ further editor data: aktionen, bedienteile, patterns, pattern_packs, pattern_groups,
│ sirenen_profile, servermods, stromversorgung, absaugung (from 1.9.3), datenschreiber,
│ rechte, streamdeck_profile
├─ gebaeude/ from 1.9.3: building configs (one file per building), LIESMICH.txt, _export/ (export, backups)
└─ intern/ maintained automatically, do not edit by hand: addon_registry, udr_berichte, backups
locales/ from 1.9.3: language files de.json, en.json and your own

All files are written by the editor. The Lua files at the top are commented and may also be edited by hand.

From version 1.9.3 all texts are in locales/<code>.json: a flat list "key": "Text"; placeholders are in curly braces (e.g. {name}) and must be kept when translating. If a key is missing in the chosen language, the text from de.json applies. If a file is not valid JSON, the server console reports it and German applies. Selection and your own language: Server mods → Language.

From version 1.9.3 an MLO can ship its own building config. ELS Plus then loads it automatically, even if the MLO starts after ELS; if the MLO is stopped, the points disappear again.

  1. Set up the building in-game (Supply → + Building, set the room in game, place the points). ELS saves it as config/gebaeude/<id>.json.
  2. Copy the file into the MLO’s folder as els_gebaeude.json.
  3. Add this to the MLO’s fxmanifest.lua:
els_gebaeude 'els_gebaeude.json'
files { 'els_gebaeude.json' }

Several buildings: several els_gebaeude lines, or a JSON array with several buildings in one file. In the tablet such buildings are read-only; admins switch them on or off or create a Local copy. The data format is described in config/gebaeude/LIESMICH.txt (German).

In config/sirens.lua you choose the system:

ELSPlus.SirenSystem = "WM" -- WM-Sirens
-- or
ELSPlus.SirenSystem = "ServerSided" -- OISS with presets (ELSPlus.SirenPresets)
-- or
ELSPlus.SirenSystem = "GTA" -- GTA V sirens from the game, without a sound pack

You set the tones per vehicle in the editor or via siren profiles. With OISS, the audio resource must be started.

The category GTA V (no sound pack) is available in the editor with every system (wail, yelp, warnings, fire department, air horn and more, list in ELSPlus.GTA). These tones come directly from the game and need no audio resource. Players who have siren mods installed client-side (replaced GTA sounds) hear their own tones.

  • Nothing is saved: check write permissions on config/ (File permissions).
  • Vehicle is not recognised: enter the spawn name instead of the gameName.
  • Debug output: ELSPlus.Debug = true in config/main.lua, then restart the resource.
  • els_reload_configs in the server console reloads vehicle configs without a restart.
  • Cable or exhaust hose white or without colour (from 1.9.3): els_seilcheck in the server console or the system check, see Installation, step 7.
  • Action is rejected: if something legitimate is rejected, see Server mods → Security.