# Config

```lua
Config = {}

-- Allgemeine Einstellungen
Config.Framework = 'ESX'          -- 'ESX' oder 'QBCore'
Config.Item = 'totmannmelder'     -- Itemname für Totmannmelder

-- Zeiten in Millisekunden
Config.CheckInterval = 1000        -- Überprüfung alle 1 Sekunde
Config.WarningTime = 20000         -- 20 Sekunden bis Warnung
Config.AlarmTime = 30000           -- 30 Sekunden bis Alarm

-- Notfall-Deaktivierung
Config.PanicButton = {
    enabled = false,                -- true/false - Notfall-Deaktivierung aktivieren
    key = 'F6'                     -- Standard Taste (kann in FiveM Settings geändert werden)
}

-- Sound System
Config.Sounds = {
    enabled = true,                -- Sound System aktivieren/deaktivieren
    volume = 37,                   -- Lautstärke in Prozent (0-100) für xSound (50% leiser für Trommelfell-Schutz)
    useXSound = true,              -- xSound Audio-Library für Custom-Sounds verwenden
    
    -- 3D Audio System
    audio3d = {
        enabled = true,            -- 3D Audio aktivieren/deaktivieren
        radius = 25.0,             -- Hörradius in Metern
        falloff = 'linear',        -- Lautstärke-Abfall: 'linear', 'exponential', 'inverse'
        minVolume = 0.05,          -- Minimale Lautstärke am Rand des Radius (5%)
        maxVolume = 1.0            -- Maximale Lautstärke bei 0 Metern (100%)
    },
    
    -- Sound Dateien (OGG für FiveM native Audio-System)
    files = {
        activate = 'sounds/activate.ogg',      -- Bestätigungston
        warning = 'sounds/warning.ogg',        -- Warnton
        alarm_stage1 = 'sounds/alarm1.ogg',    -- Alarm Stufe 1
        alarm_stage2 = 'sounds/alarm2.ogg',    -- Alarm Stufe 2
        alarm_stage3 = 'sounds/alarm3.ogg'     -- Alarm Stufe 3
    },
    
    -- Alarm Stufen Konfiguration
    alarm = {
        stage1_plays = 1,          -- Wie oft Stufe 1 abgespielt wird
        stage2_plays = 1,          -- Wie oft Stufe 2 abgespielt wird  
        stage3_plays = 5,          -- Wie oft Stufe 3 abgespielt wird (nicht verwendet bei kontinuierlicher Wiedergabe)
        pause_between_cycles = 100,    -- Pause zwischen Stufe 3 Wiederholungen in ms (0.1 Sekunden)
        
        -- Sound-Dauern für Alarm-Stufen
        stage1_duration = 5000,    -- ca. 5 Sekunden (alarm1.ogg)
        stage2_duration = 5000,    -- ca. 5 Sekunden (alarm2.ogg)
        stage3_duration = 5500,    -- ca. 5,5 Sekunden (alarm3.ogg)
        stage3_loop_count = 107    -- Wie oft Alarm3 wiederholt wird (107x * 5.6s = ca. 10 Minuten)
    }
}

-- UI Position (top-right, top-left, bottom-right, bottom-left)
Config.UIPosition = 'bottom-right'

-- r_scba Integration
Config.SCBA = {
    enabled = true,                -- true/false - Automatische Aktivierung/Deaktivierung mit SCBA
    autoActivate = 2,              -- Bei welchem Wert soll aktiviert werden (Standard: 2 = Full SCBA mit Maske)
    autoDeactivate = 0             -- Bei welchem Wert soll deaktiviert werden (Standard: 0 = SCBA entfernt)
}

-- Debug Mode (für Entwicklung)
Config.Debug = false 
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wavecore.dev/wavecore/totmannmelder/config.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
