Skip to content

Adding Blips

StyledStrike edited this page Aug 27, 2023 · 8 revisions

Blips are small icons visible in the minimap. They can be placed in certain positions, or follow entities.

Examples

Functions

blip, id = GMinimap:AddBlip(params: table)

Add your own blip to the radar.

The params table is a key-value dictionary that should contain the initial properties of the blip. You can modify the returned blip with these same parameters at any point.

Key Type Description
id string A ID that can be used to remove the blip later
parent Entity A parent entity the blip will follow, if valid
icon string Icon file path, either as a URL or a file on disk
position Vector World position (doesnt apply if parent was set)
angle Angle World rotation (doesnt apply if parent was set)
scale number Blip icon scale
alpha number Blip icon opacity
color Color Blip icon color
indicateAlt boolean Show a altitude indicator when not in the same level
indicateAng boolean Show a heading arrow
lockIconAng boolean angle will only affect indicateAng, icon does not rotate

blip = GMinimap:FindBlipByID(id: string)

Find a blip created previously by it's ID.

GMinimap:RemoveBlipById(id: string)

Remove a blip created previously by it's id. You can obtain the id either from the second value returned from GMinimap:AddBlip or in the blip itself, blip.id.

GMinimap:RemoveBlipByParent(ent: Entity)

Remove all blips created previously that have ent as their parent.

Clone this wiki locally