players.openParachute
Opens a falling player’s parachute, as if they pressed the key. playerOpenParachuteRequest
is asked the same way.
Signature
Section titled “Signature”players.openParachute(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 the parachute opens, rejected with a code, or timeout after five seconds without an answer.
| Code | Meaning |
|---|---|
ineligible |
The player cannot open it now, or it is already opening or open. |
denied |
playerOpenParachuteRequest refused it. |
native-unavailable |
The player’s game could not open it. |
Example
Section titled “Example”Open the parachute from a command while falling.
import { commands, players } from "nativemp";
commands.register("deploy", async (player) => { await players.openParachute(player);});Related
Section titled “Related”players.closeParachute: cut itplayers.giveWeapon: give weapon46before the fallplayerOpenParachuteRequest: decide whether it opensplayerParachuteOpened: it opened