> For the complete documentation index, see [llms.txt](https://docs.cuxial.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cuxial.com/scripts/police-and-medical/cuxial-medical.md).

# Cuxial Medical

Medical system for FiveM: death phases, injuries by body zone, hospitals with beds, EMS tools and a live admin panel.

Cuxial Medical handles everything that happens from the moment a player takes damage until they are back on their feet: injuries, the downed state, EMS treatment and the hospital. Most of it can be tuned in game from an admin panel, without restarting the server.

## What it does

* **Death in phases.** Each phase has its own duration, respawn rule and hospital fee. The first one can be a last stand where the player crawls.
* **Death screen** with the countdown, the EMS on duty, a key to call for help and a hold-to-respawn key.
* **Injuries by body zone.** Nine zones, four wound types and four levels, with limp, aim shake, blocked sprint and jump, blackouts and bleeding.
* **EMS items**: defibrillator, medkit, sedative, one treatment item per wound type and a medical bag that can be placed on the ground.
* **Hospitals** with a map blip, beds, a respawn point and an optional reception NPC to check in.
* **Stretcher** that medics carry and load into an ambulance.
* **Finisher** with a melee weapon on a downed player.
* **Optional extras**: knockout by punches, painkillers and a self-use bandage.
* **Distress calls** to the EMS on duty, with a blip, and to the police dispatch when Cuxial Police is running.
* **Admin panel** (`/medadmin`) to edit phases, hospitals, beds, items and the rest of the settings live.
* **Logs** to a Discord webhook and a medical history per character in the database.
* **State kept across reconnects.** A player who leaves while downed comes back downed.

A full walkthrough of each part is in the [Features guide](/scripts/police-and-medical/cuxial-medical/features.md).

## Requirements

| Resource                                  | Required | Used for                                                                                     |
| ----------------------------------------- | -------- | -------------------------------------------------------------------------------------------- |
| OneSync                                   | Yes      | State bags, server-side distance checks                                                      |
| `ox_lib`                                  | Yes      | Commands, key bindings, notifications, progress bars, locales                                |
| `oxmysql`                                 | Yes      | Settings, medical history and audit                                                          |
| `cuxial_bridge`                           | Yes      | Connects to your framework, inventory and target                                             |
| An inventory supported by `cuxial_bridge` | Yes      | Medical items (`ox_inventory` or `qb-inventory`)                                             |
| A target supported by `cuxial_bridge`     | Yes      | Beds, stretcher, medical bag and finisher (`sleepless_interact`, `ox_target` or `qb-target`) |
| `cuxial_interactions`                     | No       | Reception NPC with the check-in dialog                                                       |
| `cuxial_police`                           | No       | Sends distress calls to the police dispatch                                                  |

{% hint style="warning" %}
Cuxial Medical provides `qb-ambulancejob` and manages death by itself. Do not run another death or ambulance script alongside it.
{% endhint %}

{% hint style="warning" %}
`cuxial_bridge` supports QBox, QBCore and ESX. On ESX the script requires player metadata (`getMeta` / `setMeta`) and the duty flag of the job: they restore the downed state after a reconnect and identify the EMS on duty. Hunger and thirst are reset through the `hunger` and `thirst` metadata.
{% endhint %}

## Pages

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Installation</strong></td><td>Dependencies, items, convars and start order.</td><td><a href="/scripts/police-and-medical/cuxial-medical/installation.md">Installation</a></td></tr><tr><td><strong>Features guide</strong></td><td>How death, injuries, EMS tools, hospitals and the admin panel work in game.</td><td><a href="/scripts/police-and-medical/cuxial-medical/features.md">Features guide</a></td></tr><tr><td><strong>Configuration</strong></td><td>Every option in <code>shared/config.lua</code> and the hospital list.</td><td><a href="/scripts/police-and-medical/cuxial-medical/configuration.md">Configuration</a></td></tr><tr><td><strong>Commands &#x26; permissions</strong></td><td>Staff and EMS commands, keys and who can use what.</td><td><a href="/scripts/police-and-medical/cuxial-medical/commands.md">Commands &amp; permissions</a></td></tr><tr><td><strong>Exports &#x26; events</strong></td><td>Read the medical state, revive, heal and injure from your own resources.</td><td><a href="/scripts/police-and-medical/cuxial-medical/developers.md">Exports &amp; events</a></td></tr><tr><td><strong>Troubleshooting</strong></td><td>Common problems and how to fix them.</td><td><a href="/scripts/police-and-medical/cuxial-medical/troubleshooting.md">Troubleshooting</a></td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cuxial.com/scripts/police-and-medical/cuxial-medical.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
