So im trying to make it that cops can see each other on the map
I am trying to base it off scammers script and the fivm cop menu but having some issues, would appreciate if anyone could point me in the right direction
function enableCopBlips()
for k, existingBlip in pairs(blipsCops) do
RemoveBlip(existingBlip)
end
blipsCops = {}
local localIdCops = {}
for id = 0, 64 do
if(NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId()) then
for i,c in pairs(allServiceCops) do
if(i == GetPlayerServerId(id)) then
localIdCops[id] = c
break
end
end
end
end
for id, c in pairs(localIdCops) do
local ped = GetPlayerPed(id)
local blip = GetBlipFromEntity(ped)
if not DoesBlipExist(blip) then
blip = AddBlipForEntity(ped)
SetBlipSprite(blip, 1)
Citizen.InvokeNative( 1581098148,0x5E3DA4A4, blip, true)
HideNumberOnBlip( blip)
SetBlipNameToPlayerName(blip, id)
SetBlipScale(blip, 0.85)
SetBlipAlpha(blip, 255)
table.insert(blipsCops, blip)
else
blipSprite = GetBlipSprite(blip)
HideNumberOnBlip(blip)
if blipSprite ~= 1 then
SetBlipSprite(blip, 1)
Citizen.InvokeNative(1581098148,0x5E3DA4A4, blip, true)
end
SetBlipNameToPlayerName(blip, id)
SetBlipScale(blip, 0.85)
SetBlipAlpha(blip, 255)
table.insert(blipsCops, blip)
end
end
end