Set hot zone in drug and holdupbank

if you are using the default files, just replace the blip function with what i wrote.

I just re tried and it just showed the red circle without the icon

you are doing something wrong, maybe looping in the wrong table or idk, you must provide the config files so i can see what’s happening

– Create blips
Citizen.CreateThread(function()
for k,v in pairs(Config.Zones) do
local blip = AddBlipForRadius(v.x, v.y, v.z , 100.0) – you can use a higher number for a bigger zone

SetBlipHighDetail(blip, true)
SetBlipColour(blip, 1)
SetBlipAlpha (blip, 128)

local blip = AddBlipForCoord(v.x, v.y, v.z)

SetBlipSprite (blip, v.sprite)
SetBlipDisplay(blip, 4)
SetBlipScale  (blip, 0.9)
SetBlipColour (blip, v.color)
SetBlipAsShortRange(blip, true)

BeginTextCommandSetBlipName("STRING")
AddTextComponentString(v.name)
EndTextCommandSetBlipName(blip)

end
end)

here is the code

config.lua

Config = {}
Config.MarkerType = 1
Config.DrawDistance = 100.0
Config.ZoneSize = {x = 3.0, y = 3.0, z = 3.0}
Config.MarkerColor = {r = 100, g = 204, b = 100}
Config.RequiredCopsCoke = 0
Config.RequiredCopsMeth = 0
Config.RequiredCopsWeed = 0
Config.RequiredCopsOpium = 0
Config.Locale = ‘en’

Config.Zones = {
CokeFarm = {x=2448.9228515625, y=-1836.8076171875, z=51.953701019287},
CokeTreatment = {x=-458.13967895508, y=-2278.6174316406, z=7.5158290863037},
CokeResell = {x=-1756.1984863281, y=427.31674194336, z=126.68292999268},
MethFarm = {x=1525.298828125, y=1710.0217285156, z=109.00956726074},
MethTreatment = {x=-1001.4151611328, y=4848.0087890625, z=274.00686645508},
MethResell = {x=-63.592178344727, y=-1224.0709228516, z=27.768648147583},
WeedFarm = {x=2229.4272460938, y=5575.8627929688, z=53.757167816162},
WeedTreatment = {x=2468.1989746094, y=3783.4223632813, z=40.914752960205},
WeedResell = {x=-54.249694824219, y=-1443.3666992188, z=31.068626403809},
OpiumFarm = {x=1972.784790039, y=3819.3999023438, z=33.428722381592},
OpiumTreatment = {x=971.86499023438, y=-2157.61328125, z=28.475107192994},
OpiumResell = {x=2331.0881347656, y=2570.2250976562, z=46.681819915772}
}

Config.Map = {
{name=“Cocain”, color=6, scale=0.8, id=403, x=2448.9228515625, y=-1836.8076171875, z=51.953701019287},
{name=“Dong goi Cocain”, color=6, scale=0.8, id=403, x=-458.13967895508, y=-2278.6174316406, z=7.5158290863037},
{name=“Ban Cocain”, color=6, scale=0.8, id=403, x=-1756.1984863281, y=427.31674194336, z=126.68292999268},
{name=“Ma tuy da”, color=6, scale=0.8, id=403, x=1525.298828125, y=1710.0217285156, z=109.00956726074},
{name=“Dong goi Ma tuy da”, color=6, scale=0.8, id=403, x=-1001.4151611328, y=4848.0087890625, z=274.00686645508},
{name=“Ban Ma tuy da”, color=6, scale=0.8, id=403, x=-63.592178344727, y=-1224.0709228516, z=27.768648147583},
{name=“Thuoc phien”, color=6, scale=0.8, id=403, x=1972.784790039, y=3819.3999023438, z=33.428722381592},
{name=“Dong goi Thuoc phien”, color=6, scale=0.8, id=403, x=971.86499023438, y=-2157.61328125, z=28.475107192994},
{name=“Ban thuoc phien”, color=6, scale=0.8, id=403, x=2331.0881347656, y=2570.2250976562, z=46.681819915772},
{name=“Can sa”, color=2, scale=0.8, id=140, x=2229.4272460938, y=5575.8627929688, z=53.757167816162},
{name=“Dong goi Can Sa”, color=2, scale=0.8, id=140, x=2467.8371582031, y=3784.6157226563, z=40.981040954591},
{name=“Ban Can sa”, color=2, scale=0.8, id=140, x=-54.249694824219, y=-1443.3666992188, z=31.068626403809}
}

weird.
try to edit

local blip = AddBlipForRadius(v.x, v.y, v.z , 100.0) – you can use a higher number for a bigger zone

SetBlipHighDetail(blip, true)
SetBlipColour(blip, 1)
SetBlipAlpha (blip, 128)

to

local blip2 = AddBlipForRadius(v.x, v.y, v.z , 100.0) – you can use a higher number for a bigger zone

SetBlipHighDetail(blip2, true)
SetBlipColour(blip2, 1)
SetBlipAlpha (blip2, 128)
1 Like

for the client or for the config bro

can you help me wirte code esx_godirty hot zone
Citizen.CreateThread(function()
local blip = AddBlipForCoord(Config.Cloakroom.CloakRoom.Pos.x, Config.Cloakroom.CloakRoom.Pos.y, Config.Cloakroom.CloakRoom.Pos.z)

SetBlipSprite (blip, 351)
SetBlipDisplay(blip, 4)
SetBlipScale  (blip, 1.2)
SetBlipColour (blip, 49)
SetBlipAsShortRange(blip, true)

BeginTextCommandSetBlipName("STRING")
AddTextComponentString(_U('Money_Laundering'))
EndTextCommandSetBlipName(blip)

end)

Just analyse what i did before and you will do it by yourself…

can your edit apply to lsd?

Citizen.CreateThread(function()
local blip = AddBlipForRadius(Config.Cloakroom.CloakRoom.Pos.x, Config.Cloakroom.CloakRoom.Pos.y, Config.Cloakroom.CloakRoom.Pos.z)

	SetBlipHighDetail(blip, true)
	SetBlipColour(blip, 1)
	SetBlipAlpha (blip, 128)

local blip = AddBlipForCoord(Config.Cloakroom.CloakRoom.Pos.x, Config.Cloakroom.CloakRoom.Pos.y, Config.Cloakroom.CloakRoom.Pos.z)

	SetBlipSprite (blip, 351)
	SetBlipDisplay(blip, 4)
	SetBlipScale  (blip, 1.2)
	SetBlipColour (blip, 49)
	SetBlipAsShortRange(blip, true)

	BeginTextCommandSetBlipName("STRING")
	AddTextComponentString(_U('Money_Laundering'))
	EndTextCommandSetBlipName(blip)
end

end)
i try this but don’t work lost icon

you are missing the radius size

local blip = AddBlipForCoord(Config.Cloakroom.CloakRoom.Pos.x, Config.Cloakroom.CloakRoom.Pos.y, Config.Cloakroom.CloakRoom.Pos.z, 100.0)

i will not reply to this anymore, already clear how to do it

oke thanks so much i do good it :smiley: thanks

pls help

local blips = {
– Example {title="", colour=, id=, x=, y=, z=},
–Gang
–{title=“LCN”, colour=4, id=84, x=-2695.22, y=1304.02, z=148.19},
–{title=“GROVE”, colour=2, id=84, x=104.8, y=-1940.35, z=20.8},
–{title=“BALLAS”, colour=7, id=84, x=-185.51, y=-1673.22, z=33.54},
–{title=“BLOODS”, colour=1, id=84, x=317.65, y=-2026.04, z=20.64},
–{title=“VAGOS”, colour=5, id=84, x=-1131.03, y=-1587.66, z=4.4},
{title=“test”, colour=30, id=439, x=216.03, y=-816.03, z=112.55},
}

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)
  SetBlipScale(info.blip, 1.1)
  SetBlipHighDetail(blip, true)
  SetBlipColour(blip, 2)
  SetBlipAlpha (blip, 128)
  SetBlipColour(info.blip, info.colour)
  SetBlipAsShortRange(info.blip, true)
  BeginTextCommandSetBlipName("STRING")
  AddTextComponentString(info.title)
  EndTextCommandSetBlipName(info.blip)
end

end)

what is green zone code?

trying to change the color of the zone from red to green but u cant figure it out will someone guide me thru this please

Este Tópico esta muito confuso e bagunçado por favor poste algo decente como, Download o script ou codigo por completo ou algum tutorial.

how can i add more blips?
i created __resource.lua and blips.lua then i put client_script ‘blips.lua’ then i put this code in blips.lua
local blips{
{ name = “test”, sprite = 59, color = 1, x=408.371, y= -1039.500, z= 29.27}
}
–Create blips
Citizen.CreateThread(function()
for k,v in pairs(Config.Zones) do
local blip = AddBlipForRadius(v.x, v.y, v.z , 100.0) – you can use a higher number for a bigger zone

SetBlipHighDetail(blip, true)
SetBlipColour(blip, 1)
SetBlipAlpha (blip, 128)

local blip = AddBlipForCoord(v.x, v.y, v.z)

SetBlipSprite (blip, v.sprite)
SetBlipDisplay(blip, 4)
SetBlipScale  (blip, 0.9)
SetBlipColour (blip, v.color)
SetBlipAsShortRange(blip, true)

BeginTextCommandSetBlipName("STRING")
AddTextComponentString(v.name)
EndTextCommandSetBlipName(blip)

end
end)
is there any thing wrong in this code?

anyone got an idea how I can add green zone circles on the map without having to show a blip?