> 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/es/policia-y-medico/cuxial-medical.md).

# Cuxial Medical

Sistema médico para FiveM: muerte por fases, heridas por zona del cuerpo, hospitales con camas, herramientas de EMS y panel de administración en vivo.

Cuxial Medical se encarga de todo lo que pasa desde que un jugador recibe daño hasta que vuelve a estar en pie: heridas, estado caído, tratamiento de los EMS y hospital. Casi todo se ajusta dentro del juego desde un panel de administración, sin reiniciar el servidor.

## Qué hace

* **Muerte por fases.** Cada fase tiene su duración, su regla de reaparición y su tarifa de hospital. La primera puede ser un último aliento en el que el jugador gatea.
* **Pantalla de muerte** con la cuenta atrás, los EMS de servicio, una tecla para pedir ayuda y otra para reaparecer manteniéndola pulsada.
* **Heridas por zona del cuerpo.** Nueve zonas, cuatro tipos de herida y cuatro niveles, con cojera, temblor al apuntar, bloqueo de esprint y salto, desmayos y sangrado.
* **Ítems de EMS**: desfibrilador, medikit, sedante, un ítem de tratamiento por tipo de herida y un bolso médico que se coloca en el suelo.
* **Hospitales** con blip en el mapa, camas, punto de reaparición y un NPC de recepción opcional para registrarse.
* **Camilla** que los médicos llevan y cargan en la ambulancia.
* **Remate** con arma blanca sobre un jugador caído.
* **Extras opcionales**: nocaut a puñetazos, analgésicos y vendaje de uso propio.
* **Avisos de auxilio** a los EMS de servicio, con blip, y a la central de la policía cuando Cuxial Police está en marcha.
* **Panel de administración** (`/medadmin`) para editar en vivo las fases, los hospitales, las camas, los ítems y el resto de ajustes.
* **Registros** en un webhook de Discord e historial médico por personaje en la base de datos.
* **Estado que sobrevive a la reconexión.** Quien sale estando caído vuelve caído.

El recorrido completo de cada parte está en la [Guía de funciones](/scripts/es/policia-y-medico/cuxial-medical/features.md).

## Requisitos

| Recurso                                      | Obligatorio | Para qué se usa                                                                         |
| -------------------------------------------- | ----------- | --------------------------------------------------------------------------------------- |
| OneSync                                      | Sí          | State bags y comprobaciones de distancia en el servidor                                 |
| `ox_lib`                                     | Sí          | Comandos, teclas, notificaciones, barras de progreso, idiomas                           |
| `oxmysql`                                    | Sí          | Ajustes, historial médico y auditoría                                                   |
| `cuxial_bridge`                              | Sí          | Conecta con tu framework, inventario y target                                           |
| Un inventario compatible con `cuxial_bridge` | Sí          | Ítems médicos (`ox_inventory` o `qb-inventory`)                                         |
| Un target compatible con `cuxial_bridge`     | Sí          | Camas, camilla, bolso médico y remate (`sleepless_interact`, `ox_target` o `qb-target`) |
| `cuxial_interactions`                        | No          | NPC de recepción con el diálogo de registro                                             |
| `cuxial_police`                              | No          | Envía los avisos de auxilio a la central de la policía                                  |

{% hint style="warning" %}
Cuxial Medical proporciona `qb-ambulancejob` y gestiona la muerte por sí mismo. No arranques otro script de muerte o de ambulancia a la vez.
{% endhint %}

{% hint style="warning" %}
`cuxial_bridge` es compatible con QBox, QBCore y ESX. En ESX el script requiere los metadatos del jugador (`getMeta` / `setMeta`) y el estado de servicio del trabajo: con ellos se recupera el estado caído tras reconectar y se identifica a los EMS de servicio. El hambre y la sed se restablecen mediante los metadatos `hunger` y `thirst`.
{% endhint %}

## Páginas

<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>Instalación</strong></td><td>Dependencias, ítems, convars y orden de arranque.</td><td><a href="/scripts/es/policia-y-medico/cuxial-medical/installation.md">Instalación</a></td></tr><tr><td><strong>Guía de funciones</strong></td><td>Cómo funcionan en juego la muerte, las heridas, las herramientas de EMS, los hospitales y el panel.</td><td><a href="/scripts/es/policia-y-medico/cuxial-medical/features.md">Guía de funciones</a></td></tr><tr><td><strong>Configuración</strong></td><td>Todas las opciones de <code>shared/config.lua</code> y la lista de hospitales.</td><td><a href="/scripts/es/policia-y-medico/cuxial-medical/configuration.md">Configuración</a></td></tr><tr><td><strong>Comandos y permisos</strong></td><td>Comandos de staff y de EMS, teclas y quién puede usar qué.</td><td><a href="/scripts/es/policia-y-medico/cuxial-medical/commands.md">Comandos y permisos</a></td></tr><tr><td><strong>Exports y eventos</strong></td><td>Lee el estado médico, reanima, cura y hiere desde tus propios recursos.</td><td><a href="/scripts/es/policia-y-medico/cuxial-medical/developers.md">Exports y eventos</a></td></tr><tr><td><strong>Problemas frecuentes</strong></td><td>Fallos habituales y cómo resolverlos.</td><td><a href="/scripts/es/policia-y-medico/cuxial-medical/troubleshooting.md">Problemas frecuentes</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/es/policia-y-medico/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.
