# Konfiguration

### Übersicht

FJX TÜV-SYSTEM ist über die Datei `config.lua` umfassend anpassbar. Diese Seite erklärt alle Konfigurationsoptionen im Detail.

***

### Sprache & Debug

```lua
Config.Locale = 'de'    -- 'de' oder 'en'
Config.Debug = false    -- true = Console-Ausgaben, false = keine Ausgaben
```

| Option     | Werte           | Beschreibung                 |
| ---------- | --------------- | ---------------------------- |
| **Locale** | `'de'`, `'en'`  | Sprache für alle Texte       |
| **Debug**  | `true`, `false` | Console-Logs für Entwicklung |

***

### Keybinds

```lua
Config.Keybinds = {
    CheckTuev = 38,     -- E - TÜV prüfen
    Diagnose = 74,      -- H - Fahrzeugdiagnose
    RenewTuev = 26      -- C - TÜV erneuern
}
```

#### Häufige Key-Codes

| Taste | Code | Taste | Code | Taste | Code |
| ----- | ---- | ----- | ---- | ----- | ---- |
| E     | 38   | H     | 74   | C     | 26   |
| G     | 47   | F     | 23   | X     | 73   |
| Q     | 44   | R     | 45   |       |      |

***

### Target-System

```lua
Config.Target = 'none'                  -- 'ox_target', 'qb-target', 'none'
Config.Use3DText = true                 -- 3D-Text über Fahrzeugen
Config.Interaction3DDistance = 3.0      -- Radius in Metern
```

| Option                    | Werte                                  | Beschreibung                 |
| ------------------------- | -------------------------------------- | ---------------------------- |
| **Target**                | `'ox_target'`, `'qb-target'`, `'none'` | Target-System                |
| **Use3DText**             | `true`, `false`                        | 3D-Text bei Target = 'none'  |
| **Interaction3DDistance** | Zahl                                   | Maximale Distanz für 3D-Text |

***

### UI-Systeme

```lua
Config.NotifyType = 'ox_lib'    -- Benachrichtigungen
Config.ProgressType = 'ox_lib'  -- Progress-Bars
Config.MenuType = 'ox_lib'      -- Menüs
```

#### Notification-Systeme

* `'ox_lib'` - Ox Library (empfohlen)
* `'esx'` - ESX Notifications
* `'qb'` - QBCore Notifications
* `'chat'` - Chat-Nachrichten
* `'native'` - GTA V Native

#### Progress-Bar-Systeme

* `'ox_lib'` - Ox Library (empfohlen)
* `'progressBars'` - Progress Bars
* `'qb-progressbar'` - QB Progress Bar
* `'esx_progressbar'` - ESX Progress Bar
* `'none'` - Keine Progress-Bars

#### Menü-Systeme

* `'ox_lib'` - Ox Library (empfohlen)
* `'esx_menu_default'` - ESX Default
* `'qb-menu'` - QB Menu
* `'native'` - Native Input

***

### TÜV-Einstellungen

```lua
Config.TuevGueltigTage = 14    -- Gültigkeit in Tagen (2 Jahre)
Config.WarnungAbTagen = 3      -- Warnung ab X Tagen vor Ablauf
Config.ErneuerungAbTagen = 7   -- Erneuerung möglich ab X Tagen vor Ablauf
```

#### Status-System

| Tage übrig     | Status     | Farbe |
| -------------- | ---------- | ----- |
| > 3            | GÜLTIG     | Grün  |
| 1-3            | WARNUNG    | Gelb  |
| 0 oder negativ | ABGELAUFEN | Rot   |
| Kein Eintrag   | KEIN TÜV   | Grau  |

***

### Zahlungssystem

```lua
Config.Price = 750                      -- Preis in €
Config.PaymentMethod = 'bill'           -- 'direct' oder 'bill'
Config.PaymentTarget = 'society'        -- 'player' oder 'society'
Config.SocietyName = 'mechanic'         -- Society-Name
```

| Option            | Werte                   | Beschreibung                               |
| ----------------- | ----------------------- | ------------------------------------------ |
| **Price**         | Zahl                    | Kosten für TÜV-Erneuerung                  |
| **PaymentMethod** | `'direct'`, `'bill'`    | Sofort oder Rechnung                       |
| **PaymentTarget** | `'player'`, `'society'` | Empfänger der Zahlung                      |
| **SocietyName**   | String                  | Name der Society (ohne 'society\_' Prefix) |

#### Billing-Optionen

```lua
Config.EnableBilling = true             -- Rechnungssystem aktiviert
Config.BillingRadius = 15.0             -- Radius für Spieler-Auswahl
Config.AllowSelfBilling = true          -- Selbst abrechnen erlaubt
Config.BillingSystem = 'auto'           -- 'auto', 'esx_billing', 'qb-management'
Config.UseCharacterName = true          -- RP-Namen statt Steam-Namen
```

***

### Jobs

```lua
Config.MechanicJobs = {
    'mechanic',
    'tuner',
    'bennys'
}

Config.PoliceJobs = {
    'police',
    'sheriff'
}
```

Füge beliebig viele Jobs hinzu. Job-Namen müssen mit deinem Framework übereinstimmen.

***

### TÜV-Stationen

```lua
Config.InspectionStations = {
    {
        coords = vec3(-339.85, -136.92, 39.01),
        heading = 70.0,
        blip = {
            enabled = true,
            sprite = 446,
            color = 5,
            scale = 0.8,
            label = 'TÜV Station'
        }
    }
}
```

#### Station hinzufügen

```lua
{
    coords = vec3(X, Y, Z),     -- Position
    heading = 0.0,               -- Fahrzeug-Ausrichtung
    blip = {
        enabled = true,          -- Blip anzeigen
        sprite = 446,            -- Blip-Symbol
        color = 5,               -- Farbe (5 = Gelb)
        scale = 0.8,             -- Größe
        label = 'TÜV Station'    -- Name
    }
}
```

**Tipp:** Nutze `/coords` in der F8-Konsole um Koordinaten zu ermitteln.

***

### Progress-Bars & Animationen

```lua
Config.DiagnosisDuration = 6000     -- Diagnose-Dauer (ms)
Config.RenewTuevDuration = 5000     -- TÜV-Erneuerung-Dauer (ms)
```

Zeit in Millisekunden (1000 ms = 1 Sekunde).

***

### Diagnose-Anforderungen

```lua
Config.MinimumEngineHealth = 700.0      -- Min. Motor (0-1000)
Config.MinimumBodyHealth = 800.0        -- Min. Karosserie (0-1000)
Config.RequireAllLights = true          -- Lichter prüfen
Config.CheckTireCondition = true        -- Reifen prüfen
```

#### Defekt-Kategorien

```lua
Config.DefectCategories = {
    critical = {
        engineHealth = { 
            threshold = 700, 
            message = 'Motor stark beschädigt - Nicht verkehrssicher' 
        },
        bodyHealth = { 
            threshold = 800, 
            message = 'Karosserie stark beschädigt - Unfallschaden' 
        }
    },
    warning = {
        engineHealth = { 
            threshold = 900, 
            message = 'Motor leicht beschädigt - Reparatur empfohlen' 
        },
        bodyHealth = { 
            threshold = 950, 
            message = 'Karosserie Kratzer und Beulen' 
        }
    },
    info = {
        tirePressure = { message = 'Reifendruck prüfen' },
        fluidLevels = { message = 'Flüssigkeitsstände kontrollieren' }
    }
}
```

**Defekt-Level:**

* **critical**: Fahrzeug besteht TÜV nicht
* **warning**: Reparatur empfohlen
* **info**: Hinweise

***

### Minigames

#### Diagnose-Minigame

```lua
Config.EnableMinigame = true
Config.MinigameType = 'sequence'        -- 'sequence', 'path', 'keyspam', 'random'
Config.MinigameDifficulty = 'medium'    -- 'easy', 'medium', 'hard'
```

#### Minigame-Typen

| Typ          | Beschreibung                     |
| ------------ | -------------------------------- |
| **sequence** | Merke Tastenfolge und wiederhole |
| **path**     | Folge Pfad mit Maus              |
| **keyspam**  | Drücke schnell Taste             |
| **random**   | Zufälliger Typ                   |

#### Schwierigkeitsgrade

| Schwierigkeit | Sequence      | Path            | Keyspam       |
| ------------- | ------------- | --------------- | ------------- |
| **Easy**      | 3 Tasten, 12s | 4 Schritte, 10s | 15 Klicks, 8s |
| **Medium**    | 4 Tasten, 10s | 6 Schritte, 8s  | 25 Klicks, 8s |
| **Hard**      | 5 Tasten, 8s  | 8 Schritte, 6s  | 35 Klicks, 8s |

#### Detaillierte Einstellungen

```lua
Config.MinigameSettings = {
    sequence = {
        easy = { length = 3, time = 12 },
        medium = { length = 4, time = 10 },
        hard = { length = 5, time = 8 }
    },
    path = {
        easy = { steps = 4, time = 10 },
        medium = { steps = 6, time = 8 },
        hard = { steps = 8, time = 6 }
    },
    keyspam = {
        easy = { required = 15, time = 8 },
        medium = { required = 25, time = 8 },
        hard = { required = 35, time = 8 }
    }
}
```

#### Plaketten-Minigame

```lua
Config.EnablePlaketteMinigame = true    -- Plaketten-Auswahl aktivieren
Config.PlaketteMinigameOptions = 6      -- Anzahl Optionen (3-9)
```

***

### Warnungen

```lua
Config.EnableReminders = true       -- Warnung beim Einsteigen
Config.ReminderDays = 30            -- Warnung ab X Tagen vor Ablauf
```

Spieler wird beim Einsteigen gewarnt, wenn TÜV bald abläuft.

***

### Admin-Einstellungen

```lua
Config.AdminGroups = {
    'admin',
    'superadmin'
}
```

Admin-Gruppen für Commands wie `/tuevcheck [kennzeichen]`.

***

### Konfigurationsbeispiele

#### Hardcore-RP-Server

```lua
Config.TuevGueltigTage = 365        -- 1 Jahr
Config.WarnungAbTagen = 14          -- 2 Wochen Warnung
Config.Price = 1500
Config.PaymentMethod = 'bill'
Config.PaymentTarget = 'society'
Config.AllowSelfBilling = false

Config.MinimumEngineHealth = 800.0
Config.MinimumBodyHealth = 900.0
Config.MinigameDifficulty = 'hard'
```

#### Casual-RP-Server

```lua
Config.TuevGueltigTage = 730        -- 2 Jahre
Config.WarnungAbTagen = 60
Config.Price = 500
Config.PaymentMethod = 'direct'
Config.AllowSelfBilling = true

Config.MinimumEngineHealth = 600.0
Config.MinimumBodyHealth = 700.0
Config.MinigameDifficulty = 'easy'
Config.EnablePlaketteMinigame = false
```

#### Performance-Optimiert

```lua
Config.Debug = false
Config.Use3DText = false
Config.Target = 'ox_target'
Config.ProgressType = 'none'
Config.EnableMinigame = false
Config.EnablePlaketteMinigame = false
```

***

### Framework-spezifische Hinweise

#### ESX

Für optimale ESX-Performance:

```lua
Config.NotifyType = 'esx'
Config.ProgressType = 'esx_progressbar'
Config.MenuType = 'esx_menu_default'
Config.BillingSystem = 'esx_billing'
```

**Wichtig:**

* `esx_addonaccount` für Society-Payments
* Society muss in Datenbank existieren

#### QBCore

Für optimale QBCore-Performance:

```lua
Config.NotifyType = 'qb'
Config.ProgressType = 'qb-progressbar'
Config.MenuType = 'qb-menu'
Config.BillingSystem = 'qb-management'
```

**Wichtig:**

* `qb-management` für Society-Payments
* Job muss in qb-core konfiguriert sein

***

### Erweiterte Anpassungen

#### Eigene Übersetzungen

```lua
Config.Translations['de']['notif_tuev_success'] = 'TÜV erfolgreich erneuert!'
Config.Translations['en']['notif_tuev_success'] = 'MOT renewed successfully!'
```

#### Mehrere Mechaniker-Jobs

```lua
Config.MechanicJobs = {
    'mechanic',
    'tuner',
    'bennys',
    'lsc',
    'autohaus',
    'customshop'
}
```

***


---

# 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://fjx.gitbook.io/fjx-docs/tuv-system/konfiguration.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.
