SetBlipCategory
DocsSetBlipCategory(blip, index)Description
Examples result:

index:
1 = No distance shown in legend
2 = Distance shown in legend
7 = "Other Players" category, also shows distance in legend
10 = "Property" category
11 = "Owned Property" categoryAny other value behaves like index = 1, index wraps around after 255
Blips with categories 7, 10 or 11 will all show under the specific categories listing in the map legend, regardless of sprite or name.
Legend entries
| index | Legend entry | Label |
|---|---|---|
7 | Other Players | `BLIP_OTHPLYR` |
10 | Property | `BLIP_PROPCAT` |
11 | Owned Property | `BLIP_APARTCAT` |
Parameters
| Name | Type | Description |
|---|---|---|
blip | Blip | The blip to change the category index of |
index | int | The category index to change to |
Quick Snippet: Create Blipblip
blipUse this to create or reference a map blip for this native.
-- Create a blip at the player's position
local coords = GetEntityCoords(PlayerPedId())
local blip = AddBlipForCoord(coords.x, coords.y, coords.z)
SetBlipSprite(blip, 1) -- Standard blip icon
SetBlipColour(blip, 1) -- Red color
SetBlipScale(blip, 0.8)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName("My Blip")
EndTextCommandSetBlipName(blip)
print("Blip created: " .. blip)Returns
voidThis native does not return a value.
Examples
Official
blip = AddBlipForCoord(-702.97290039063, -1393.2911376953, 5.1502623558044)
SetBlipSprite(blip, 370) -- Helipad For Sale
SetBlipCategory(blip, 10)
blip = AddBlipForCoord(-712.40521240234, -1298.7811279297, 5.1019215583801)
SetBlipSprite(blip, 371) -- Dock For Sale
SetBlipCategory(blip, 10)
blip = AddBlipForCoord(-927.92755126953, -2824.1362304688, 13.947744369507)
SetBlipSprite(blip, 372) -- Hangar For Sale
SetBlipCategory(blip, 10)