SetBlipColour
DocsSetBlipColour(blip, color)Parameters
| Name | Type | Description |
|---|---|---|
blip | Blip | The blip handle to set the color of |
color | int | This can be a hex color code, or a [blip color](https://docs.fivem.net/docs/game-references/blips/#blip-colors). |
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
local coords = GetEntityCoords(PlayerPedId())
local blip = AddBlipForCoord(coords.x, coords.y, coords.z)
SetBlipColour(blip, 1) -- Sets the color to red (see list above)
-- You can also use a hex like so:
SetBlipColour(blip, 0x3A7F3AFF) -- Our custom green