The ambulancejob minigames can be used standalone from any other resource. Each export opens the minigame UI and yields until the player completes or fails it.
Purpose: Starts any minigame by type. This is the universal entry point for all standalone minigames.
Arguments:
type (string): The minigame to start — see table below.
options (table?): Optional configuration.
variant (string?): For bandage_wrap only — "arm", "leg", "head", or "torso" (default "arm").
messages (table?): Override any display text in the minigame UI. Keys match the short locale keys of each component (e.g. title, subtitle, hint, fail, success). Any key not provided falls back to the default locale string.
Returns:
boolean: true when the minigame started, false on error.
boolean | string: When started — true on success, false on fail. When not started — error reason ("invalid_type", "busy").
Type
Description
"bandage_wrap"
Trace a spiral path to wrap a wound. Accepts variant option.
"cpr"
Full CPR — hit compression beats at rhythm, then deliver rescue breaths.
"cpr_compressions"
Chest compressions only (no ventilation phase).
"cpr_ventilation"
Rescue breaths only (trace the airflow wave).
"bullet_extraction"
Drag a bullet upward through a canal without hitting the walls.
"saline_infusion"
Regulate IV drip flow by adjusting a clamp to the target rate.
"blood_transfusion"
Control blood flow rate within the target zone.
"bag_valve_mask"
Trace an airflow wave to deliver breaths (3 breaths required).
local started, result = exports["sky_ambulancejob"]:StartMinigame("cpr")
if started and result then
print("CPR successful!")
end
Every minigame component resolves its display text through short keys. Pass a messages table to override any of them:
local started, success = exports["sky_ambulancejob"]:StartMinigame("bullet_extraction", {
messages = {
title = "Remove the splinter",
subtitle = "Carefully pull it out without touching the walls.",
fail = "Wall contact!",
success = "Removed!",
}
})
Keys that are not provided in the table fall back to the configured locale. Below is the full key reference for each minigame type.
Start at the highlighted marker and follow the wave.
progress
Breaths {count}/{total}
successBreath
Breath delivered
StartMinigame is yielding — it blocks the current thread until the player finishes or cancels the minigame. Call it inside a CreateThread or Citizen.CreateThread to avoid blocking your main thread.
Purpose: Returns a table of all minigame types with their enabled/disabled state from Config.Minigames.enabled.
Returns: table<string, boolean>
local available = exports["sky_ambulancejob"]:GetAvailableMinigames()
for name, enabled in pairs(available) do
print(name .. ": " .. tostring(enabled))
end
-- In your custom resource (client-side)
CreateThread(function()
-- Example: require a CPR minigame before reviving
local started, success = exports["sky_ambulancejob"]:StartMinigame("cpr")
if started and success then
TriggerServerEvent("myresource:revivePlayer")
else
TriggerEvent("chat:addMessage", {
args = { "CPR failed — the patient could not be revived." }
})
end
end)
-- Example: bandage wrap as a skill check with custom text
RegisterCommand("applybandage", function()
CreateThread(function()
local started, success = exports["sky_ambulancejob"]:StartMinigame("bandage_wrap", {
variant = "arm",
messages = {
title = "Apply field dressing",
subtitle = "Wrap the wound carefully.",
}
})
if started and success then
print("Bandage applied successfully")
end
end)
end)