Skip to content

Marker

@vimp-mp/types 2.0.1

Interface · Client API

Server-known marker. Markers are drawn by VIMP and do not expose a GTA entity handle.

ts
interface Marker

Members

color

ts
readonly color: { a: number; b: number; g: number; r: number }

Cached RGBA marker colour.

dimension

ts
readonly dimension: number

Client-side dimension value associated with this wrapper.

id

ts
readonly id: number

Client-local 0-based wrapper id, unique per entity type and reused after destroy. Use remoteId for server/network state.

isAlive

ts
readonly isAlive: boolean

True while the remote marker exists in multiplayer state.

isExists

ts
readonly isExists: boolean

Alias of isAlive for marker lifecycle checks.

isRemote

ts
readonly isRemote: boolean

Whether this wrapper represents a server-owned marker.

isStreamed

ts
readonly isStreamed: boolean

True while a local marker exists, or while a remote marker is streamed in.

markerType

ts
readonly markerType: number

GTA marker type identifier.

position

ts
readonly position: Vec3

Cached world position.

remoteId

ts
readonly remoteId: number | null

Server marker id for remote markers; null for local-only markers. Zero is a valid remote id.

rotation

ts
readonly rotation: Vec3

Cached marker rotation in degrees.

scale

ts
readonly scale: number

Uniform marker scale.

type

ts
readonly type: number

Alias of markerType.

visible

ts
readonly visible: boolean

Whether the marker is currently configured to draw.

destroy

ts
destroy(): boolean

Destroys local-only markers. Returns false for remote markers or already-destroyed wrappers.

setColor

ts
setColor(color: { a: number; b: number; g: number; r: number }): boolean

Sets color of local-only markers. Returns false for remote markers or destroyed wrappers.

setDimension

ts
setDimension(dimension: number): boolean

Sets the local-only virtual dimension (metadata-only, like MarkerCreateOptions.dimension). Returns false for remote markers or destroyed wrappers.

setPosition

ts
setPosition(position: Vec3): boolean

Moves local-only markers. Returns false for remote markers or destroyed wrappers.

setRotation

ts
setRotation(rotation: Vec3): boolean

Rotates local-only markers (degrees, normalized to [0, 360)). Returns false for remote markers or destroyed wrappers.

setScale

ts
setScale(scale: number): boolean

Sets uniform scale of local-only markers. Returns false for remote markers or destroyed wrappers.

setVisible

ts
setVisible(visible: boolean): boolean

Shows/hides local-only markers. Returns false for remote markers or destroyed wrappers.

VIMP developer documentation