pickups.destroy
Removes a pickup your gamemode made, for every player.
Signature
Section titled “Signature”pickups.destroy(id: number): Promise<ActionResult>Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
id |
number |
The pickup’s ID, the createdId of pickups.create’s result. |
Returns
Section titled “Returns”A promise of an ActionResult: applied once it’s gone, or rejected with pickup-not-found (or invalid-pickup for an ID that isn’t a whole number).
Example
Section titled “Example”import { pickups } from "nativemp";
const healthId = 0; // the ID pickups.create returnedawait pickups.destroy(healthId);Related
Section titled “Related”pickups.create: make one