Resource Configuration
This page showcases our configuration files in greater detail, aiding in the setup of the resource.
cfg.createCad
This option enables integration with Albos FMS. When set to 'true,' an CAD will be automatically generated on Albos FMS when an alarm is activated, containing all essential information for a response. If set to 'false,' a CAD will not be generated.
cfg.notificationSound
Set this option to 'true' to enable notification sound effects when receiving notifications, or set it to 'false' if you prefer not to have sound effects for notifications.
cfg.automaticAlarms
In this section, you can choose to activate automatic fire alarm triggers. This feature will automatically trigger a random alarm at predefined intervals.
Allow: Enable this option by setting it to 'true' if you wish to permit automatic alarm activations in the game. Please note that someone must activate Automatic Alarms in-game using the command /toggleAfa. If this option is set to 'false,' this command will be disabled, and automatic alarms will not be triggered.
Interval: This interval, measured in seconds, determines the frequency at which a random alarm will be selected and triggered. It utilizes the formula [
math.random(lowest, highest
) ] to calculate the duration.
cfg.fireDetection
In this section, you have the option to activate and customize the fire/smoke detection system within the specified buildings.
Type: This option permits you to specify the type of fire detection. You can choose from the following options: 'none', 'baseGame' If 'none' is selected, the resource will not automatically activate alarms upon fire detection. Setting it to 'baseGame' will trigger alarms upon detection of any fires that are part of the base game, such as Molotov's or native fires.
Interval: This interval determines how often the alarm system will inspect for the existence of fire or smoke. (1 = 250ms)
cfg.discordLog
In this section, you can enable Discord logging for fire alarm activations.
Allow: If this option is set to 'true', an embedded message will be sent to the configured webhook URL below upon fire alarm activations. This embedded message will include all necessary information related to the alarm activation, such as its source and location. If this option is set to 'false', no messages will be sent to Discord.
Webhook: This option enables you to input your desired Discord webhook URL, which is the channel where log messages will be sent. If you are unsure of how to obtain a webhook URL, please visit the link provided below.
Community Name: This option allows you to input your community's name. This text will be displayed in the Discord log message.
Community Logo: This option enables you to upload your community's logo, and this image will be displayed in the Discord log message.
cfg.translations
This section permits you to customize the script's strings according to your preferences, whether it involves altering the language or making general edits to message aspects.
cfg.alarmSystems
In this section, you can specify the locations of fire alarm systems.
Within the table cfg.alarmSystems
, there is a separate table or block of code for each building. These blocks are identified by unique numbers, such as [1]
, [2]
, and so on. The beginning and end of each block are delineated by comments within the config.lua file.
New tables should always be positioned after the comment '-- BLOCK END --'
. This comment indicates the conclusion of the previous block.
It's crucial that the ID you insert within the brackets is both unique and non-duplicate.
Building Name:
In this field, please provide the building's name for this block. This name will be displayed on the alarm panel and will also appear on any notifications or alerts related to the building's alarm activation.
Building Address:
Please enter the address of the building for this block in this field. This address will be displayed on any notifications or alerts related to the building's alarm activation.
Panel Location:
In this section, you can determine the placement and rotation of the alarm panel within the building.
Coordinates: In this field, please input the 3D world coordinates for the alarm panel's location. This information determines where the alarm panel will spawn. The format for this option is
vec3(x, y, z)
Rotation: In this section, you will specify the rotation for the alarm panel. This enables you to position the panel precisely in the desired orientation. The format for this option is
vec3(pitch, roll, yaw)
Alarm Settings:
In this section, you will be able to specify the placement of the fire alarm speaker and its audible distance.
Coordinates: Here, you should enter the 3D world coordinates for the alarm speaker, specifying the location from which the fire alarm sound will emanate. This option is formatted as
vec3(x, y, z)
Distance: Here, you will specify the distance at which the fire alarm can be heard. This value must be a float, which implies it should always include a ".0" at the end. For instance, 35.0, 25.0, and so on.
Button Locations:
In this section, you will be able to define the locations and names of fire alarm callpoints within the building. There is no limit to the number of callpoints you can have within a building. This section functions similarly to the cfg.alarmSystems table. Each callpoint has its own section or block of code. The following is an example of two sections or blocks of code that belong within the button Location table.
Label: In this section, you will specify the name or zone of the callpoint. This should be a brief description of the callpoint's location. This name will be displayed on the alarm panel if that specific callpoint is activated.
Coordinates: In this section, you will enter the 3D world coordinates for the fire alarm callpoint. This is the location where the callpoint will spawn, and the format for this option is as follows:
vec3(x, y, z)
Rotation: In this section, you will specify the rotation of the fire alarm callpoint. This option enables you to position the callpoint precisely in a designated location. The format for this option is
vec3(pitch, roll, yaw)
Last updated