# Configuration

| Key                             | Purpose / Accepted Values                           | Default     |
| ------------------------------- | --------------------------------------------------- | ----------- |
| **Framework**                   | `"esx"`, `"qb"`, `"auto"`                           | `"auto"`    |
| **Target**                      | `true` to use *target* system, `false` for markers  | `false`     |
| **Language**                    | Translation key (`en`, `de`, `fr` …)                | `"en"`      |
| **Commission**                  | % cut kept by launderer on **custom** washes        | `20`        |
| **Time**                        | Seconds per $1 000 for custom washes                | `45`        |
| **Blip**                        | Sprite, colour, scale, label, visible               | see code    |
| **WashroomOpening.enabled**     | `false` = 24/7                                      | `true`      |
| **openHour / closeHour**        | Opening window (0‑23)                               | `22` / `3`  |
| **use24h**                      | Display times in 24‑h format                        | `false`     |
| **MoneyWashLocations**          | Street *entrance*, interior *washRoom*, marker data | —           |
| **Offers**                      | Preset wash packages (see next section)             | *4 presets* |
| **Controls / Notify callbacks** | Change key prompts & notification system            | —           |

## <mark style="color:yellow;">2‑minute edits</mark>

**Change the commission**

```lua
Config.Commission = 15   -- Launderer keeps 15 %
```

**Restrict opening hours**

```lua
Config.WashroomOpening.enabled  = true
Config.WashroomOpening.openHour = 20   -- 8 PM
Config.WashroomOpening.closeHour = 2   -- 2 AM
```

***

### 💰 Preset “Wash Offers”

Offers live inside the **`Config.Offers`** array.\
Each block defines *title*, *description*, *black\_money* (taken), *time* (seconds) and *commission* (cut).

```lua
-- Example: add a small newbie package
table.insert(Config.Offers, {
    title       = "Starter Rinse",
    description = "Wash $5 000 for a flat 5 % fee.",
    black_money = 5000,     -- player pays 5 k dirty
    time        = 90,       -- completes in 1½ minutes
    commission  = 5         -- keeps 5 %
})
```

*No restart needed* – a simple **`ensure risk-moneywash`** reload will pick it up.

***

### 🔗 Discord Logging (`dcconfig.lua`)

| Key                   | Use                                       |
| --------------------- | ----------------------------------------- |
| `enable`              | Global on/off switch                      |
| `webhook`             | Discord URL                               |
| `username` / `avatar` | Bot name & avatar                         |
| `log_wash_start`      | Send embed when washing **starts**        |
| `log_wash_claim`      | Send embed when clean cash is **claimed** |
| `color`               | Embed bar colour (decimal)                |

The embed includes player name/ID, Discord tag (if linked), license, amount, and timestamp.

***

### 🚪 World Integration

| Point           | Co‑ordinates (default)                    | Action                          |
| --------------- | ----------------------------------------- | ------------------------------- |
| **Entrance**    | `32.25, -626.90, 11.76` (z = ground)      | Enter washroom                  |
| **WashRoom**    | `1138.14, -3199.19, -38.66` (IA Facility) | Open wash menu / exit to street |
| **Extra Zones** | Three vectors around the washers          | Open menu inside room           |

Markers or target zones are created automatically with colours & scale from config.

***

### 🖥️ In‑Game Flow

1. Player reaches **entrance marker**
2. Script checks **opening hours** (if enabled) → teleports to washroom
3. Inside:
   * Choose a **preset offer** **or** enter a **custom amount**
   * Money is removed and placed in the queue
4. Progress bar & “In Process” banner appear (UI keeps track)
5. When ready, player **claims** clean money (bank or cash, configurable)
6. Discord webhook fires (optional)
