Resource Configuration
This page provides comprehensive information about our configuration files, assisting in the setup of the resource.
cfg.language
This feature enables users to personalize the language that the resource will utilize. These languages can be configured and set within the cfg.languages
section of the configuration file. Here.
cfg.smoulderTime
This variable enables customization of the smouldering duration. Smouldering will occur after a fire is extinguished, and during the specified period, the fire has a chance to reignite and will produce smouldering smoke effects to indicate it is still within the smouldering duration.
The variable is measured in seconds with a minimum limit of 0 seconds and a maximum of 200 seconds. If a value exceeding 200 is entered, the resource will automatically default back to 25 seconds for optimisation purposes on the server and for its users.
cfg.commands
This section of the configuration file allows for the customization of the resources commands. There are 5 commands 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.
Parameters:
This section includes any parameters that may be required for the command. For example, the 'deleteFire' command has a parameter named 'range,' while the 'createFire' command has a parameter named 'size.' The 'size' parameter is unique as it consists of various percentages representing sizes of the fire. These percentages are based on the maximum flames for the specific fire type. For instance, if the maximum flame for a fire type is 25 flames, using the small argument would result in the fire spreading to 25% of 25 flames, which is 6 flames.
Cooldown:
This refers to the cooldown period between inputting the command. The value is measured in milliseconds, with every 1000 milliseconds being equivalent to one second. If you prefer not to have a cooldown period, please leave this value at 0.
cfg.permissions
This section facilitates whitelisting and restricting of various actions, such as
'particle_creation' (e.g. /createfire and /createsmoke)
'particle_deletion' (e.g. /deletefire and /deletesmoke)
'book_duty' (e.g. /bookduty)
Users can leverage frameworks like QBCore and ESX within these sections. The code responsible for permission checks is open source and can be accessed in the cl-utils.lua
file at line 51.
cfg.behaviourTypes
This section provides the ability to customize various types of fires, including vehicle, grass, and structure fires. Each type of fire behaves differently based on its environment. Within each section, there is an array of values that can be configured for the fire. These values are detailed below:
Maximum Spread: The maximum amount of flames that a specific fire behaviour type can produce, with 1 representing a single flame.
Spread Interval: The time interval between the spreading of flames for a specific fire behaviour type, measured in seconds.
Ability to Spread to Grass: A Boolean value that determines if the fire can spread to surrounding grass (true for yes, false for no).
Explosion Chance: The likelihood of a vehicle exploding is determined by randomly selecting a number within a defined range and comparing it for a potential explosion.
Reignition Chance: The probability of a flame reigniting after being extinguished is determined by randomly selecting a number within a defined range and comparing it.
Blacklisted Vehicle Classes: Allows for the exclusion of certain vehicle classes from being set on fire; classes can be added or removed from this list.
Flammable Materials: Enables the addition and removal of materials to which the fire can spread; a list of flammable materials is provided in a separate documentation section.
cfg.fireTypes
This section offers the capability to manage and customize available fire types, including the ability to add or remove them as needed. Fire types are selected at the time of creating a fire and the resource provides a range of pre-made options. Users have the flexibility to customize these fire types to align with their preferences and requirements. Each fire type includes an extinguishment methods table, allowing for customization of factors that can impact the flames of the specific fire type. Each method is assigned an impact variable, indicating the amount of damage the weapon will inflict with each contact with the flames. The higher the value, the greater the damage inflicted.
cfg.smokeTypes
This section provides the capability to manage and customize the available smoke types, including the option to add and remove them as necessary. Smoke types are chosen when creating a smoke source, with the resource offering a variety of pre-made options.
cfg.userInterface
This section provides the option to customize fire indicators, which can be placed at the origin of a fire to aid in its efficient extinguishment. If the setting is enabled (set to true), the indicators will be visible during firefighting activities; if disabled (set to false), they will not appear.
cfg.extinguishMethods
This section allows for the customization and adjustment of fire extinguishing methods, including the addition and removal of options. Each method is defined by two values, which are outlined and explained below:
Radius: This refers to the area in which the fire extinguishing method is effective. The larger the radius, the more flames it can extinguish at once. This value is measured as a float. A higher value indicates a larger radius.
Distance: This represents the maximum range at which the fire extinguishing method is effective in extinguishing flames. This value is also measured as a float. A higher value indicates a greater distance of effectiveness.
cfg.discordLog
This section enables the enablement of Discord logging for a variety of actions taken by resources, such as fire creation and duty bookings.
Webhook: You can input your preferred Discord webhook URL in this section, which serves as the channel for log messages to be sent. If you need guidance on obtaining a webhook URL, please refer to the provided link.
Community Name: You have the option to input your community's name in this field. This text will be visible in the Discord log message.
Community Logo: Here, you can upload your community's logo, which will be displayed in the Discord log message.
Logging Actions: Within this section, there are numerous logging actions. These actions are disabled by default but can be enabled by setting the value to true instead of false.
cfg.autoIncidents
This section offers the option to activate or deactivate automatic incidents. These incidents are customizable and can be configured within the incidents.lua
file.
Allow Duty: Toggle this setting to true to activate automated incidents, and to false to deactivate them.
Duty Alerts:
Allow: Set this option to true if you want to receive in-game incident notifications while on duty.
Type: Specify the type of notification to be displayed, such as "nui" or "chat" (refer to
cl-utils.lua
, line 117).
Integrations:
This section provides the functionality to enable various integrations, which serve as means of externally notifying users about incidents. The resource comes equipped with standard integrations such as AlbosFMS, SonoranCAD, and InfernosPager. The code section that utilizes these integrations is open source, allowing for customization and addition of your own integrations. This code can be located in the sv-utils.lua
file on line 307.
cfg.keybinds
This section provides the opportunity to customize the key bindings used by the resource. The key bindings have been converted to string format to simplify configuration and can be accessed here.
cfg.languages
This section provides the capability to add, remove, and customize languages used by the resource. The language can be configured at the beginning of the file. Here.
Last updated