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
Copy Resource
Copy the folder sg-aimedic into resources/[scripts]/[your_category]/ on your server.
Verify Folder Name
Ensure the folder is named exactly sg-aimedic (it must match the value in fxmanifest.lua).
Add to server.cfg
Add the line below to your server.cfg (after qb-core):
ensure sg-aimedicVerify Vehicle Model
Make sure the ambulance vehicle model (ambulance) is present on the server or change the model in config.lua.
Configure Settings
(Optional) Tweak prices, timings and messages inside config.lua to fit your economy.
Usage
For Players
- While dead, run the
/mediccommand (or/medicroadfor explicit ground unit) - Wait for the ambulance to arrive
- After the default 2-minute window, press E to force-spawn the medic if required
- The medic will revive you and deduct the configured fee
Configuration
Key configuration options in config.lua:
| Key | Description | Default |
|---|---|---|
Config.Price | Amount charged for revival | 50,000 |
Config.ReviveTime | Animation length (ms) | 30,000 |
Config.CooldownTime | Cool-down between uses (s) | 0 |
Config.ForceSpawnDelay | Delay before force-spawn prompt appears (ms) | 120,000 |
Config.Vehicles.ground.model | Spawned ambulance vehicle model | ambulance |
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.