function CreateBlipCircle2(coords, text, radius, color, sprite)
local blip = AddBlipForRadius(coords, radius)
SetBlipHighDetail(blip, true)
SetBlipColour(blip, 2)
SetBlipAlpha (blip, 128)
-- create a blip in the middle
blip = AddBlipForCoord(coords)
SetBlipHighDetail(blip, true)
SetBlipSprite (blip, sprite)
SetBlipPriority (blip,100)
SetBlipScale (blip, 0.8)
SetBlipColour (blip, color)
SetBlipAsShortRange(blip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentString(text)
EndTextCommandSetBlipName(blip)
end
Citizen.CreateThread(function()
for k,zone in pairs(CircleZones2) do
CreateBlipCircle2(zone.coords, zone.name, zone.radius, zone.color, zone.sprite)
end
end)
Citizen.CreateThread(function()
while true do
local oyuncuK = GetEntityCoords(PlayerPedId())
for k,zone in pairs(CircleZones2) do
if GetDistanceBetweenCoords(oyuncuK, zone.coords.x, zone.coords.y, zone.coords.z, true) < zone.radius then
sleep = 100
SetEntityInvincible(PlayerPedId(), true)
SetCurrentPedWeapon(PlayerPedId(), "WEAPON_UNARMED", true)
else
sleep = 2000
SetEntityInvincible(PlayerPedId(), false)
end
Citizen.Wait(sleep)
end
end
end)