> 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/features.md).

# Features guide

How Cuxial Medical works in game: death phases, injuries, EMS tools, hospitals, stretcher and the admin panel.

What players, medics and staff see in game, and the rule behind each part. The values quoted are the defaults; all of them can be changed in [Configuration](/scripts/police-and-medical/cuxial-medical/configuration.md).

## Death and phases

When a player takes fatal damage they do not respawn: they go down and enter the first phase. The death screen shows the phase, the time left, the EMS on duty and the keys available.

| Default phase | Duration | Last stand | Respawn | Fee |
| ------------- | -------- | ---------- | ------- | --- |
| 1             | 60 s     | Yes        | No      | 0   |
| 2             | 300 s    | No         | Yes     | 500 |
| 3             | 600 s    | No         | Yes     | 250 |

* **Last stand.** In a phase marked as last stand the player can crawl with <kbd>W</kbd> <kbd>S</kbd>, turn with <kbd>A</kbd> <kbd>D</kbd> and flip around with <kbd>Space</kbd>. A fatal hit to the head, or dying inside a vehicle, skips the last stand.
* **Call EMS.** <kbd>G</kbd> sends a distress call, once per death. It is available in every phase except the last one.
* **Respawn.** In a phase that allows it, holding <kbd>E</kbd> for 5 seconds charges the fee of that phase and sends the player to the hospital. If other players are within 30 metres, a confirmation appears first.
* **Automatic respawn.** When the last phase runs out, the player respawns at the hospital at no cost.
* **Zoom.** Holding the right mouse button zooms the camera while downed.
* **Voice.** From phase 2 on the downed player is muted, and they hear the others muffled during the whole downed state.

{% hint style="info" %}
The state survives a reconnect. A player who leaves while downed comes back in the phase that matches the time elapsed, and a log is sent to the webhook.
{% endhint %}

### Respawn at the hospital

With `respawn.useBed = true` the player wakes up in the nearest free public bed of the nearest enabled hospital, receives treatment for 15 seconds and stands up healed. If every bed is taken they appear at the respawn point of the hospital instead.

With `respawn.clearInventory = true` the inventory is emptied on respawn, except the items in `respawn.keepItems`. A revive by a medic or by staff never clears it.

### Waiting for the medics

With `respawn.checkIn.enabled = true`, respawning and checking in are blocked while enough EMS are on duty (`minMedics`). The player has to wait for a medic.

## Injuries

Every hit that takes at least 10 health or 5 armour has a 90 % chance of leaving an injury on the zone that was hit.

|        | Values                                                                                                |
| ------ | ----------------------------------------------------------------------------------------------------- |
| Zones  | `head`, `neck`, `spine`, `upper_body`, `lower_body`, `left_arm`, `right_arm`, `left_leg`, `right_leg` |
| Types  | `shot`, `stabbed`, `beat`, `burned`                                                                   |
| Levels | 1 to 4, depending on the weapon                                                                       |

A new hit on an injured zone keeps the highest level and the most serious type. The effects grow with the level:

* **Slower movement**, by the highest injury level.
* **Limp** with an injury of level 2 or more on a leg, the lower body or the spine.
* **Aim shake** and bullet deviation with an arm injury.
* **No sprint** when the movement speed drops below the threshold.
* **No jump** with a leg injury of level 2 or more, with a chance of falling when trying.
* **Blackout** with a head or spine injury of level 3 or 4.
* **Bleeding.** Gunshot and stab wounds bleed: every 10 seconds the player loses health, twice as much while running. Bleeding alone never kills.

Injuries are cleared by a medic, by a hospital check-in, by a revive or by staff.

{% hint style="info" %}
Players with the state bag `inDuel` or `inEvent` are ignored: they take no injuries and do not enter the downed state. Use it from your own duel or event resources.
{% endhint %}

## EMS

A medic is a player whose job is in `jobs` and who is **on duty**. Every medical action checks both. The script adds no duty point: use the duty system of your framework, or the `ToggleDuty` export.

Medics work with items used from the inventory. Each one acts on the nearest player within 3 metres.

| Item                                            | What it does                                                                                                                                                                         |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `defib`                                         | Starts CPR on the nearest downed player and revives them when the animation ends.                                                                                                    |
| `medkit`                                        | After 5 seconds, clears every injury of the patient and restores 25 health. With nobody near, the medic heals themselves. The patient must be standing and have at least one injury. |
| `sedative`                                      | Immobilises the patient for 8 seconds. A sedated patient can be placed on a stretcher or in a vehicle.                                                                               |
| `tweezers`, `suturekit`, `icepack`, `burncream` | After 9 seconds, removes every gunshot, stab, bruise or burn injury of the patient. The item is consumed.                                                                            |
| `medbag`                                        | Places the medical bag on the ground.                                                                                                                                                |

### CPR modes

The revive has two modes. `treatment.reviveAnimMode` chooses which one the `defib` item uses.

| Mode             | Animation        | Item required | Consumed |
| ---------------- | ---------------- | ------------- | -------- |
| `fast` (default) | About 14 seconds | `medkit`      | Yes      |
| `full`           | About 56 seconds | `defib`       | No       |

The patient gets up with the health set in `treatment.reviveHealth` for the wound that downed them.

### Medical bag

Using a `medbag` places it in front of the medic and removes it from the inventory. Each medic can have one bag placed. Through the target, EMS on duty can:

* **Take supplies**: defibrillator, medkit, sedative and the four treatment items.
* **Pick up bag**: returns it to the inventory.

{% hint style="warning" %}
Supplies taken from the bag are free and unlimited. Hand out the `medbag` item only to the EMS.
{% endhint %}

### Distress calls

A call from a downed player reaches every EMS on duty as a notification and a flashing blip that lasts 60 seconds. With `cuxial_police` running and `dispatch.police = true`, the police dispatch receives it too. The call is removed when the patient is revived or respawns.

### Stretcher

`/stretcher` places a stretcher in front of the medic, or picks up one within 3 metres. While carrying it:

* <kbd>X</kbd> drops it.
* <kbd>E</kbd> loads it into the nearest vehicle listed in `stretcher.vehicles`.

A placed stretcher also has two target options: pick up, and load into vehicle. `/delstretcher` removes the nearest one.

Placing a patient on the stretcher, choosing the pose and toggling the accessories are done through [exports](/scripts/police-and-medical/cuxial-medical/developers.md#stretcher), so you can bind them to your own menu. The patient must be downed or sedated, and stands up with <kbd>X</kbd>.

## Hospital

Each hospital has a name, a map blip, a respawn point, a check-in radius and a list of beds.

* **Beds.** Any player can lie down on a bed through the target and get up with <kbd>E</kbd>. Beds marked as private are never assigned automatically, but can still be used by hand.
* **Reception.** With `cuxial_interactions` running, an NPC stands at the reception. Talking to it offers a check-in: the player is taken to a free bed, treated for 15 seconds and leaves healed and without injuries. The check-in is free.
* **Check-in rules.** The hospital must be enabled and the player within its check-in radius, standing and not already in a bed.

## Finisher

A player holding one of the melee weapons in `finisher.weapons` gets a target option on a downed player who is not yet in the last phase. Both play a synchronised animation and, with `finisher.forceFinalPhase = true`, the victim jumps to the last phase.

## Extras

All three are disabled by default.

| Extra            | What it does                                                                                                       |
| ---------------- | ------------------------------------------------------------------------------------------------------------------ |
| Knockout         | A punch that leaves the player at 150 health or less knocks them out for 7 seconds, while they regain some health. |
| Painkillers      | Usable by anyone. While active they suppress the injury effects and the bleeding, with an optional visual effect.  |
| Self-use bandage | Usable by anyone. After 7 seconds restores 30 health, and can stop the bleeding.                                   |

## Admin panel

`/medadmin` opens the panel for staff. Each section is saved on its own and applies to every player at once.

| Section            | What you edit                                     |
| ------------------ | ------------------------------------------------- |
| EMS jobs           | Jobs that count as EMS                            |
| Death and phases   | Phases, mute, zoom, keys, hold time               |
| Respawn            | Account charged, beds, inventory, check-in        |
| Injuries           | Thresholds, bleeding, effects, notifications      |
| Treatment          | Times, range, CPR, items by wound type            |
| Items              | Revive, heal, sedate and medical bag items        |
| Stretcher          | Model, carry offset, compatible vehicles          |
| Finisher           | Weapons, cooldown, distance                       |
| Extras             | Knockout, painkillers, self-use bandage           |
| Dispatch           | Cooldown and police alert                         |
| Logs               | What is logged                                    |
| Hospitals and beds | Hospitals, respawn points, blips, beds, reception |

* **Factory** resets a section to the values of the files.
* **Export** copies the modified sections to the clipboard as JSON. **Import** pastes them on another server.
* In **Hospitals and beds**, **Here** takes your position, **Go** teleports you to a point and **Place** lets you position the reception NPC with a preview: mouse wheel to rotate, <kbd>Shift</kbd> + wheel for height, <kbd>E</kbd> or click to confirm, right click or <kbd>Esc</kbd> to cancel.
* Sections marked **Restart** need a resource restart to apply completely.

Every save is written to the audit table and, with a webhook set, sent to Discord.


---

# 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/features.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.
