emergencyServiceDispatchRequest
GTA:SA sends an ambulance to the injured and a fire truck to fires. Asks your gamemode before such a vehicle and its crew appear for everyone.
Renamed in 0.28 from emergencyDispatchRequest; see renamed names.
Signature
Section titled “Signature”server.on("emergencyServiceDispatchRequest", ({ player, unit, service }) => boolean | void | Promise<boolean | void>)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
player |
PlayerSnapshot |
The player whose game sends it. |
unit |
DispatchUnitProposal |
The vehicle and its crew. |
service |
"fire" | "ambulance" |
A fire truck (model 407) or an ambulance (416). |
Returns
Section titled “Returns”false keeps it away. true, or nothing, lets it come. The first false stops the handlers after it. See
how decisions work.
Example
Section titled “Example”Fire trucks, but no ambulances.
import { server } from "nativemp";
server.on("emergencyServiceDispatchRequest", ({ service }) => service === "fire");Related
Section titled “Related”policeUnitDispatchRequest: police units- Wanted and emergency guide