# MX-doctornpc
NPC doctor for RedM (RSG or VORP).
## What it does
- Player uses `/callmedic`.
- If allowed, an NPC doctor comes to the player.
- Doctor treats and revives the player.
- Optional: doctor arrives/leaves on horse.
## Requirements
- `ox_lib`
- `rsg-core` **or** `vorp_core`
- Optional on RSG: `rsg-medic`
## Install
1. Put `MX-doctornpc` inside your `resources` folder.
2. In `server.cfg`, ensure dependencies first, then this resource:
3. Restart server (or `ensure MX-doctornpc`).
## Basic config (`config.lua`)
- `Config.Framework` = `rsg`, or `vorp`
- `Config.Command` = command name (default: `callmedic`)
- `Config.Cooldown` = cooldown in seconds
- `Config.SecondsDeadBeforeCall` = minimum seconds dead before calling
- `Config.MedicArriveOnHorse` = `true/false`
- `Config.UsePayment` and `Config.Price` = optional cost
- `Config.Debug` = debug logs
## Common issues
- **Camera stays in dead mode (VORP):** make sure `vorp_core` is running and framework is set to `vorp`/`auto`.
- **Horse gets stuck:** lower horse spawn distance in `config.lua`.
- **Command not working:** confirm resource is ensured and command is correct.
## Command
- `/callmedic`