Zea Development - Documentation
StoreWebsiteDiscord
  • Welcome
  • General
    • Downloading Resources
    • Transferring Resources
    • Resource Support
    • Escrow Errors
  • Our Resources
    • z_hose
      • Resource Configuration
        • Configuration Modules
      • Compatibility with ox_inventory
      • Resource Usage
      • Developer Resources
        • Client Exports
        • Server Exports
    • z_boot (Coming Soon!)
      • Resource Configuration
        • Configuration Modules
        • Item Creation
      • Developer Resources
        • Client Exports
    • z_els
      • Resource Configuration
      • Resource Usage
      • Developer Exports
      • Creating Patterns
      • Directional Types
    • z_fires
      • Resource Configuration
      • JSON Configuration
      • Resource Usage
      • Developer Exports
      • Materials List
    • z_ppvfan
      • Resource Configuration
      • Resource Usage
    • zTurnout-System
      • Resource Configuration
      • Resource Usage
      • Trigger Events
    • zWigWags
      • Resource Configuration
      • Resource Usage
      • Trigger Events
    • zFire-Alarm
      • Resource Configuration
      • Resource Usage
    • z9m-Ladder
      • Resource Configuration
      • Resource Usage
    • z105m-Ladder
      • Resource Configuration
      • Resource Usage
    • z135m-Ladder
      • Resource Configuration
      • Resource Usage
    • zCustody-Alarm
      • Resource Configuration
      • Resource Usage
    • zFire-Pole
      • Resource Configuration
      • Resource Usage
    • zTurnout-Rack
      • Resource Configuration
      • Resource Usage
    • zPager
      • Resource Configuration
      • Resource Usage
    • zTurnouts
      • Resource Configuration
      • Resource Usage
Powered by GitBook
On this page
  • cfg.indicators
  • cfg.vehicles
  • cfg.audioBanks
  • cfg.commands
  • cfg.keybinds
  • Setting Up Vehicles
  • Creating a Vehicle File:
  • Non-ELS - Lighting Configuration
  • ELS - Lighting Configuration
  • Siren Configuration
  • Bullhorn Configuration
  • ELS - Environmental Lighting
  1. Our Resources
  2. z_els

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.indicators = true --@comment: Do you wish for z_els to use its inbuilt indicators

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.

---@type vehicles: string
---@example: 'police1' or 'firetruk'
cfg.vehicles = {
   'police1',
   'police2',
   'police3'
}

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.

---@type audioBanks: string
---@comment: In this section, you can enter the audio that you wish to utilize within the resource.
---@example: 'DLC_WALSHEY\\SIRENPACK_ONE' or 'DLC_WMSIRENS\\SIRENPACK_ONE'
cfg.audioBanks = {
   'DLC_WALSHEY\\SIRENPACK_ONE',
   'DLC_WMSIRENS\\SIRENPACK_ONE'
}

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.

---@type commands: table<string, table<string, string>>
cfg.commands = {
   ['toggleUI'] = {
      command = 'elspanel',
      description = 'Toggle the ELS UserInterface.'
   }
}

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.

---@type keybinds: table<string, table<string, string>>
---@comment: Allow for the customization of keybinds utilized by the resource.
---@comment: Keyboard: https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/
---@comment: controller: https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/pad_analogbutton/
cfg.keybinds = {
   ['keyboard'] = {
      primary_onscene = 'Q',

      toggle_siren = 'G',
      switch_siren = 'R',
      dual_tones = 'LMENU',
      bullhorn = 'E',

      rear_reds = 'K',
      rear_blues = 'N',

      front_whites = 'U',
      front_blues = 'B',

      alley_lights = 'X',
      message_board = 'M',

      right_indicator = 'Right',
      left_indicator = 'Left',
      hazard_lights = 'Back',

      nui_focus = 'CAPSLOCK'
   },

   ['controller'] = {
      primary_onscene = 'L1_INDEX',

      toggle_siren = 'LDOWN_INDEX',
      switch_siren = 'RRIGHT_INDEX',

      bullhorn = 'L3_INDEX',
   }
}

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.

---@type lighting: Lighting pattern configuration for the vehicle.
---@comment If you are using ELS, please refer to the patterns.lua file to find all available patterns. Here you can create new ones and edit existing ones as well.
---@comment If you are not using a specific lighting option, please ensure it is left as option = {}.
['lighting'] = {
  primary = {1, 2, 3, 4, 5, 6, 10},
  onscene = {1, 4, 7, 8, 9, 10},

  front_whites = {3},
  front_blues = {2},

  rear_reds = {7, 9},
  rear_blues = {1, 4, 10},

  alley_lights = {},
  message_board = {},

  safe_extras = {},
},

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.

---@type lighting: Lighting pattern configuration for the vehicle.
---@comment If you are using ELS, please refer to the patterns.lua file to find all available patterns. Here you can create new ones and edit existing ones as well.
---@comment If you are not using a specific lighting option, please ensure it is left as option = {}.
['lighting'] = {
  primary = 'Quadrouple-Flash-Fast',
  onscene = 'Quadrouple-Flash-Slow',

  front_whites = {},
  front_blues = {},

  rear_reds = 'Double-Flash-Slow',
  rear_blues = {},

  alley_lights = {},
  message_board = {},

  safe_extras = {},
},

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.

---@type sirens: Siren configuration for the vehicle.
['sirens'] = {
   hasSirens = true, -- False: This vehicle will not be able to use sirens. True: This vehicle will be able to use sirens.

   sirenList = {
         -- * Siren Start * --
      {
         name = 'SIREN_2',
         soundset = 'DLC_WALSHEY_SOUNDSET'
      },
         -- * Siren End (Ensure that the closing bracket has a comma)* --

         -- * Siren Start * --
      {
         name = 'SIREN_3',
         soundset = 'DLC_WALSHEY_SOUNDSET'
      },
         -- * Siren End (Ensure that the closing bracket has a comma)* --

         -- * Siren Start * --
      {
         name = 'SIREN_4',
         soundset = 'DLC_WALSHEY_SOUNDSET'
      },
         -- * Siren End (Ensure that the closing bracket has a comma)* --
   },

   hasDualTones = false,
   name = 'SIREN_CHARLIE',
   soundset = 'DLC_WMSIRENS_SOUNDSET'
},

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.

---@type bullhorn: Bullhorn configuration for the vehicle.
['bullhorn'] = {
   hasBullhorn = true, -- False: This vehicle will not be able to use the bullhorn. True: This vehicle will be able to use the bullhorn.
   
   bullhorn = {
      sirenInterrupt = true, -- False: This vehicle's bullhorn will not pause the active siren. True: This vehicle's bullhorn will pause the active siren.
      
      name = 'SIREN_9',
      soundset = 'DLC_WALSHEY_SOUNDSET'
   }
},

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.

Example
['envLighting'] = {
   -- Table Contents 
},

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.

['envLighting'] = {
    -- * Extra Start (extra_1) * --
  [1] = {
    -- > Table Contents 
  },
    -- * Extra End (Ensure that the closing bracket has a comma)* --
    -- * Extra Start (extra_2) * --
  [2] = {
    -- > Table Contents 
  },
    -- * Extra End (Ensure that the closing bracket has a comma)* --
    -- * Extra Start (extra_3) * --
  [3] = {
    -- > Table Contents 
  },
    -- * Extra End (Ensure that the closing bracket has a comma)* --
    -- * Extra Start (extra_4) * --
  [4] = {
    -- > Table Contents 
  },
    -- * Extra End (Ensure that the closing bracket has a comma)* --
},

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.

Example - Types
['envLighting'] = {
    -- * Extra Start (extra_1) * --
  [1] = {
    types = {'backward_rearLeft', 'diagonal_frontLeft', 'front_sideLeft'},
  },
    -- * Extra End (Ensure that the closing bracket has a comma)* --
},
  • 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.

Example - RGB
['envLighting'] = {
    -- * Extra Start (extra_1) * --
  [1] = {
    types = {'backward_rearLeft', 'diagonal_frontLeft', 'front_sideLeft'},
    rgb = {0, 0, 255},
  },
    -- * Extra End (Ensure that the closing bracket has a comma)* --
},

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.

Example - Complete
['envLighting'] = {
    -- * Extra Start (extra_1) * --
  [1] = {
    types = {'backward_rearLeft', 'diagonal_frontLeft', 'front_sideLeft'},
    rgb = {0, 0, 255},
    distance = 50.0,
    brightness = 0.9,
    radius = 45.0,
    falloff = 150.0
  },
    -- * Extra End (Ensure that the closing bracket has a comma)* --
},

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.


Previousz_elsNextResource Usage

Last updated 9 months ago

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 page.

Keyboard Keybinds
Controller Keybinds
Directional Types
Page cover image