{ask}add cirlce radius on blips

local blips = {

{title="GANK 1", colour=2, id=225, x = 1014.98, y = -2333.22, z = 30.52},
{title="GANK 2", colour=49, id=225, x = -836.1, y = -693.7, z = 26.51},

{title=“GANK 3”, colour=67, id=225, x = -1735.19, y = -817.84, z = 22.93},
{title=“GANK 4”, colour=46, id=225, x = 2176.48, y = 3856.25, z = 32.10},
{title=“GANK 5”, radius=100, colour=48, id=225, x = -906.4, y = -230.24, z = 39.82},
}
Citizen.CreateThread(function()

for _, info in pairs(blips) do
  info.blip = AddBlipForCoord(info.x, info.y, info.z)
  SetBlipSprite(info.blip, info.id)
  SetBlipDisplay(info.blip, 4)
  SetBlipColour(info.blip, info.colour)
  SetBlipAsShortRange(info.blip, true)
  BeginTextCommandSetBlipName("STRING")
  AddTextComponentString(info.title)
  EndTextCommandSetBlipName(info.blip)
end

end)

blips

how to add radius blips like that on map ?
any idea ?

1 Like

hi,
you can use AddBlipForRadius. Just set radius to fit your zone.

any idea how to applied to my script above ?

try this way,

local blips = {

{title="GANK 1", colour=2, id=225, x = 1014.98, y = -2333.22, z = 30.52},
{title="GANK 2", colour=49, id=225, x = -836.1, y = -693.7, z = 26.51},

{title=“GANK 3”, colour=67, id=225, x = -1735.19, y = -817.84, z = 22.93},
{title=“GANK 4”, colour=46, id=225, x = 2176.48, y = 3856.25, z = 32.10},
{title=“GANK 5”, radius=100, colour=48, id=225, x = -906.4, y = -230.24, z = 39.82},
}
Citizen.CreateThread(function()

nameofblip = AddBlipForRadius(x, y, z, radius of your zone)
SetBlipSprite(nameofblip,blipsprite)
SetBlipColour(nameofblip,idcolor)
SetBlipAlpha(nameofblip,alpha)–(transparency)

for _, info in pairs(blips) do
  info.blip = AddBlipForCoord(info.x, info.y, info.z)
  SetBlipSprite(info.blip, info.id)
  SetBlipDisplay(info.blip, 4)
  SetBlipColour(info.blip, info.colour)
  SetBlipAsShortRange(info.blip, true)
  BeginTextCommandSetBlipName("STRING")
  AddTextComponentString(info.title)
  EndTextCommandSetBlipName(info.blip)
end

end)

1 Like

https://pastebin.com/B663gZ8q

still nothing happen dude

you can maybe add radius in blips table to get it straight from it.

Your code work without mine?

https://pastebin.com/B663gZ8q

yeah its work with just blips and no radius

local blips = {

{title="GANK 1", colour=2, id=225, x = 1014.98, y = -2333.22, z = 30.52},
{title="GANK 2", colour=49, id=225, x = -836.1, y = -693.7, z = 26.51},

{title=“GANK 3”, colour=67, id=225, x = -1735.19, y = -817.84, z = 22.93},
{title=“GANK 4”, colour=46, id=225, x = 2176.48, y = 3856.25, z = 32.10},
{title=“GANK 5”, radius=100, colour=48, id=225, x = -906.4, y = -230.24, z = 39.82},
}
Citizen.CreateThread(function()
local bool = true

for k,v in pairs(blips) do
if bool then

zoneblip = AddBlipForRadius(v.x,v.y, v.z, 500.0)
SetBlipSprite(zoneblip,103)
SetBlipColour(zoneblip,49)
SetBlipAlpha(zoneblip,75)
bool = false
end

for _, info in pairs(blips) do
  info.blip = AddBlipForCoord(info.x, info.y, info.z)
  SetBlipSprite(info.blip, info.id)
  SetBlipDisplay(info.blip, 4)
  SetBlipColour(info.blip, info.colour)
  SetBlipAsShortRange(info.blip, true)
  BeginTextCommandSetBlipName("STRING")
  AddTextComponentString(info.title)
  EndTextCommandSetBlipName(info.blip)
end

end)

try this one

not working :frowning:

let me a moment…

take ur time and make sure u edit in this site
https://pastebin.com/B663gZ8q

` local blips = {

{title="GANK 1", colour=2, id=225, x = 1014.98, y = -2333.22, z = 30.52},
{title="GANK 2", colour=49, id=225, x = -836.1, y = -693.7, z = 26.51},
{title="GANK 3", colour=67, id=225, x = -1735.19, y = -817.84, z = 22.93},
{title="GANK 4", colour=46, id=225, x = 2176.48, y = 3856.25, z = 32.10},
{title="GANK 5", colour=27, id=225, x = -906.4, y = -230.24, z = 39.82}
}
Citizen.CreateThread(function()

		Citizen.Wait(0)

local bool = true
  
  if bool then
        
		for k,v in pairs(blips) do
           

               zoneblip = AddBlipForRadius(v.x,v.y,v.z, 1100.0)
                          SetBlipSprite(zoneblip,1)
                          SetBlipColour(zoneblip,49)
                          SetBlipAlpha(zoneblip,75)
                         
        end
         
    
         for _, info in pairs(blips) do
        
             info.blip = AddBlipForCoord(info.x, info.y, info.z)
                         SetBlipSprite(info.blip, info.id)
                         SetBlipDisplay(info.blip, 4)
                         SetBlipColour(info.blip, info.colour)
                         SetBlipAsShortRange(info.blip, true)
                         BeginTextCommandSetBlipName("STRING")
                         AddTextComponentString(info.title)
                         EndTextCommandSetBlipName(info.blip)
         end
	   
	   bool = false
   
   end
end)`
3 Likes

woaahhh its works bro !!
thx btw

Ok cool!
If you need to learn about fivem scripting there is a lot of useful links that you can find with the search function and on google.
The best way to learn is to practice.

You can set the topic solved and leave a like if you want :wink: .

2 Likes

i want learn from u can i ?

Lol,i’m not a great dev i learn like you.And add blips is a part that took me a lot of time and try to understand.
The best way for me is to create some small scripts to understand the bases.

chek DM bro

What do you mean by DM?

direct message

where would you put this?