Skip to content

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.

server.on("scriptMarkerDestroyed", ({ marker }) => void)
Name Type Description
marker WorldMarker The text label, map icon, checkpoint or area. marker.markerKind says which.
gamemodes/my-mode.ts
import { server } from "nativemp";
server.on("scriptMarkerDestroyed", ({ marker }) => {
if (marker.players !== null) server.log(`${marker.markerKind} ${marker.id} went with its last player`);
});