Setring up my Fivem Scripts
Liveries & Vehicle Textures
After Purchase
Configuration
Dependencies
SonoranCAD
Custom Flags & Billboards
Prostitution
Flatten Tires
QB-BlackMarket
Backseat
qb-sheriffjob
Ragdoll
Togglepointing
Vehicle Underglow Toggle
Advanced AI Medic
CES Help Document > FiveM > Advanced AI Medic
Advanced AI Medic
# CES AI Medic
A lightweight, standalone + QBCore-compatible AI EMS solution that revives players and transports them to the nearest hospital if no real EMS are available.
📜 Command Usage
Command | Description | Framework |
---|---|---|
/callmedic | Calls AI EMS to revive the player | All |
⚙️ Configuration Options (config.lua
)
Config.MedicModel = 's_m_m_paramedic_01' -- Medic ped model
Config.AmbulanceModel = 'Ambulance' -- Vehicle model used
Config.ReviveDelay = 10000 -- Time (ms) medic will "treat" the player
Config.Fee = 500 -- Bank fee charged for EMS
Config.MaxEMSOnline = 5 -- AI EMS only triggers below this threshold
-- Hospital drop-off points
Config.Hospitals = {
city = vector3(308.24, -592.42, 43.28),
sandy = vector3(1828.52, 3673.22, 34.28),
paleto = vector3(-247.76, 6331.23, 32.43),
default = vector3(293.0, -582.0, 43.0)
}
🔩 How It Works
- Player types
/callmedic
- If less than
Config.MaxEMSOnline
EMS are on duty, AI medic responds. - An ambulance spawns and drives to the player.
- Medic revives the player using an animation and a med bag prop.
- Player is charged (bank) and taken to the nearest hospital.
- Medic and ambulance despawn.
❗ In standalone mode, QBCore logic is skipped. All messages and charges are simulated.
💬 Notifications
"AI EMS is on the way!"
"You were charged $500 for EMS service."
"Died from: weapon name" (floating 3D text)
"You have been revived by AI EMS."
🧰 Dependencies
✅ QBCore (auto-detects)
❌ No external dependencies for standalone
🛠 Troubleshooting
Not reviving?
Ensure qb-core
is started before this script
Check that EMS online count is below Config.MaxEMSOnline
Verify your client.lua
shows the console log: QBCore detected and initialized
Want to change the revive animation or model?
Modify Config.MedicModel
, Config.ReviveDelay
, or the animation dictionary
Error: Could not get your location.
* Caused when ped coords can't be retrieved from GetEntityCoords
✅ Setup Instructions
- Drag folder into your
resources
directory. - Add to your
server.cfg
:
ensure ces_aimedic
3. Edit config.lua
as needed.
4. Restart your server.
Need more help? Join the support Discord
Review this page