VehicleSirenChangedPayload
What vehicleSirenChanged gets: the payload a handler receives.
Definition
Section titled “Definition”type VehicleSirenChangedPayload = { vehicleId: number; fromActive: boolean | null; toActive: boolean | null; hasAddedSiren: boolean; reason: "created" | "native" | "request" | "script" | "removed"; observedAtSessionMs: number;};Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
vehicleId |
number |
The vehicle. |
fromActive |
boolean or null |
The siren before; null when the vehicle just appeared. |
toActive |
boolean or null |
The siren now; null when the vehicle is gone. |
hasAddedSiren |
boolean |
true when your gamemode gave the vehicle its siren with vehicles.setHasSiren. |
reason |
"created" | "native" | "request" | "script" | "removed" |
The vehicle appeared, an NPC switched it, someone in the vehicle switched it, your gamemode switched it, or the vehicle is gone. |
observedAtSessionMs |
number |
When, on the shared session clock. |
Related
Section titled “Related”vehicleSirenChanged: the event