
Free Scriptsfree
rps_aimedic
$0.00
Verifying account…
Description
- 🚑 rps_aimedic: AI Medic System No EMS online? Downed players can call an AI doctor who runs to them, performs CPR and revives them for a configurable fee. The server checks every step, and the script runs on ESX, QBCore, QBox or standalone through rps_lib.
Features
Gameplay
- /aimedic while downed spawns a doctor ped that runs to you and plays a CPR animation.
- A progress bar covers the revive. Duration, label and which controls are disabled are all configurable.
- A flashing blip tracks the medic while they're on the way.
- The AI medic only works when real EMS is short. Once more than Config.Doctor EMS are online, requests are blocked so real roleplay comes first.
- Medic stuck? You get pulled to them. If the medic can't path to you within Config.MedicTimeout (blocked route, water, terrain), you fade out, move to the medic and treatment starts there. A stuck medic doesn't cancel the request.
Economy
- Configurable price, charged to cash, bank or any account your framework supports.
- The fee is paid into the society_ambulance account on ESX, so real EMS benefit from AI revives.
- Safety-net refund: if treatment never completes (for example you disconnect mid-revive), you're refunded automatically.
Security / anti-abuse
- Server-authoritative: the server verifies you're actually downed, then checks the cooldown, EMS count and your funds, and charges you before telling the client to spawn the medic.
- A modified client can't skip payment, and can't call a medic while alive.
- Per-player cooldown (Config.Cooldown) plus one active request at a time, so there's no spamming or duplicate medics.
- The medic ped and blip are cleaned up on resource stop and on player disconnect.
Compatibility
- Notifications, progress bar, money, player data and ambulance-job state all go through rps_lib. The same script works on ESX, QBCore, QBox or standalone.
- Works with esx_ambulancejob, qb-ambulancejob and qbx_ambulancejob.
- The society payout is currently ESX-only (society_ambulance). On other frameworks the player is still charged, but nothing is paid to a job account yet. There's a marked extension point in server.lua.
- config.lua is escrow_ignored, so it stays fully editable.
Highlights
📦 Requirements
| Dependency | Notes |
|---|---|
| rps_lib | Required, loaded automatically via dependency |
| ox_lib | Required by rps_lib |
| ESX Legacy / QBCore / QBox | One of these (or standalone with limited money support) |
| esx_ambulancejob / qb-ambulancejob / qbx_ambulancejob | For downed-state de |
🎮 Usage
| Command | Description |
|---|---|
| /aimedic | Request an AI medic while downed (the name is configurable) |