GetNextBlipInfoId
Docslocal retval = GetNextBlipInfoId(blipSprite)Parameters
| Name | Type | Description |
|---|---|---|
blipSprite | int | Sprite ID, see the [Game Reference](https://docs.fivem.net/docs/game-references/blips/) for the full list. |
Quick Snippet: Create Blip→ Blip
→ 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
BlipReturns a blip handle.
Examples
Official
function GetAllBlipsWithSprite(blip_sprite)
local current_blip = GetFirstBlipInfoId(blip_sprite)
local blips_array = {}
if not DoesBlipExist(current_blip) then
print('there are no blips with this sprite set')
return blips_array
end
while DoesBlipExist(current_blip) do
table.insert(blips_array, current_blip)
current_blip = GetNextBlipInfoId(blip_sprite)
end
return blips_array
end