sg-aimedic

Free

AI Medic Script for QBCore that brings an autonomous paramedic unit to your server. When a player dies they can call for an AI-controlled medic that will drive to, revive and charge them.

Overview

sg-aimedic brings an autonomous paramedic unit to your QBCore server. When a player dies they can type /medic (or /medicroad) and an AI-controlled medic will drive to, revive and charge them. If navigation fails, players can force-spawn the medic on-scene after a configurable delay.

This resource is built for reliability and configurability.

Features

  • Smart Path-Finding - Ground ambulance with custom vehicle model support
  • Fully Animated Treatment - Treatment sequence with progress bar
  • Brutal Ambulance Support - Supports brutal ambulance job and uses default revive event as fallback
  • Payment System - Optional charge taken from cash or bank
  • Cooldown System - Cool-down between calls to prevent abuse
  • Force-Spawn Fallback - If the ambulance cannot reach the patient, force-spawn after delay
  • EMS Detection - Automatic check for on-duty EMS – blocks AI medic when real players are online
  • Highly Configurable - Extensive configuration via config.lua

Installation

1

Copy Resource

Copy the folder sg-aimedic into resources/[scripts]/[your_category]/ on your server.

2

Verify Folder Name

Ensure the folder is named exactly sg-aimedic (it must match the value in fxmanifest.lua).

3

Add to server.cfg

Add the line below to your server.cfg (after qb-core):

ensure sg-aimedic
4

Verify Vehicle Model

Make sure the ambulance vehicle model (ambulance) is present on the server or change the model in config.lua.

5

Configure Settings

(Optional) Tweak prices, timings and messages inside config.lua to fit your economy.

Usage

For Players

  1. While dead, run the /medic command (or /medicroad for explicit ground unit)
  2. Wait for the ambulance to arrive
  3. After the default 2-minute window, press E to force-spawn the medic if required
  4. The medic will revive you and deduct the configured fee

Configuration

Key configuration options in config.lua:

KeyDescriptionDefault
Config.PriceAmount charged for revival50,000
Config.ReviveTimeAnimation length (ms)30,000
Config.CooldownTimeCool-down between uses (s)0
Config.ForceSpawnDelayDelay before force-spawn prompt appears (ms)120,000
Config.Vehicles.ground.modelSpawned ambulance vehicle modelambulance

Adjust other values in config.lua to fine-tune the experience.

Dependencies

  • Latest QBCore Framework
  • A compatible vehicle model (default: ambulance)
  • Game build capable of running Lua 5.4 scripts (lua54 'yes' in manifest)

Support

For installation help or bug reports please open a ticket on Discord after purchase.