Skip to content

Marker

@vimp-mp/types 2.0.1

Interface · Server API

World marker handle returned by vimp.markers.create.

Mutating type, position, scale, color, rotation, visible or dimension updates the authoritative server state and is synchronized to clients streaming the marker.

ts
interface Marker extends StreamSyncedMeta

Members

color

ts
color: MarkerColor

RGBA marker colour.

dimension

ts
dimension: number

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

id

ts
readonly id: number

Server-assigned marker identifier.

isExists

ts
readonly isExists: boolean

Whether the marker is still registered with the server runtime.

position

ts
position: Vec3

Authoritative world position.

rotation

ts
rotation: Vec3

Marker rotation in degrees.

scale

ts
scale: number

Uniform marker scale passed to streaming clients.

type

ts
type: number

GTA marker type identifier.

visible

ts
visible: boolean

Whether streaming clients should draw the marker.

deleteStreamSyncedMeta

ts
deleteStreamSyncedMeta(key: string): void

Deletes key and propagates the removal to streaming clients.

destroy

ts
destroy(): boolean

Destroy the marker and unregister it from vimp.markers.

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