Skip to content

Checkpoint

@vimp-mp/types 2.0.1

Interface · Server API

World checkpoint handle returned by vimp.checkpoints.create.

Mutating type, position, nextPosition, radius, color, visible or dimension updates the authoritative server state and is synchronized to clients streaming the checkpoint.

ts
interface Checkpoint extends StreamSyncedMeta

Members

color

ts
color: MarkerColor

RGBA checkpoint colour.

dimension

ts
dimension: number

Virtual world; the checkpoint is visible only to players in the same dimension.

id

ts
readonly id: number

Server-assigned checkpoint identifier.

isExists

ts
readonly isExists: boolean

Whether the checkpoint is still registered with the server runtime.

nextPosition

ts
nextPosition: Vec3

World position toward which the checkpoint arrow points.

position

ts
position: Vec3

Authoritative world position.

radius

ts
radius: number

Checkpoint radius in world units.

type

ts
type: number

GTA checkpoint type identifier.

visible

ts
visible: boolean

Whether streaming clients should draw the checkpoint.

deleteStreamSyncedMeta

ts
deleteStreamSyncedMeta(key: string): void

Deletes key and propagates the removal to streaming clients.

destroy

ts
destroy(): boolean

Destroys this checkpoint instance.

getStreamSyncedMeta

ts
getStreamSyncedMeta<T = unknown>(key: string): T | undefined

Returns undefined if the key is unset.

getStreamSyncedMetaKeys

ts
getStreamSyncedMetaKeys(): Array<string>

Returns all stream-synced metadata keys stored on the entity.

hasStreamSyncedMeta

ts
hasStreamSyncedMeta(key: string): boolean

Returns whether the entity has a value for key.

setStreamSyncedMeta

ts
setStreamSyncedMeta(key: string, value: unknown): void

Set or replace one key. The value is forwarded to every player currently streaming this entity, plus included in the snapshot for any future stream-in. Use deleteStreamSyncedMeta rather than undefined when the key must be removed.

VIMP developer documentation