Browse docs
AI Medic
Hook for overriding the built-in AI medic system with a custom implementation.
Config Hook
The onAiMedicRequest hook in config/functions.lua fires when a player presses the AI Medic button on the death screen. Return false to prevent the built-in AI medic from dispatching.
config/functions.lua
Config.Functions.onAiMedicRequest = function()
-- Use your own medic system instead
exports['nxt-medic']:sendHelp()
return false -- prevent built-in AI medic
-- return true -- default: use built-in AI medic
end
UI State Exports
When overriding the AI medic, use these client exports to update the death screen UI:
client.lua
-- Update the status text on the death screen
exports["sky_ambulancejob"]:setAiMedicState("driving")
-- Show failure
exports["sky_ambulancejob"]:setAiMedicState("failed", "spawn_failed")
-- Reset when done
exports["sky_ambulancejob"]:setAiMedicState("idle")
Available States
| State | UI Text |
|---|---|
idle | (hidden) |
requesting | Contacting emergency services... |
dispatched | AI medic en route |
driving | AI medic en route |
arrived | AI medic on scene |
reviving | AI medic is stabilising you |
finished | AI medic completed the call |
failed | (depends on reason) |
cooldown | AI medic cooling down |
Failure Reasons
| Reason | UI Text |
|---|---|
not_enough_money | Not enough funds |
medics_online | Real medics are on duty |
spawn_failed | AI medic could not reach you |
already_active | AI medic already dispatched |
disabled | AI medic unavailable |
Support
Need help? Our support team is always ready to assist
Join Discord