Skip to content

pickups.destroy

Removes a pickup your gamemode made, for every player.

pickups.destroy(id: number): Promise<ActionResult>
Name Type Description
id number The pickup’s ID, the createdId of pickups.create’s result.

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).

gamemodes/my-mode.ts
import { pickups } from "nativemp";
const healthId = 0; // the ID pickups.create returned
await pickups.destroy(healthId);