Blip

Used for GTA map location blips, for example a fuel station location

Client Module - This can only be used on the client

lib.blip.register

Register a new blip to be shown on the map

lib.blip.register(id, data)
Parameter
Type
Required
Description

id

String

Unique reference for the blip

data

Object

Options for the blip, see Data Structure

lib.blip.get

Get a blip's data via it's id

local blip = lib.blip.get(id)
Parameter
Type
Required
Description

id

String

Unique reference for the blip

lib.blip.delete

Remove a blip from the map and cache

lib.blip.delete(id)
Parameter
Type
Required
Description

id

String

Unique reference for the blip

Data Structure

This is the data structure of a blip and the valid options

{
    -- Required
    pos = vector2(150.0, 100.0),    -- Used as the location on the map
    name = "Example Blip",          -- Label displayed on the map key
    sprite = 1,                     -- Sprite to be displayed
    display = 4,                    -- Display options
    scale = 1.0,                    -- Size of the blip
    color = 1,                      -- Color of the blip
    -- Not Required
    shortRange = false,             -- Is the blip short range
    category = 1,                   -- Category of the blip
    alpha = 255,                    -- Alpha (opacity) of the blip
    rotation = 0,                   -- Rotation
    route = false,                  -- Should the blip be routed to
    canSee = function()             -- Should the blip render
        return true
    end,                  
}

FiveM Blip Sprites Reference: https://docs.fivem.net/docs/game-references/blips/#blips

FiveM Native SetBlipDisplay Reference: https://docs.fivem.net/natives/?_0x9029B2F3DA924928

Fivem Blip Colour Reference: https://docs.fivem.net/docs/game-references/blips/#blip-colors

FiveM Native SetBlipCategory Reference: https://docs.fivem.net/natives/?_0x234CDD44D996FD9A

Last updated