EndTextCommandSetBlipName
DocsEndTextCommandSetBlipName(blip)Description
Finalizes a text command started with <code>BEGIN_TEXT_COMMAND_SET_BLIP_NAME</code>, setting the name
of the specified blip.
Parameters
| Name | Type | Description |
|---|---|---|
blip | Blip | The blip to change the name for. |
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
-- creates a blip called 'Food for me!' at 0.0, 0.0, 0.0
AddTextEntry('MYBLIP', 'Food for ~a~!')
local blip = AddBlipForCoords(0.0, 0.0, 0.0)
BeginTextCommandSetBlipName('MYBLIP')
AddTextComponentSubstringPlayerName('me')
EndTextCommandSetBlipName(blip)