EVC

24€

Place equipements, sirens and emergency lights on any vehicle.
This is a script, lights/objects/vehicles are not included unless mentioned otherwise


✅ Place equipements, sirens and emergency lights on ANY vehicle
✅ Multiple siren tones
✅ Custom siren range
✅ Option to force lights to be on before siren can be activated
✅ Lights and equipements can be placed anywhere on the vehicle
✅ Lights and equipements position and rotation can be saved to a file and automatically loaded when a vehicle spawns
✅ Uses StateBags (no events are sent to the server/client unless when saving a configuration)
✅ Mirror a light or object position / orientation on another light or object (for easier placement)
✅ Possibility to customize menu appearance
✅ Spawned objects can be invincible
✅ Support for custom sirens (from Walsheyy's WMServerSirens for instance)
✅ Whitelisted menu (Comes preconfigured for identifiers, ESX, QB-Core and ACE)
✅ Can control lights independently from sirens on native emergency vehicles
✅ Holding E with the sirens on will trigger an alternative siren (like on native vehicles)
✅ Holding E with the sirens off will trigger the horn
✅ Choose alternative siren in menu
✅ Save a config as a template, that can be loaded using the menu or the event TriggerServerEvent("EVC:SpawnTemplate", NetworkGetNetworkIdFromEntity(veh), template_name)
✅ Exports to check if a vehicle has lights, objects or sirens exports.EVC:HasLights(veh) / exports.EVC:HasObjects(veh) / exports.EVC:HasSirens(veh)
✅ Export to toggle lights, objects and sirens on vehicle exports.EVC:ToggleLightsObjectsSirens(veh, state)
⚠️ Uses FiveM Asset Escrow system
⚠️ Requires OneSync (Not working with OneSync Legacy)
⚠️ Requires NativeUI
➡️ Compatible with : LightBars by @Munky (Redistributed in this script)
➡️ Compatible with : EVC Starter Pack by @D3 (Included for free in this script)
➡️ Compatible with : D3S Equipement by @D3 (⚠️ Not included)
➡️ Compatible with : WMServerSirens by @Walsheyy (⚠️ Not included)

2.1.9b

✅ Add keybind to add / remove lights, objects and sirens
✅ Fix error while placing light


2.1.9

✅ Update whitelist to latest ESX


2.1.8a

✅ Add Config.HandleEntityCreatedRemoved to disable entityCreated and entityRemoved events


2.1.8

✅ Light/Object wise whitelist
✅ Only modify lights/objects on which you have rights
✅ Light/Object wise collisions
✅ Only put loaded models in spawn menu
✅ Fix logs


2.1.7

✅ Option to force lights to be on before siren can be activated
✅ If sirens were on before lights were turned off, sirens will be turned on when lights are turned on
✅ Turn off sirens if lights are turned off


2.1.6

✅ Ability to control livery on placed object / light
✅ Livery is saved to file and loaded on object / light on spawn


2.1.5

✅ Add export : exports.EVC:ToggleLightsObjectsSirens(veh, state) to toggle lights, objects and sirens placement on vehicle
✅ Save options in list instead of multiple buttons
✅ Sync bugfixes


2.1.4

✅ Add lights / equipements on trailer and control them from the truck (hold keybind)
✅ Option to allow passenger to turn on lights / sirens


2.1.3d

✅ Can control lights independently from sirens on native emergency vehicles
✅ Holding E will trigger an alternative siren (like on native vehicles)
✅ Choose alternative siren in menu
✅ Increase default rotation sensitivity
✅ Fix save when only sirens
✅ Better save notifications
✅ Configs are now loaded on resource start
✅ Bugfix horn/siren is not binded on E
✅ Bugfix horn on native emergency vehicles


2.1.2

✅ Option to allow only whitelisted player to control lights / sirens


2.1.1

✅ Sync doors accross clients
✅ Update model list based on D3s releases
✅ Overhaul of spawning logic to prevent bugs when vehicles are spawned server-side


2.1.0

✅ Don't wait on lights/equipements not loaded or not in config
✅ Bugfix potential conflict in state bags name
✅ Bugfix spawning issues


2.0.9

✅ Set maximum number of lights / equipements per vehicle
✅ Extras on objects as well as on lights
✅ Extras and doors settings will be applied on load
✅ Bugfix error on server identifier is nil


2.0.8

✅ Ability to control extras and doors of placed light
✅ Custom Siren range


2.0.7

✅ Complete rework of sirens internal logic
✅ Bugfix sirens not turning on for some player when entering scope
✅ Bugfix NetworkGetNetworkIdFromEntity
✅ Bugfix siren order not the same on every client
✅ Owners can write custom UUID function to choose how to save/load configs
✅ Better handling of on/off state of lights to prevent desync between lights


2.0.6

✅ Save a config as a template
✅ Template can be loaded onto any vehicle using the menu or the event TriggerServerEvent("EVC:SpawnTemplate", NetworkGetNetworkIdFromEntity(veh), template_name)
✅ Bugfix siren turns off when in other police car


2.0.5

✅ Config option to spawn objects / lights only if the player spawning the vehicle is whitelisted
✅ Clean up of the configuration code
✅ Add config for Side Runners Pack


2.0.4

✅ Add an option to enable/disable lights, objects and siren on a vehicle
✅ Add export to check if a vehicle has lights : exports.EVC:HasLights(veh)
✅ Add export to check if a vehicle has objects : exports.EVC:HasObjects(veh)
✅ Add export to check if a vehicle has sirens : exports.EVC:HasSirens(veh)


2.0.3

✅ Add new models from D3S's EVC Starter Pack


2.0.2

✅ Add job grade permission support
✅ Draw marker on selected object
✅ Spawned objects can be invincible
✅ Possibility to customize menu appearance
✅ Maintain the model selection when spawning an object / light


2.0.1

✅ Fix translation and rotation speed sensitivity
✅ Auto select just spawned element
✅ Check if models exist before adding it to the menu
✅ Change some translations
✅ Add D3sEvcStarterPack
✅ More bugfix GetNetworkObject
✅ Enhance object deletion


2.0.0

✅ Move to EVC
✅ Bugfix GetNetworkObject
✅ Add support for placing equipements
✅ Complete refactor of menu


1.1.6

✅ Ability to save per user + plate (disabled by default)
✅ Bugfix save user+plate
✅ Add ACE permission support
✅ Bugfix whitelist


1.1.5

✅ Support for custom sirens (from Walsheyy's WMServerSirens for instance)


1.1.4

✅ Bugfix multiple siren sound on same vehicle


1.1.3

✅ Mirror a light position / orientation on another light (for easier placement)
✅ Add description to each button


1.1.2

✅ Simpler mouse view control
✅ Select dynamically rotation speed
✅ Select dynamically translation speed
✅ Menu stays at same index when switching model


1.1.1

✅ Bugfix some spawning issues
✅ Bugfix some error in client consoles (no object by ID 0)
✅ Added total number of lights


1.1.0

✅ Register siren and lights per model and / or per plate (defaults to per plate, option in the config file)
✅ Range and sensitivity can be customized for rotation


1.0.0

✅ Place a siren and emergency lights on ANY vehicle
✅ Light up the lights
✅ Turn on the sirens
✅ Multiple siren tones
✅ Lights can be placed anywhere on the vehicle
✅ Lights position and rotation can be saved to a file
✅ The saved position and rotation of the lights are automatically loaded when a vehicle spawns (based on the number plate)
✅ Uses StateBags (almost no events are sent to the server/client unless when saving a configuration)
✅ Remove lights
✅ Automatically disable horn if siren is installed


Nabla.LogLevel = Nabla.LogLevels.WARN -- Log levels are ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF (default is WARN)

Config = {

  -- Please check our FAQ if you have any question : https://fivem.nabla-corporation.com/faq

  -- List of players who have access to the actions, set WhiteListEnabled = true/false to enable/disable the whitelist
  WhiteListEnabled = false,
  WhiteList = {
    'ip:192.168.168.35',
    'steam:12345',
    'mechanic',
    'mechanic:5',
    'nabla.evc', -- To use with ACE, add this to your server.cfg : add_ace identifier.YOURIDENTIFIER nabla.evc allow
  },

  -- If true only whitelisted player can control the lights / sirens
  WhiteListedControl = false,

  -- Keybinds, you can choose from here : https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/
  DefaultControls = function()
    RegisterKeyMapping('+evc_menu',         'EVC - Menu (Hold for trailer)', 'KEYBOARD',    'F6') -- Open placement menu
    RegisterKeyMapping('+evc_lights',       'EVC - Lights',                  'KEYBOARD', 'LMENU') -- Enable lights
    RegisterKeyMapping('+evc_siren',        'EVC - Siren',                   'KEYBOARD',     'E') -- Enable sirens (holding with sirens on will trigger alternative siren, holding with sirens off will trigger horn)
    RegisterKeyMapping('+evc_siren_tone',   'EVC - Siren Tone',              'KEYBOARD',     'G') -- Change the siren tone
    RegisterKeyMapping('+evc_spawn_toggle', 'EVC - Spawn Toggle',            'KEYBOARD',    'F7') -- Put / Remove lights, objects and sirens
  end,

  -- Handle entityCreated / entityRemoved automatically, if you set this to false make sure to add :
  -- TriggerServerEvent('EVC:entityCreated', NetworkGetNetworkIdFromEntity(veh)) -- When you create a vehicle and after you set it's plate
  -- TriggerServerEvent('EVC:entityRemoved', NetworkGetNetworkIdFromEntity(veh)) -- When you delete a vehicle
  -- Otherwise the script will not work
  HandleEntityCreatedRemoved = true,

  -- Should be loaded from a separate resource
  Models = {
    Lights = {
      ["FakeItemToShowOptions"]        = {  -- This is a fake item to show available options per light/object
        WhiteList = {"mechanic"},           -- You can also set the whitelist at the object level, if nothing is specified, the global whitelist will be used. Syntax is same as global
        Extras = true,                      -- Does this object has extras ? Default to false
        Doors = true,                       -- Does this object has doors ? Default to false
        Offset = vector3(-0.45, -0.1, 0.9), -- Offset between center of object and 3D object (for displaying 3D marker)
        Collision = false,                  -- You can also set the collision at the object level, if nothing is specified, the global collision setting will be used
      },
      ["D3sAmberBeacon"]               = {},
      ["D3sAntennaAmberStr"]           = {},
      ["D3sAntennaBlueStr"]            = {},
      ["D3sAntennaGreenStr"]           = {},
      ["D3sAntennaPurpleStr"]          = {},
      ["D3sAntennaRedStr"]             = {},
      ["D3sAntennaWhiteStr"]           = {},
      ["D3sBBFedSigArjent"]            = {},
      ["D3sBlueBeacon"]                = {},
      ["D3sEdge9000A"]                 = {Extras = true},
      ["D3sEdge9000A_L"]               = {Extras = true},
      ["D3sEdge9000B"]                 = {Extras = true},
      ["D3sEdge9000B_L"]               = {Extras = true},
      ["D3sEdge9000G"]                 = {Extras = true},
      ["D3sEdge9000G_L"]               = {Extras = true},
      ["D3sEdge9000P"]                 = {Extras = true},
      ["D3sEdge9000P_L"]               = {Extras = true},
      ["D3sEdge9000R"]                 = {Extras = true},
      ["D3sEdge9000RB"]                = {Extras = true},
      ["D3sEdge9000RB_L"]              = {Extras = true},
      ["D3sEdge9000R_L"]               = {Extras = true},
      ["D3sRBFedSigArjent"]            = {},
      ["D3sRRFedSigArjent"]            = {},
      ["D3sRedBeacon"]                 = {},
      ["D3s_DotBoard"]           	     = {Doors = true, Extras = true},
      ["D3s_MiniP_A"]                  = {Extras = true},
      ["D3s_MiniP_B"]                  = {Extras = true},
      ["D3s_MiniP_G"]                  = {Extras = true},
      ["D3s_MiniP_P"]                  = {Extras = true},
      ["D3s_MiniP_R"]                  = {Extras = true},
      ["D3s_OneGuard_A"]               = {Extras = true},
      ["D3s_OneGuard_AA"]              = {Extras = true},
      ["D3s_OneGuard_AW"]              = {Extras = true},
      ["D3s_OneGuard_B"]               = {Extras = true},
      ["D3s_OneGuard_BB"]              = {Extras = true},
      ["D3s_OneGuard_BW"]              = {Extras = true},
      ["D3s_OneGuard_G"]               = {Extras = true},
      ["D3s_OneGuard_GG"]              = {Extras = true},
      ["D3s_OneGuard_GW"]              = {Extras = true},
      ["D3s_OneGuard_P"]               = {Extras = true},
      ["D3s_OneGuard_PP"]              = {Extras = true},
      ["D3s_OneGuard_PW"]              = {Extras = true},
      ["D3s_OneGuard_R"]               = {Extras = true},
      ["D3s_OneGuard_RB"]              = {Extras = true},
      ["D3s_OneGuard_RW"]              = {Extras = true},
      ["D3s_OneGuard_W"]               = {Extras = true},
      ["D3s_S_Series_BB"]              = {Extras = true},
      ["D3s_S_Series_RB"]              = {Extras = true},
      ["D3s_S_Series_RR"]              = {Extras = true},
      ["D3s_SideRunners_A"]            = {Extras = true},
      ["D3s_SideRunners_B"]            = {Extras = true},
      ["D3s_SideRunners_G"]            = {Extras = true},
      ["D3s_SideRunners_P"]            = {Extras = true},
      ["D3s_SideRunners_R"]            = {Extras = true},
      ["D3s_SideRunners_RB"]           = {Extras = true},
      ["D3s_XR2000_AA"]                = {Extras = true},
      ["D3s_XR2000_BB"]                = {Extras = true},
      ["D3s_XR2000_GG"]                = {Extras = true},
      ["D3s_XR2000_PP"]                = {Extras = true},
      ["D3s_XR2000_RB"]                = {Extras = true},
      ["D3s_XR2000_RR"]                = {Extras = true},
      ["WhelenAmberBeacon"]            = {},
      ["WhelenBlueBeacon"]             = {},
      ["WhelenGreenBeacon"]            = {},
      ["WhelenRedBeacon"]              = {},
      ["fbiold"]                       = {Offset = vector3(-0.45, -0.1, 0.9)},
      ["lightbarTwoSticks"]            = {Offset = vector3(0.0, 0.45, 0.65)},
      ["longLightbar"]                 = {Offset = vector3(0.35, -1.15, 0.75)},
      ["longLightbarRed"]              = {Offset = vector3(0.35, -1.15, 0.75)},
    },

    Objects = {
      ["D3sConeStackV1"]        	= {},
      ["D3sConeStackV2"]        	= {},
      ["D3sLadderRack"]         	= {},
      ["D3sToolboxV1"]          	= {},
      ["D3sWinchV1"]            	= {},
      ["D3s_AntennaBlack"]     		= {},
      ["D3s_AntennaLowProfile"] 	= {},
      ["D3s_AntennaSLVBLK"]     	= {},
      ["D3s_BedRack"]           	= {Extras = true},
      ["D3s_PartitionCage"]     	= {},
      ["D3s_PlateReaderV1"]     	= {},
      ["D3s_PushGuard_S"]       	= {},
      ["D3s_Pushbar_L"]         	= {},
      ["D3s_SirenV1"]           	= {},
      ["D3s_TruckRack"]         	= {},
    },
  },

  -- List of native vehicles on which lights are controled using EVC
  -- Has less priority than configs saved by model, plate ...
  -- Remove from list to disable control by EVC
  NativeVehiclesHash = {
    ["ambulance"]  = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_AMBULANCE_WARNING"}, Tones = {"RESIDENT_VEHICLES_SIREN_WAIL_02"}}},
    ["fbi"]        = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"RESIDENT_VEHICLES_SIREN_WAIL_02"}}},
    ["fbi2"]       = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"RESIDENT_VEHICLES_SIREN_WAIL_02"}}},
    ["firetruk"]   = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_FIRETRUCK_WARNING"}, Tones = {"RESIDENT_VEHICLES_SIREN_FIRETRUCK_WAIL_01"}}},
    ["lguard"]     = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["police"]     = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["police2"]    = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["police3"]    = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["police4"]    = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["policeb"]    = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"RESIDENT_VEHICLES_SIREN_QUICK_03"}}},
    ["policeold1"] = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["policeold2"] = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["policet"]    = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["pranger"]    = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["riot"]       = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["riot2"]      = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["sheriff"]    = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"VEHICLES_HORNS_SIREN_1"}}},
    ["sheriff2"]   = {lights = {}, objects = {}, sirens = {AlternativeTones = {"VEHICLES_HORNS_POLICE_WARNING"},    Tones = {"RESIDENT_VEHICLES_SIREN_WAIL_03"}}},
  },

  -- Maximum number of lights / objects per vehicle
  Max = {
    Lights = 10,
    Objects = 10,
  },

  -- Enable or disable collsions on spawned objects / lights (turning this on can lead to weird behavior)
  EnableCollision = false,

  -- Spawned object are invicible
  Invincible = false,

  -- If true lights must be on for sirens to work
  SirenNeedLights = false,

  -- Audio banks
  AudioBanks = {
    "DLC_WMSIRENS\\SIRENPACK_ONE",
  },

  -- Range of the sirens
  SirenRange = 200.0,

  -- Anything can be added / removed to your likings
  SirenTones = {
    {hash = "SIRENS_AIRHORN",                             label = "AirHorn",          description = "Add this siren", ref = 0},
    {hash = "VEHICLES_HORNS_SIREN_1",                     label = "Horns 1",          description = "Add this siren", ref = 0},
    {hash = "VEHICLES_HORNS_SIREN_2",                     label = "Horns 2",          description = "Add this siren", ref = 0},
    {hash = "VEHICLES_HORNS_POLICE_WARNING",              label = "Police Warning",   description = "Add this siren", ref = 0},
    {hash = "RESIDENT_VEHICLES_SIREN_WAIL_01",            label = "Wail 1",           description = "Add this siren", ref = 0},
    {hash = "RESIDENT_VEHICLES_SIREN_WAIL_02",            label = "Wail 2",           description = "Add this siren", ref = 0},
    {hash = "RESIDENT_VEHICLES_SIREN_WAIL_03",            label = "Wail 3",           description = "Add this siren", ref = 0},
    {hash = "RESIDENT_VEHICLES_SIREN_QUICK_01",           label = "Quick 1",          description = "Add this siren", ref = 0},
    {hash = "RESIDENT_VEHICLES_SIREN_QUICK_02",           label = "Quick 2",          description = "Add this siren", ref = 0},
    {hash = "RESIDENT_VEHICLES_SIREN_QUICK_03",           label = "Quick 3",          description = "Add this siren", ref = 0},
    {hash = "VEHICLES_HORNS_AMBULANCE_WARNING",           label = "Ambulance",        description = "Add this siren", ref = 0},
    {hash = "VEHICLES_HORNS_FIRETRUCK_WARNING",           label = "Firetruck",        description = "Add this siren", ref = 0},
    {hash = "RESIDENT_VEHICLES_SIREN_FIRETRUCK_WAIL_01",  label = "Firetruck wail 1", description = "Add this siren", ref = 0},
    {hash = "RESIDENT_VEHICLES_SIREN_FIRETRUCK_QUICK_01", label = "Firetruck wail 2", description = "Add this siren", ref = 0},

    -- Custom sirens (from https://github.com/Walsheyy/WMServerSirens)
    {hash = "SIREN_ALPHA",                                label = "Custom Alpha",     description = "Add this siren", ref = "DLC_WMSIRENS_SOUNDSET"},
    {hash = "SIREN_BRAVO",                                label = "Custom Bravo",     description = "Add this siren", ref = "DLC_WMSIRENS_SOUNDSET"},
    {hash = "SIREN_CHARLIE",                              label = "Custom Charlie",   description = "Add this siren", ref = "DLC_WMSIRENS_SOUNDSET"},
    {hash = "SIREN_DELTA",                                label = "Custom Delta",     description = "Add this siren", ref = "DLC_WMSIRENS_SOUNDSET"},
    {hash = "SIREN_ECHO",                                 label = "Custom Echo",      description = "Add this siren", ref = "DLC_WMSIRENS_SOUNDSET"},
    {hash = "SIREN_FOXTROT",                              label = "Custom Foxtrot",   description = "Add this siren", ref = "DLC_WMSIRENS_SOUNDSET"},
    {hash = "SIREN_GOLF",                                 label = "Custom Golf",      description = "Add this siren", ref = "DLC_WMSIRENS_SOUNDSET"},
    {hash = "SIREN_HOTEL",                                label = "Custom Hotel",     description = "Add this siren", ref = "DLC_WMSIRENS_SOUNDSET"},
  },

  -- Placement sensitivity (step)
  Sensitivity = {
    Tx = {0.01, 0.1,  1.0}, -- Translation
    Rx = {1.0, 10.0, 45.0}, -- Rotation
  },

  -- Range during placement
  Range = {
    Tx =  10.0, -- Translation
    Rx = 180.0, -- Rotation
  },

  -- Function to customize the menus
  Customize = function(menu)
    menu:SetBannerRectangle(NativeUI.CreateRectangle(0, 0, 0, 0, 122,	32,	20, 255.0))
  end,

  -- Should a notif be sent if a user press a keybind but no vehicle is in range ?
  NoVehNotif = false,

  -- Save per model, per plate, per user+plate or per name ?
  -- Per name is not loaded automatically, you have to go in the menu and enter the template name you want to load
  -- Tip 1 : To disable server save, set all to false
  -- Tip 2 : Priority is : UUID > Plate > Model, meaning you can override the model settings by saving per plate
  SavePerModel = true,
  SavePerPlate = true,
  SavePerUUID  = true,
  GenerateUUID = function(identifier, vehicle)
    return identifier..":"..GetVehicleNumberPlateText(vehicle)
  end,
  SavePerName  = true,

  -- Spawn objects / lights only if player is whitelisted
  SpawnOnlyIfWhiteListed = false,

  -- Translations
  Strings = {
    ['no_veh'] = 'No vehicle nearby',
    ['open_veh'] = 'Open menu for this vehicle',
    ['saved']  = '~g~Saved !~w~',
    ['clear']  = '~g~Config cleared !~w~',
    ['error']  = '~r~Error !~w~',

    -- Main menu
    ['toggle'] = {'Toggle lights, objects and sirens', 'Toggle the spawn of entities and siren, can also be toggled with the "EVC - Spawn Toggle" button'},
    ['passenger_control'] = {'Passenger control', 'Allow passengers to control the lights / sirens'},
    ['save'] = {'Save config by', 'Choose how the config will be saved and loaded to the car'},
    ['save_model'] = 'Model',
    ['save_plate'] = 'Plate',
    ['save_uuid'] = 'UUID',
    ['save_name'] = 'Name',
    ['load_name'] = {'Load by name', 'Load a config by using a custom name'},

    -- Lights / Objects
    ['add_edit'] = {
      ["Objects"] = "Add, edit and remove equipements on this vehicle",
      ["Lights"] = "Add, edit and remove lights on this vehicle",
    },
    ["Lights"] = "Lights",
    ["Objects"] = "Equipements",
    ["spawn"] = {"Spawn", "Select the model you wish to spawn"},
    ["select"] = {"Selected", "Select the element you wish to move"},
    ["mirror"] = {"Mirror from", "Will copy the position and orientation from this element onto the selected one"},
    ["tspeed"] = {"Translation Speed", "Select translation speed"},
    ["rspeed"] = {"Rotation Speed", "Select rotation speed"},
    ["tx"] = {"X", "Move left / right"},
    ["ty"] = {"Y", "Move front / rear"},
    ["tz"] = {"Z", "Move up / down"},
    ["rx"] = {"Pitch", "Rotate around X"},
    ["ry"] = {"Roll", "Rotate around Y"},
    ["rz"] = {"Yaw", "Rotate around Z"},
    ["del"] = {"Delete", "Remove this element (remember to save)"},
    ["ext"] = {"Extras", "Enable / disable extras"},
    ["doors"] = {"Doors", "Open / close doors"},
    ["livery"] = {"Livery", "Select the livery"},

    -- Sirens
    ["sirens"] = {"Sirens", "Add and remove sirens on this vehicle"},
    ["altsiren"] = {"Alternative Siren", "Choose the siren that will be played when holding the siren button"},
  },

}

table.sort(Config.SirenTones, function(a,b) return a.label < b.label end)

local prev = nil
function ShowNotification(message)
  if prev ~= nil then
    RemoveNotification(prev)
  end
  AddTextEntry(GetCurrentResourceName().."Notif", Config.Strings[message])
  BeginTextCommandThefeedPost(GetCurrentResourceName().."Notif")
  prev = EndTextCommandThefeedPostTicker(false, false)
end

Config.NativeVehicles = {}
for k,v in pairs(Config.NativeVehiclesHash) do
  Config.NativeVehicles[tostring(GetHashKey(k))] = v
end
Keybind / Command Action
F6Open menu
LALTTurn on lights
ETurn on sirens
GChange the siren tone
5
  • 6
  • 0
  • 0
  • 0
  • 0
  • zSmilleeyy

    27/3/2023

    Love this script, finally it safes to my car! Thanks for the support @Blaizz ! ♥

  • DerEchteAlec

    18/3/2023

    Like: I have the product though 2 times bought ausersehen and the refund lasted not even a day and I had everything back now I could get it right. The system behind it runs very well the menu is very easy to understand and it is editable and does what it should.
    Dislike: This has nothing to do with the creator but there are currently few lightbars or other what you could put on it would be great if there is still what comes.

  • Blake P

    2/8/2022

    Like : Amazing script, really advanced, and good config.
    Dislike : Price was a little expensive for me, 100% worth it though.

  • 𝓜𝓪𝓷𝓾𝓮𝓵5065

    11/4/2022

    Like: It works like it should and its awesome, that you can finally change it to any siren you want. Good work and fast support!
    Dislike: Nothing.

  • FluffyPlays22

    2/4/2022

    The LightBar script is probably one of the coolest scripts there are. Being able to put lights on any vehicle, sirens too. The lights sync up on onesync infinity perfect with no issues at all. Now with addon siren support you can add any siren you want to the cars, and there was previously a glitch where the sirens would get stuck on for others, and that is fixed. It is all around perfect now.
    Dislike : There's not really any issues anymore besides some small inconveniences with the scrolling of the lightbars, but its nothing to worry about.

  • CSYON

    27/3/2022

    Like: It works like it should and its awesome, that you can finally change it to any siren you want. Good work and fast support!
    Dislike: Nothing.