AI Doctor
A computer doctor that revives a dead player when no medic is on duty.
What it is
When no medic is on duty, a dead player can type /help. An NPC ambulance drives to them, the doctor does CPR and
the player gets up, for $750.
How it works
- You must be dead, and no player with the ambulance job may be on duty.
- Type
/help. $750 is taken from your cash, or from your bank if cash is short. - An ambulance spawns nearby and drives to you (a blip shows where it is). If it cannot reach you within a minute, the doctor is moved next to you.
- A bar shows "Receiving medical aid" for 20 seconds. Then you get up with full health and the doctor leaves.
| Message | Why |
|---|---|
| "This can only be used when dead" | You are alive |
| "There are too many medics online" | A medic is on duty: call them with /ems |
| "Not enough money" | You have less than $750 in cash and bank |
| "The paramedic is on the way" | A doctor is already coming |
Keys & commands
| Key / command | What it does | Who |
|---|---|---|
/help | Call the AI doctor | Dead players, no medic on duty |
Config options
File: [esx]/[jobs]/[ambulance]/mvx_ambulance/modules/aidoc/config.lua
| Option | What it changes | Example |
|---|---|---|
Config.Price | Price of the AI doctor | 750 |
Config.Doctor | The doctor only comes when this many medics or fewer are on duty | 0 |
Config.ReviveTime | Treatment time in ms | 20000 |
Config.Jobs | Jobs counted as EMS | { 'ambulance', 'ems' } |
Admin Quick Test
Setup
- Make sure no medic is on duty: nobody online may have the
ambulanceoremsjob. Take it off yourself:/setjob me unemployed 0. - Give yourself money:
/giveaccountmoney me money 1000(the $750 is taken from cash first, then bank).
Call the doctor
- Go somewhere a car can reach, for example near Pillbox:
/tp 308.96 -591.52 43.28. - Type
/helpwhile alive: you see "This can only be used when dead". - Die (for example a high fall) and type
/help. You see "The paramedic is on the way" and a flashing blip where the ambulance spawned. - The ambulance drives to you. If it is stuck for a minute, the doctor is moved next to you.
- A bar shows "Receiving medical aid" for 20 seconds.
Result
- You get up with full health and see "Your treatment is done, you were charged: $750". Your cash is $750 lower. The doctor and ambulance drive away.
Medics online
- Give a second player the job:
/setjob <their id> ambulance 0. Die and type/help: you see "There are too many medics online". Use/emsto call them instead.
If it doesn't work: "Not enough money" means less than $750 in cash and bank together. "The paramedic is on the way" when nothing comes: only one visit at a time; it resets after 5 minutes.