Exports
Reference for the ambulance job exports and radial menu actions.
Server exports
revive(playerId)
- Purpose: Revives the supplied player.
- Arguments:
playerId(number|string): The server ID of the player that should be revived.
- Returns:
boolean(truewhen the revive was triggered,falsefor an invalid or offline target).
isDead(playerId)
- Purpose: Reports whether the specified player is currently flagged as dead by the ambulance job logic.
- Arguments:
playerId(number|string): The server ID of the player whose state should be checked.
- Returns:
boolean(truewhen the player is dead or downed,falseotherwise).
Client exports
openRadialMenu()
- Purpose: Opens the medic radial menu as if the player pressed the configured hotkey.
- Returns:
boolean(truewhen the menu opens,falsewhen the feature is disabled).
getRadialActions()
- Purpose: Provides the current list of radial menu actions along with labels, descriptions, and availability metadata.
- Returns:
RadialAction[]where each entry containsid,label,description,icon,available, and optional badge or helper fields. - Usage: Useful for backing custom UI mirrors or gathering telemetry on action availability.
getRadialAction(actionId)
- Purpose: Fetches a single action snapshot by
actionId. - Arguments:
actionId(string)
- Returns: The action snapshot (same structure as
getRadialActionsentries) ornilwhen missing.
getRadialActionReport()
- Purpose: Bundles the action list with a quick lookup map for availability and reason information.
- Returns: Object with
actions(fromgetRadialActions()) andavailability, where each key maps to anavailable,disabledReasonKey, anddisabledReasonpair. - Usage: Ideal for dashboards that must display enabled/disabled state or explain why an action is unavailable before prompting players to open the radial menu.
isRadialMenuActionAvailable(actionId)
- Purpose: Tests if a radial menu action is currently enabled for the calling player without opening the menu.
- Arguments:
actionId(string)
- Returns:
boolean(truewhen the action exists and is enabled,falseotherwise). - Notes: Availability mirrors the logic used to populate the radial action list (job/duty checks, context distances, etc.).
triggerRadialMenuAction(actionId)
- Purpose: Executes the same handler the radial menu would for the given action, enabling other resources to treat, carry, or bill without opening the UI.
- Arguments:
actionId(string)
- Returns:
boolean:truewhen the action was accepted.table?: When the action fails, the handler returns a map withkey/fallbackfor mirrored notification text.
- Notes: The export closes the radial menu if it was open and reuses the existing notification messaging for failures.
isDead()
- Purpose: Queries the local player's death state.
- Returns:
boolean(truewhen the player is dead/downed,falsewhen alive).
Radial Menu Actions
Each action mirrors the descriptions and availability logic of the in-game radial UI.
stretcher_carryInteract with the nearby stretcher (pick up, carry, or place) while accounting for distance and state.stretcher_patientAssign or release a patient from the active stretcher, respecting proximity and carry state.stretcher_vehicleLoad or unload the active stretcher from the assigned vehicle when a patient or vehicle is nearby.wheelchair_pushPush or release a wheelchair patient when the wheelchair system is enabled, a chair is close, and the medic is on foot.carry_patientPick up or drop the closest person, tracking carry modes, distance badges, and restrictions (e.g., already carried or incapacitated).treat_patientDiagnose and treat the closest patient, with distance badges and job/duty gating.billingOpen the billing interface for the nearest patient, including context badges and availability checks.
