Skip to content
M2O Scripting APIScripting reference
Runtime classServer APIGenerated

Blip

Defined in: server/api.d.ts:1138

Replicated map icon that can be positioned in the world or attached to an entity.

new Blip(id): Blip

Defined in: server/api.d.ts:1143

Creates a script wrapper for an existing blip with this ID; use Blip.create() to create a blip.

number

Network entity identifier.

Blip

Entity.constructor

attachToPlayer(player): void

Defined in: server/api.d.ts:1215

Attaches this blip to a player so its position follows that entity.

number | Player

Player handle or network entity ID to follow.

void


attachToVehicle(vehicle): void

Defined in: server/api.d.ts:1221

Attaches this blip to a vehicle so its position follows that entity.

number | Vehicle

Vehicle handle or network entity ID to follow.

void


destroy(): void

Defined in: server/api.d.ts:1184

Destroys this replicated blip and removes it from connected clients.

void


setDisplay(display): void

Defined in: server/api.d.ts:1209

Chooses whether the blip appears on the minimap, the fullscreen map, or both.

"map" | "both" | "minimap"

Map views that draw the blip.

void


setIcon(library, iconId): void

Defined in: server/api.d.ts:1191

Changes the icon displayed by this blip.

number

Icon-library identifier.

number

Icon identifier within the selected library.

void


setRange(meters): void

Defined in: server/api.d.ts:1203

Limits the blip to players near it. Evaluated on each client, so players moving around costs no server traffic.

number

Horizontal distance from each player within which the blip is shown; 0 shows it on the whole map. Capped at 10000.

void


setText(text): void

Defined in: server/api.d.ts:1197

Sets the tooltip text displayed when a player hovers this blip on the fullscreen map.

string

Tooltip shown while the cursor hovers this blip on the fullscreen map; empty removes it. Truncated to 48 characters.

void


setVirtualWorld(world): void

Defined in: server/api.d.ts:4154

Moves this entity into another virtual world.

number

Virtual-world identifier used to partition replication and visibility.

void

Entity.setVirtualWorld


setVisibleTo(player): void

Defined in: server/api.d.ts:4160

Restricts replication of this entity to one owning connection while preserving normal range and visibility checks.

Entity | null

Player-owned entity whose connection should exclusively receive this entity, or null to clear the restriction.

void

Entity.setVisibleTo


toString(): string

Defined in: server/api.d.ts:1179

Returns a readable representation of this blip.

string

The blip ID formatted for logging or debugging.

Entity.toString


static create(x, y, z, library, iconId, color?, virtualWorld?, text?, range?): Blip

Defined in: server/api.d.ts:1236

Creates and replicates a world-map blip.

number

Initial world-space X coordinate.

number

Initial world-space Y coordinate.

number

Initial world-space Z coordinate.

number

Icon-library identifier.

number

Icon identifier within the selected library.

number

Optional game palette color identifier.

number

Optional virtual-world ID used for visibility filtering.

string

Optional tooltip shown while the cursor hovers the blip on the fullscreen map. Truncated to 48 characters.

number

Optional visibility range in meters from each player; 0 or omitted shows it on the whole map.

Blip

The newly created blip handle.

readonly color: number

Defined in: server/api.d.ts:1158

Current game palette color identifier.


readonly display: "map" | "both" | "minimap"

Defined in: server/api.d.ts:1173

Map views that draw the blip.


readonly iconId: number

Defined in: server/api.d.ts:1153

Current icon identifier within iconLibrary.


readonly iconLibrary: number

Defined in: server/api.d.ts:1148

Current icon-library identifier.


readonly id: number

Defined in: server/api.d.ts:4122

Immutable network entity identifier.

Entity.id


position: Vector3

Defined in: server/api.d.ts:4132

Authoritative world-space position; assignment forces replicated state.

Entity.position


readonly range: number

Defined in: server/api.d.ts:1168

Visibility range in meters; 0 when the blip shows on the whole map.


rotation: Vector3 | Quaternion

Defined in: server/api.d.ts:4137

Authoritative rotation; reads return a quaternion and assignments accept a quaternion or Euler angles in degrees.

Entity.rotation


readonly state: StateBag

Defined in: server/api.d.ts:4142

Arbitrary key/value state carried by this entity. The server writes it and every client that can see the entity receives it; see StateBag.

Entity.state


readonly text: string

Defined in: server/api.d.ts:1163

Current fullscreen-map hover tooltip; empty when the blip has none.


readonly virtualWorld: number

Defined in: server/api.d.ts:4127

Current virtual-world identifier.

Entity.virtualWorld