_ADD_BLIP_FOR_AREA
Docslocal retval = AddBlipForArea(x, y, z, width, height)Description
Adds a rectangular blip for the specified coordinates/area.
It is recommended to use SET_BLIP_ROTATION and SET_BLIP_COLOUR to make the blip not rotate along with the camera.
By default, the blip will show as a regular blip with the specified color/sprite if it is outside of the minimap view.
(Native name is likely to actually be ADD_BLIP_FOR_AREA, but due to the usual reasons this can't be confirmed)
This is the server-side RPC native equivalent of the client native [\_ADD_BLIP_FOR_AREA](?\_0xCE5D0E5E315DB238).
Parameters
| Name | Type | Description |
|---|---|---|
x | float | The X coordinate of the center of the blip. |
y | float | The Y coordinate of the center of the blip. |
z | float | The Z coordinate of the center of the blip. |
width | float | The width of the blip. |
height | float | The height of the blip. |
Quick Snippet: Get Coordinatesxyz
xyzAdd this command to your client script to retrieve precise locations in-game.
-- Add this to your client.lua. Type /pos in-game to copy coords.
RegisterCommand('pos', function()
local ped = PlayerPedId()
local coords = GetEntityCoords(ped)
local heading = GetEntityHeading(ped)
local output = string.format("vector4(%.2f, %.2f, %.2f, %.2f)", coords.x, coords.y, coords.z, heading)
print(output)
TriggerEvent('chat:addMessage', { args = { '^4[COORD]^0', output } })
end)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.