> For the complete documentation index, see [llms.txt](https://docs.menanak47.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.menanak47.com/multi-framework/ak47_drugmanagerv3/overdose.md).

# Overdose

Ak47 Drug Manager V3 features a realistic drug toxicity and overdose system that tracks active substances in the player's bloodstream in real-time.

### ⚠️ 1. How Overdose is Triggered

Configured in `configs/usable.lua` under `Config.OverDoseLimit` and `Config.DrugStayInBlood`:

* **Single-Drug Toxicity**: Consuming the same drug **10 times** (`Config.OverDoseLimit.same_drug`) within the bloodstream retention window.
* **Poly-Drug Mixture (Lethal Mix)**: Mixing **5 different drug types** (`Config.OverDoseLimit.mixed_drug`) concurrently in the bloodstream.
* **Bloodstream Window**: Traces remain active in the player's blood for **5 minutes** per dose (`Config.DrugStayInBlood`).

***

### 🩸 2. Symptoms & Overdose Effects

When an overdose occurs:

1. **Screen Notification**: Alerts the player with a warning notification:\
   `_U('overdose')` (*"Overdose is killing you. Take recovery medicine to feel better again!"*).
2. **Lethal Health Drain**: The player loses **1 HP every second** (`Config.OverdoseEffect.HealthLose = 1`, `tick = 1`) until cured or incapacitated.
3. **Event Broadcast**: Dispatches the `ak47_drugmanagerv3:onOverdose` event across both client and server:

   ```lua
   TriggerEvent('ak47_drugmanagerv3:onOverdose', {
       mixed = true, -- true if mixed drug overdose
       drugs = usedDrug -- table of active substances in blood
   })
   ```
4. **Death Reset**: If the player dies from the overdose, active blood toxicity and overdose counters reset automatically.

***

### 💉 3. Cures & Medical Treatment

| Item ID    | Item Label |      Type      | Use Case & Effect                                                                                                                                                                                                                    |
| ---------- | ---------- | :------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `antidote` | Antidote   | Usable Syringe | **Emergency Overdose Reversal**: Injected via syringe animation (`miranda_shooting_up`). Immediately stops lethal health drain, clears blood toxicity, broadcasts `ak47_drugmanagerv3:onAntidoteUsed`, and saves the player's state. |

***

### 🩺 4. Police & EMS Blood Drug Testing

| Item ID       | Item Label    |     Type    | Use Case & Effect                                                                                                                                                                                                                                                                  |
| ------------- | ------------- | :---------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `drugtestkit` | Drug Test Kit | Usable Tool | **Diagnostic Swab**: Police officers and EMS medics can interact with a target player to perform a blood swab (`ak47_drugmanagerv3:drugtestkit`). Opens an interactive **React NUI Diagnostic Report** showing all detected substances and their remaining blood retention timers. |

***

### 👑 5. Admin Management Commands

Admins (or server console) can clear active overdoses using the following commands:

| Command           | Syntax                        | Description                                                                                    |
| ----------------- | ----------------------------- | ---------------------------------------------------------------------------------------------- |
| `/removeoverdose` | `/removeoverdose [player_id]` | Clears active overdose, stops health drain, and resets visual screen shaders.                  |
| `/cleardrugs`     | `/cleardrugs [player_id]`     | Complete wipe: clears all overdoses, addictions, tolerances, and active shaders in one action. |

***

### ⚙️ 6. Configuration Reference (`configs/usable.lua`)

```lua
Config.DrugStayInBlood = 5 -- 5 minutes retention window

Config.OverDoseLimit = {
    same_drug = 10,  -- Maximum doses of the same drug before overdose
    mixed_drug = 5,  -- Maximum different drug types before lethal mix
}

Config.OverdoseEffect = {
    tick = 1,        -- Health loss interval in seconds
    HealthLose = 1,  -- HP lost per tick
}

Config.TestKit = 'drugtestkit'
Config.RemoveKit = true
Config.DrugTestDelay = 5 -- Test progress duration in seconds
```
