scriptMarkerDestroyed
Tells your gamemode that one of its text labels, map icons, checkpoints or areas is gone: after a destroy, and when the last player it was for leaves the server. It gives the marker as it last was, so players still names the player who left. textLabels, mapIcons, checkpoints and areas no longer list it when your handler runs.
Signature
Section titled “Signature”server.on("scriptMarkerDestroyed", ({ marker }) => void)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
marker |
WorldMarker |
The text label, map icon, checkpoint or area. marker.markerKind says which. |
Example
Section titled “Example”import { server } from "nativemp";
server.on("scriptMarkerDestroyed", ({ marker }) => { if (marker.players !== null) server.log(`${marker.markerKind} ${marker.id} went with its last player`);});Related
Section titled “Related”scriptMarkerCreated: it was createdscriptMarkerUpdated: it changed- World markers