1. Home
  2. Docs
  3. Paid Resources
  4. oELS
  5. Adding Vehicles

Adding Vehicles

Adding vehicles to the ELS system is for the most part as simple as copying and pasting the _EXAMPLE.json file and carrying out slight modifications where necessary to make the vehicle suit your needs in terms of the correct sirens and lighting patterns. This page will explain how to add a new vehicle to the ELS as well as some of the configurable options.

Adding Vehicles

Step 1)
The first step of adding a vehicle is duplicating either the _EXAMPLE.json file or the JSON file of a vehicle that has the same setup. Once you have duplicated it you should make sure the file name follows the format SPAWNCODE.json which for me doing the POLICE vehicle would be POLICE.json.

Step 2)
Once you have created and named the file correctly you should edit the _VEHICLES.json file to add your new spawn code to the array, ensure that all the lines but the last one end with a comma. It is also wise to verify your file with JSONlint to ensure that it is all correct, this site will highlight if there are any errors.

[
    "_EXAMPLE",
    "POLICE"
]

Configuration Options

The JSON files have a range of configurable options, many of which you will be fortunate enough to not have to touch unless you are looking to make custom patterns or your extras are used for different values than those used by the majority of modders.

extraControls – This section is where everything relating to extras is controlled, in here you should have 12 sub-arrays one for each of the extras possible on a vehicle. In each of these, you will see the following options, beside them I have listed what effect they have.

"colour": "blue", -- The colour that the light created will be, options are blue, red, green, white and amber
"enabled": true, -- If set to true the ELS will be able to control this extra turning it off and on, if false the ELS will ignore it.
"allowEnvLight": true, -- If set to true the ELS will create directional lighting for this extra
"directions": [ -- Directions which lights are made when this extra is on all options are below.
    "frontLeft",
    "front",
    "frontRight",
    "backLeft",
    "back",
    "backRight",
    "right",
    "left"
],
"offset": { -- The offset which the directional lighting is made, for the majority of vehicles this can remain the same
    "offSetX": "-0.70",
    "offSetY": "-0.20",
    "offSetZ": "0.50"
}

lightSetup – This section is where you will set which pattern the light will use and which other light options are enabled with the primary lighting. In this section you will see the following options, beside them I have listed what effect they have.


"lightSetup": {
    "lightPattern": "leds", -- The name of the pattern you are using, ELS default comes with leds and rotator
    "seconaryWithPrimary": false, -- Should the secondary pattern enable with the primary pattern?
    "warningWithPrimary": false, -- Should the warning pattern enable with the primary pattern?
    "rearPrimary": [ -- This is a list of which extras are used in rear primary lighting, currently not used in this version.
        "extra4",
        "extra1"
    ],
    "frontPrimary": [ -- This is a list of which extras are used in front primary lighting, currently not used in this version.
        "extra3",
        "extra2"
    ]
},

sirens – This section controls all parts of the ELS related to the sirens for that vehicle, in here you will set how many sirens a vehicle can have as well as the bullhorn sounds. In this section you will see the following options, beside them I have listed what effect they have.

"sirens": {
    "enabled": true, -- Does this vehicle have sirens, if false it will ignore the settings below
    "bullHorn": {
        "enabled": true, -- Does this vehicle have a bullhron, if false will use a in-game horn when the horn is pressed
        "soundFile": "SIREN_DELTA", -- What is the hash for the sound file
        "soundPack": "0" -- What is the soundset that the hash is a member of
    },
    "sounds": [ -- In this array you can add as many versions of the array below depending on how many sirens your vehicle has
        {
            "soundFile": "SIREN_ALPHA", -- What is the hash for the sound file
            "soundPack": "DLC_WMSIRENS_SOUNDSET" -- What is the soundset that the hash is a member of
        }
    ]
},

misc – This is where all misc controls for the ELS are including steadyBurns, spotlights and who can control the ELS. In this section you will see the following options, beside them I have listed what effect they have.

"misc": {
    "steadyBurns" : {
        "enabled" : false, -- Does the vehicle have steadyburns?
        "extras" : [] -- If the above is true, put the numbers of the extras that are steadyburns in here
    },
    "spotLight": {
        "enabled": false, -- Does the vehicle have a spotlight?
        "extra": "1"  -- If the above is true, put the number of the extra here
    },
    "seatsCanControl": [ -- This is an array of which seats can control the ELS, by default it is Driver & Passenger
        "-1",
        "0"
    ]
}