> 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-diseases.md).

# Cuxial Diseases

Disease system for FiveM with stages, animated symptoms, contagion, tests, treatments and vaccines.

Cuxial Diseases gives every character a medical state: they can catch a disease, feel its symptoms, get tested, take a treatment and be cured. Every disease is defined in one data file, so you add or change them without touching code.

## What it does

* **Diseases as data.** Six diseases are included as a starting catalog. Each one is an entry in `data/diseases.lua` with its stages, symptoms, test, treatment, vaccine and cure plan.
* **Stages in real hours.** A disease moves to its next stage when the time runs out, also while the player is offline. An active treatment can pause it.
* **Symptoms the player feels.** Cough, dizziness, vomiting, shortness of breath, blurred vision, camera shake and health loss, each at its own interval.
* **Three ways to catch one.** Proximity to a sick player (off by default), contact between two characters reported by another resource, or manually through an export, a command or the vaccination deadline.
* **Tests and diagnosis.** A test item returns negative, inconclusive or positive. By default the patient only learns the name of the disease once it is diagnosed.
* **Treatment by doses.** An item controls the disease for some hours and, for curable diseases, cures it after a set number of doses.
* **Vaccines and immunity.** Temporary or permanent, from a vaccine item or after being cured.
* **Vaccination deadline.** Optional: each character gets a number of real hours to get vaccinated; otherwise they fall ill.
* **Lethal stages.** A terminal stage can make the patient collapse.
* **Pregnancy.** Months, symptoms, belly clothing, labour and birth, followed from the same resource.
* **Health app for the phone**, with diagnosed diseases, treatment, immunities and history.
* **Staff commands** to assign, cure and test everything in game.

## Requirements

| Resource                         | Required         | Used for                                                                            |
| -------------------------------- | ---------------- | ----------------------------------------------------------------------------------- |
| OneSync                          | Yes              | Player positions on the server                                                      |
| `ox_lib`                         | Yes              | Commands, callbacks, scheduled tasks, locales                                       |
| `oxmysql`                        | Yes              | Cases, immunities, deadlines and history                                            |
| `cuxial_bridge`                  | Yes              | Connects to your framework and your inventory                                       |
| `ox_inventory` or `qb-inventory` | Yes, one of them | Test, treatment and vaccine items                                                   |
| `cuxial_police`                  | No               | EMS side in the MDT: patient file, pharmacy, cure plan with minigames, appointments |
| `cuxial_medical`                 | No               | Knocks the patient down when a lethal stage collapses                               |
| `cuxial_emotes`                  | No               | Contagion and conception between two characters                                     |
| `lb-phone`                       | No               | Health app on the phone                                                             |

{% hint style="warning" %}
The vaccination deadline reads the character table of your framework and needs the columns `id` and `citizenid`. QBox and QBCore have them. On ESX, keep `onboarding.enabled = false`; the rest of the script goes through `cuxial_bridge`.
{% endhint %}

## What works without the optional resources

Cuxial Diseases runs on its own. This is what each optional resource adds and what happens without it.

| Without          | Still works                                                                                                                         | Not available                                                                                                                                                 |
| ---------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `cuxial_police`  | Infection, stages, symptoms, test items, treatment by doses, vaccines, immunity, vaccination deadline, staff commands, every export | The EMS screens, the cure plan steps applied by a doctor (including the minigame), pharmacy, appointments, automatic pregnancy check-ups and the labour alert |
| `cuxial_medical` | The `collapse` event is still sent to other resources                                                                               | The patient is not knocked down when a lethal stage collapses                                                                                                 |
| `cuxial_emotes`  | Contagion and pregnancy through exports and commands                                                                                | Contagion and conception after an encounter, and the test item marked as external in the catalog                                                              |
| `lb-phone`       | Notifications on screen                                                                                                             | The Health app                                                                                                                                                |

{% hint style="info" %}
Without Cuxial Police, a disease is cured by completing its doses, with `/disease cure`, or from your own resource with the exports `AdvanceCureStep` and `Cure`.
{% 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, permissions and start order.</td><td><a href="/scripts/police-and-medical/cuxial-diseases/installation.md">Installation</a></td></tr><tr><td><strong>Configuration</strong></td><td>Every option, the disease catalog and how to add your own disease.</td><td><a href="/scripts/police-and-medical/cuxial-diseases/configuration.md">Configuration</a></td></tr><tr><td><strong>Commands &#x26; permissions</strong></td><td>Staff commands to assign, cure and test.</td><td><a href="/scripts/police-and-medical/cuxial-diseases/commands.md">Commands &amp; permissions</a></td></tr><tr><td><strong>Exports &#x26; events</strong></td><td>Infect, test, treat and cure from your own resources.</td><td><a href="/scripts/police-and-medical/cuxial-diseases/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-diseases/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-diseases.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.
