Skip to content

checkpoints.getById

Returns one of your checkpoints by its ID, or undefined when there is none.

Renamed in 0.28 from checkpoints.get; see renamed names.

checkpoints.getById(id: number): Checkpoint | undefined
Name Type Description
id number The ID from checkpoints.create.

The Checkpoint, or undefined for an ID that is not one of your checkpoints.

gamemodes/my-mode.ts
import { checkpoints, server } from "nativemp";
const markerId = 0; // the ID checkpoints.create returned
const marker = checkpoints.getById(markerId);
if (marker) server.log(`It is in virtual world ${marker.virtualWorld}`);