Skip to Content
Mavix

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

  1. You must be dead, and no player with the ambulance job may be on duty.
  2. Type /help. $750 is taken from your cash, or from your bank if cash is short.
  3. 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.
  4. A bar shows "Receiving medical aid" for 20 seconds. Then you get up with full health and the doctor leaves.
MessageWhy
"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 / commandWhat it doesWho
/helpCall the AI doctorDead players, no medic on duty

Config options

File: [esx]/[jobs]/[ambulance]/mvx_ambulance/modules/aidoc/config.lua

OptionWhat it changesExample
Config.PricePrice of the AI doctor750
Config.DoctorThe doctor only comes when this many medics or fewer are on duty0
Config.ReviveTimeTreatment time in ms20000
Config.JobsJobs counted as EMS{ 'ambulance', 'ems' }

Admin Quick Test

Setup

  1. Make sure no medic is on duty: nobody online may have the ambulance or ems job. Take it off yourself: /setjob me unemployed 0.
  2. Give yourself money: /giveaccountmoney me money 1000 (the $750 is taken from cash first, then bank).

Call the doctor

  1. Go somewhere a car can reach, for example near Pillbox: /tp 308.96 -591.52 43.28.
  2. Type /help while alive: you see "This can only be used when dead".
  3. 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.
  4. The ambulance drives to you. If it is stuck for a minute, the doctor is moved next to you.
  5. A bar shows "Receiving medical aid" for 20 seconds.

Result

  1. 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

  1. Give a second player the job: /setjob <their id> ambulance 0. Die and type /help: you see "There are too many medics online". Use /ems to 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.

On this page