DirkScripts
Docs
Blip
βΉοΈ Client Module - This can only be used on the client
#lib.blip.register
Register a new blip to be shown on the map
lualib.blip.register(id, data)
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | true | Unique reference for the blip |
| data | Object | true | Options for the blip, see Data Structure |
#lib.blip.get
Get a blip's data via it's id
lualocal blip = lib.blip.get(id)
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | true | Unique reference for the blip |
#lib.blip.update
Update an existing blip's properties
lualib.blip.update(id, data)
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Unique reference for the blip |
| data | table | yes | Properties to update (same fields as register) |
#lib.blip.delete
Remove a blip from the map and cache
lualib.blip.delete(id)
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | String | true | Unique reference for the blip |
#Data Structure
This is the data structure of a blip and the valid options
lua{ -- 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, }
Useful Links
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 β
