Blip
Defined in: client/api.d.ts:1529
A mark this client owns on the game’s compass and map screen.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new Blip(
id):Blip
Defined in: client/api.d.ts:1534
Creates a handle for a blip that already exists; use Blip.create() to make one.
Parameters
Section titled “Parameters”number
Identifier of an existing blip.
Returns
Section titled “Returns”Blip
Methods
Section titled “Methods”remove()
Section titled “remove()”remove():
boolean
Defined in: client/api.d.ts:1591
Takes this blip off the compass and the map screen and out of the registry.
Returns
Section titled “Returns”boolean
True when it was still there to remove.
toString()
Section titled “toString()”toString():
string
Defined in: client/api.d.ts:1585
Formats this blip handle for logging and debugging.
Returns
Section titled “Returns”string
The blip’s id, its type and its position, or a note that it is gone.
staticall():Blip[]
Defined in: client/api.d.ts:1611
Lists every blip this client’s scripts made. Blips the server placed are not included.
Returns
Section titled “Returns”Blip[]
One handle per live blip, in creation order.
create()
Section titled “create()”
staticcreate(options):Blip|null
Defined in: client/api.d.ts:1598
Puts a mark on this client’s compass and map screen and keeps it there, rebuilding it whenever the game drops it.
Parameters
Section titled “Parameters”options
Section titled “options”Where the blip goes, and optionally which icon to draw it with, what state to give it, what the map screen calls it, and whether it shows on the compass and the map screen – both, by default. type is one of the game’s own compass mark names – Checkpoint, QuestGiver, Shop, GeneralPoi and the rest – and defaults to GeneralPoi; an unknown one is rejected rather than guessed at.
compass?
Section titled “compass?”boolean
label?
Section titled “label?”string
boolean
position
Section titled “position”state?
Section titled “state?”number
string
Returns
Section titled “Returns”Blip | null
The new blip, or null at the blip limit.
getById()
Section titled “getById()”
staticgetById(id):Blip|null
Defined in: client/api.d.ts:1605
Looks a blip up by its id.
Parameters
Section titled “Parameters”number
Blip identifier.
Returns
Section titled “Returns”Blip | null
The blip’s handle, or null when it no longer exists.
removeAll()
Section titled “removeAll()”
staticremoveAll():void
Defined in: client/api.d.ts:1616
Takes every blip this client’s scripts made off the compass and the map screen, leaving the server’s blips and the game’s own marks alone.
Returns
Section titled “Returns”void
Properties
Section titled “Properties”compass
Section titled “compass”compass:
boolean
Defined in: client/api.d.ts:1574
Whether the blip is drawn on the HUD compass. True by default.
readonlyid:number
Defined in: client/api.d.ts:1539
Identifier of this blip, unique for the lifetime of the session. Ids are not reused.
label:
string
Defined in: client/api.d.ts:1569
The blip’s name on the map screen, shown verbatim in place of the name the game gives its icon type; empty keeps that name. A compass mark has no text, so the compass never shows it.
readonlylive:boolean
Defined in: client/api.d.ts:1549
Whether the compass currently carries a mark for this blip. It goes false on its own whenever the game empties the compass – a level load does – and back to true on the next tick.
map:
boolean
Defined in: client/api.d.ts:1579
Whether the blip is drawn on the map screen. True by default, but only for an icon the map has art for: Main, Side, Micro, Checkpoint, Dlcs, Bailiff, FistFight and Racing have none and stay on the compass. The map legend’s switch for the blip’s icon type hides it like one of the game’s own, and a change to a blip on the open map is redrawn within a frame.
position
Section titled “position”position:
Vector3
Defined in: client/api.d.ts:1554
World-space position in metres. The compass recomputes bearing and distance from it every frame, so assigning moves the mark with no rebuild.
state:
number
Defined in: client/api.d.ts:1564
The mark’s state, forwarded to the compass movie as-is. What a given value draws is undocumented; 0 is what a fresh mark carries.
type:
string
Defined in: client/api.d.ts:1559
Which of the game’s own compass icons the mark draws as, by the game’s own name for it. Assignment rebuilds the native mark, because the icon is read once when a mark is registered and never re-read.
readonlyvalid:boolean
Defined in: client/api.d.ts:1544
Whether the blip is still in the registry. A handle to a removed blip keeps reading, and every other property reads as its default.