AI Doctor System for FiveM. Provides an automated paramedic NPC and vehicle to revive players when EMS is unavailable. Designed for server owners and developers seeking a reliable, configurable fallback medical system.
- Automated paramedic NPC and ambulance vehicle
- Revives dead players when EMS is offline or unavailable
- Configurable costs, revive times, and emergency timeouts
- Emergency teleport to hospital if NPC cannot reach player
- Discord webhook logging for all major events
- Highly configurable via
config.lua - Optimized for performance and reliability
- Standalone, but requires
community_bridgefor framework abstraction
| Dependency | Required | Link |
|---|---|---|
| community_bridge | Yes | community_bridge |
| Discord Webhook | Optional | Discord Docs |
Note:
community_bridgemust start before this resource.
- Download and place this resource in your
[scripts]folder. - Ensure
community_bridgeis installed and started beforegldnrmz-aidoc. - Add the following to your
server.cfg:ensure community_bridge ensure gldnrmz-aidoc - Configure settings in
config.luaas needed.
All configuration is handled in config.lua.
Example:
Config.Debug = false
Config.Vehicle = "ambulance"
Config.Doctor = 0 -- Minimum EMS required online
Config.Price = 1000 -- Cost for AI Doc
Config.ReviveTime = 10 -- Revive time (seconds)
Config.TPTime = 60 -- Teleport time (seconds)
Config.EMSJobName = "ambulance"
Config.HospitalCoords = {
vector4(100.77, -416.16, 40.25, 162.58),
}
Config.EmergencyTimeout = 120
Config.Webhook = {
enabled = true,
url = "YOUR_DISCORD_WEBHOOK_URL",
botName = "AI Doctor Bot",
color = 3447003,
avatar = "https://i.imgur.com/your-avatar.png"
}| Field | Type | Description |
|---|---|---|
| Debug | boolean | Enable debug prints |
| Vehicle | string | Vehicle spawn name for AI doctor |
| Doctor | integer | Min EMS required online to block AI doc |
| Price | integer | Cost for AI doc service |
| ReviveTime | integer | Time to revive (seconds) |
| TPTime | integer | Time before emergency teleport (seconds) |
| EMSJobName | string | Job name for EMS online check |
| HospitalCoords | vector4[] | Hospital teleport location(s) |
| EmergencyTimeout | integer | Max wait before forced hospital transport |
| Webhook | table | Discord webhook config (see above) |
Webhook Logging:
- All major events (help called, player healed, emergency transport) are logged to Discord if enabled.
- Customize webhook appearance in
Config.Webhook.
Jail Check:
- Prevents use if player is jailed (see
Config.JailCheck).
| Issue | Cause | Solution |
|---|---|---|
| AI doc not spawning | Dependency not started | Ensure community_bridge is started first |
| No Discord logs | Webhook misconfigured | Check Config.Webhook.url |
| Not enough money error | Player lacks funds | Lower Config.Price or add funds |
| Not working in jail | Jail check enabled | Set Config.JailCheck.enabled = false |
| Debug info missing | Debug disabled | Set Config.Debug = true |
- For personal and community use only
- Do not sell, rebrand, or remove author credit
- Modifications allowed for private use
- Redistribution only with original credit and license
- Original Author: GLDNRMZ#8700 / HHFW / Sanriku / amrclake
- community_bridge by GLDNRMZ
Attribution required. Do not redistribute or sell without explicit permission. Keep all author credits intact.