players.closeParachute
Cuts a player’s open parachute: they lose it and fall on. A parachute that is still waiting to open is not opened, and the player keeps it.
Signature
Section titled “Signature”players.closeParachute(player: PlayerTarget): Promise<ActionResult>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
player |
PlayerTarget |
The player, or their ID. |
Returns
Section titled “Returns”A promise of an ActionResult: applied once it is cut, rejected with player-not-found or parachute-not-open, or timeout after five seconds
without an answer. Calling it again after a successful close returns parachute-not-open.
Example
Section titled “Example”import { commands, players } from "nativemp";
commands.register("cut", async (player) => { await players.closeParachute(player);});Related
Section titled “Related”players.openParachute: open itplayerParachuteEnded: the descent endedplayers.giveWeapon: give a new parachute (weapon46)