Marker
@vimp-mp/types 2.0.1World 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.
interface Marker extends StreamSyncedMetaMembers
color
color: MarkerColorRGBA marker colour.
dimension
dimension: numberVirtual world; the marker is visible only to players in the same dimension.
id
readonly id: numberServer-assigned marker identifier.
isExists
readonly isExists: booleanWhether the marker is still registered with the server runtime.
position
position: Vec3Authoritative world position.
rotation
rotation: Vec3Marker rotation in degrees.
scale
scale: numberUniform marker scale passed to streaming clients.
type
type: numberGTA marker type identifier.
visible
visible: booleanWhether streaming clients should draw the marker.
deleteStreamSyncedMeta
deleteStreamSyncedMeta(key: string): voidDeletes key and propagates the removal to streaming clients.
destroy
destroy(): booleanDestroy the marker and unregister it from vimp.markers.
getStreamSyncedMeta
getStreamSyncedMeta<T = unknown>(key: string): T | undefinedReturns undefined if the key is unset.
getStreamSyncedMetaKeys
getStreamSyncedMetaKeys(): Array<string>Returns all stream-synced metadata keys stored on the entity.
hasStreamSyncedMeta
hasStreamSyncedMeta(key: string): booleanReturns whether the entity has a value for key.
setStreamSyncedMeta
setStreamSyncedMeta(key: string, value: unknown): voidSet 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.