sharedFireWaterInteractionRequest
Every player sees the same fires. When a player sprays water (a fire truck’s cannon, for example) on a fire that runs in another player’s game, asks your gamemode whether the water weakens it.
Renamed in 0.28 from fireInteractionRequest; see renamed names.
Signature
Section titled “Signature”server.on("sharedFireWaterInteractionRequest", ({ player, fireId, interior, strengthLoss }) => boolean | void | Promise<boolean | void>)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
player |
PlayerSnapshot |
The player spraying the water. |
fireId |
string |
The fire, as in fires.getById. |
senderPedNetworkId |
number |
The network ID of that player’s ped. |
interactionKind |
"water" |
Always water for now. |
interior |
number |
The interior, the same as the player’s and the fire’s. |
strengthLoss |
number |
How much weaker the fire gets, more than 0 and at most 0.25. |
Returns
Section titled “Returns”false ignores the water; the fire burns on. true, or nothing, weakens it. The first false stops the handlers
after it. See how decisions work.
Example
Section titled “Example”Only firefighters put out fires.
import { server } from "nativemp";
const firefighters = new Set<number>();server.on("sharedFireWaterInteractionRequest", ({ player }) => firefighters.has(player.id));Related
Section titled “Related”fires.getById: one firefires.extinguish: put a fire outsharedFireStopped: a fire went out- Wanted and emergency guide