fires.extinguish
Puts a fire out for every player. sharedFireStopped follows with reason
"script". Players who join later do not see it.
Signature
Section titled “Signature”fires.extinguish(id: string): Promise<ActionResult>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
id |
string |
The fire’s ID, from fires.listAll or an event. |
Returns
Section titled “Returns”A promise of an ActionResult: applied once the server put it out (the players’ games
follow), rejected with a code, or timeout after five seconds without an answer.
| Code | Meaning |
|---|---|
invalid-fire-id |
Not a fire ID: empty, zero, not a decimal number, or above 18446744073709551615. |
fire-not-found |
No such fire, or it is already out. |
Example
Section titled “Example”import { chat, commands, fires } from "nativemp";
commands.register("extinguish", async (player, id) => { const result = await fires.extinguish(id.trim()); chat.sendServerMessage(result.status === "rejected" ? result.code : result.status, player);});Related
Section titled “Related”fires.listAll: every firesharedFireStopped: a fire went outsharedFireWaterInteractionRequest: decide whether a player’s water weakens a fire