Skip to content

mapIcons.destroy

Removes one of your map icons for everyone. Its ID is not used again while the server runs.

mapIcons.destroy(id: number): Promise<ActionResult>
Name Type Description
id number The ID from mapIcons.create.

A promise of an ActionResult: applied, or rejected with marker-not-found for an ID that is not one of your map icons.

gamemodes/my-mode.ts
import { mapIcons } from "nativemp";
for (const marker of mapIcons.listAll()) await mapIcons.destroy(marker.id);