Browse docs
X-Ray
Action hooks for the X-ray scan system.
Actions
| Action | Side | Description |
|---|---|---|
xray:start | client + server | An X-ray scan has started. |
xray:end | client + server | An X-ray scan has finished (results ready). |
Context
| Field | Type | Side | Description |
|---|---|---|---|
stationId | string | client + server | The X-ray station identifier. |
stationName | string | client + server | Display name of the station. |
targetId | number | client + server | Server ID of the patient being scanned. |
medicId | number | server only | Server ID of the medic performing the scan. |
Example
exports["sky_ambulancejob"]:onAction("xray:start", function(ctx)
TriggerEvent("your_mlo:xray:animate", ctx.stationId, true)
end)
exports["sky_ambulancejob"]:onAction("xray:end", function(ctx)
TriggerEvent("your_mlo:xray:animate", ctx.stationId, false)
end)
exports["sky_ambulancejob"]:onAction("xray:start", function(ctx)
print(("Medic %d started X-ray on patient %d at station %s"):format(
ctx.medicId, ctx.targetId, ctx.stationId
))
end)
Support
Need help? Our support team is always ready to assist
Join Discord