AddBlipForRadius
Docslocal retval = AddBlipForRadius(posX, posY, posZ, radius)Description
Create a blip with a radius for the specified coordinates (it doesnt create the blip sprite, so you need to use AddBlipCoords)
Example image:
!example
This is the server-side RPC native equivalent of the client native [ADD_BLIP_FOR_RADIUS](?\_0x46818D79B1F7499A).
Parameters
| Name | Type | Description |
|---|---|---|
posX | float | The x position of the blip (you can also send a vector3 instead of the bulk coordinates) |
posY | float | The y position of the blip (you can also send a vector3 instead of the bulk coordinates) |
posZ | float | The z position of the blip (you can also send a vector3 instead of the bulk coordinates) |
radius | float | The number that defines the radius of the blip circle |
Quick Snippet: Get CoordinatesposXposYposZ
posXposYposZAdd 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.