Resource Configuration
This page provides comprehensive information about our configuration files, assisting in the setup of the resource.
cfg.indicators
Please enable this option if you would like to utilize the indicator system integrated into z_els. Disable it if you prefer not to use this system.
cfg.vehicles
In this section, please enter the spawn codes of all vehicles you intend to use with the script. Please be aware that adding a vehicle's spawn code to this list will not automatically enable the vehicle's lighting. You will need to create a new vehicle file for the spawn code, which is explained in more detail later on.
cfg.audioBanks
By default, the resource sirens may not function properly because the audio you want to use is not being streamed. To ensure that the custom sirens are played and streamed to the clients, you can add the audio packs to the table. Once the script is loaded, these audio packs will be requested. Audio packs should be included in the documentation for the siren resource you are using. If they are not provided, please do not hesitate to contact our support team for assistance.
Once the resource has started, it will print to the console whether the audio banks you have configured have loaded successfully or failed to load. If they have failed to load, please double-check with the siren resource creator and refer to our documentation once you have made the necessary updates.
cfg.commands
This section of the configuration file allows for the customization of the resources commands. There is a singular command within the table that can be edited according to your needs. Each section will contain specific values such as command, description, and more. These details are outlined and explained below.
Command:
This refers to the input command used in the user chat. It is a string value.
Description:
This provides a brief description of the command that is displayed when a user inputs it. This helps the user understand the purpose and function of the command. It is also a string value.
cfg.keybinds
In this section, you have the opportunity to customize the keybinds for various features of the script, including the toggling of your sirens and lights. You can find a comprehensive list of FiveM's keybinds and their corresponding identification strings via the provided links.
Setting Up Vehicles
To configure a new vehicle to function with the script, it is necessary to verify that its spawn code is listed in the cfg.vehicles
table. If the spawn code is not included in this table, the vehicle will not function properly, regardless of the steps provided below.
Creating a Vehicle File:
To create a new file for your vehicle, navigate to config/vehicles/. Within this section, you will find various example files, such as example_els.lua
and example_nonels.lua
. Please copy and paste the file of the vehicle lighting type. For example, if it's an els vehicle, please copy and paste example_els.lua
. Now you should have a duplicate file. You should now rename this file to the vehicle's spawn code you wish to utilize for it, such as firetruk.lua
or police1.lua
. Once the new file is created, it is necessary to customize the data within to align with your preferences.
Non-ELS - Lighting Configuration
Within this table, you will find multiple values that facilitate the customization of lighting patterns and general lighting features. For instance, there is a field called "primary" which allows for the input of extras which are activated when utilizing this specific pattern.
If you do not want the specific feature/pattern to be used, please ensure it remains empty. This will prevent it from being toggled in the game. Below this message, you can find an example. In this example, the vehicle's lighting feature/patterns will have the following effects:
Primary: When using this pattern, extras one, three, and four will be toggled.
On Scene: When using this pattern, extras one, three, four, five, seven, and nine will be toggled.
Rear Reds: When using this feature, extras seven and nine will be toggled.
Alley Lights: This value has not been filled, and as a result, the feature for this particular vehicle will be deactivated in the game.
Located at the bottom of this table, you will find a value/table called Safe Extras. It is important to note that any extras added to this table will remain untouched and unaltered by the script. This serves as a safeguard to ensure that non-lighting extras are not unintentionally toggled when transitioning between patterns.
ELS - Lighting Configuration
Within this table, you will find multiple values that facilitate the customization of lighting patterns and general lighting features. For instance, there is a field called "primary" This value enables you to input a string in order to specify the pattern type used for the lighting stage. Please ensure that the pattern type string you enter into any field is valid. You can verify this by referring to the /config/patterns.lua file, where all pattern types are listed. To use a pattern for a specific lighting stage, make sure it is included in that stage's table. For example, if you intend to use 'Flash-Fast' in the primary stage, confirm that this exact string is included in the primary pattern table.
The fields that still have curly brackets function in the same manner as the Non-ELS setup. Please refer to the above section for information on the Non-ELS setup.
Located at the bottom of this table, you will find a value/table called Safe Extras. It is important to note that any extras added to this table will remain untouched and unaltered by the script. This serves as a safeguard to ensure that non-lighting extras are not unintentionally toggled when transitioning between patterns.
Siren Configuration
Within this table, you will find multiple values. The details of these values are provided below this message.
Has Sirens:
If the value is set to true, the sirens provided below can be activated while using the vehicle. However, if the value is set to false, the sirens will be disabled and cannot be used for this particular vehicle.
Siren List:
This table contains all the sirens you desire for the vehicle. Each siren is presented in a separate table, consisting of two values. A sample table is provided below for reference.
Name: This should be the filename of the siren you wish to utilize without its prefix.
Soundset: This field should indicate the soundset you intend to use for the specified siren name. For instance, if you are using a siren name from WMSirens, you will need to select the corresponding WMSirens soundset.
has DualTones:
If this value is enabled, the vehicle will allow for the use of the siren configured below in addition to the sirens provided above. If this value is disabled, the use of the additional siren will be deactivated.
Bullhorn Configuration
Within this table, you will find multiple values. The details of these values are provided below this message.
Has Bullhorn:
If the value is set to true, the bullhorn provided in the table below will be utilized. However, if this value is set to false, the bullhorn will be deactivated for this particular vehicle.
Siren Interrupt:
If the value is set to true while using the bullhorn, your active sirens will be temporarily paused and resumed once the usage of the bullhorn has ceased. On the other hand, if this value is set to false, your bullhorn will operate simultaneously with your sirens without causing any interruption.
ELS - Environmental Lighting
In this section, you have the option to configure artificial environmental lighting for the vehicle.
If you choose not to use environmental lighting for a particular vehicle, please delete the provided table below.
If you would like to use artificial environmental lighting for this vehicle, please keep this table in the configuration file and proceed with the tutorial/explanation provided below.
Within the envLighting
table, there are multiple secondary tables that correspond to different table numbers. The table number indicates the specific extra for which environmental lighting is desired. An example is provided below for reference.
In each extras table, there are various customizable parameters available. These parameters can be adjusted to alter the direction in which the extra is facing, as well as fine-tune the brightness and other characteristics of the light. These values have been explained below.
Types: This value is a table that contains all the string directions for the lighting directions. It is necessary to define strings according to the format demonstrated below. All available types can be found in the Directional Types page.
RGB: This table is structured with three integer values representing red, green, and blue. Various tools and websites are available to assist in accurately selecting an RGB colours. Provided below is an example of the colour blue.
Below the initial two values, there are three additional values that offer the ability to customize the light source. These values will be outlined in bullet points following this message. Additionally, a finalized example will be provided after the bullet points.
Distance: This value is a float that determines the maximum reach of the light source. An example has been provided below.
Brightness: This value is a float number that determines the level of intensity for the light source. An example is included below. This value is confined within the range of 0.0 to 1.0.
Radius: This value is a float number that specifies the size of the light source. A higher value will result in a larger light source, while a lower value will result in a smaller light source. An example is included below.
Falloff: This is a floating-point value that enables adjustments to the light's falloff size at the edge of the light. An example is included below.
The example above can be duplicated for each additional extra you would like environmental lighting to be applied to on this vehicle. If there is a extra you do not wish to have illuminated by the environmental lighting, please refrain from including it in the table.
Last updated