Cops see cop blips on map

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

1 Like

To make this more clear can you be sure you edit this post and fix the formatting? I’m having trouble reading it :mascot:

did you get this to work

Here are some different things that MAY be helpful to you!

Hopefully, all of this will point you in the right direction! I didn’t want to give answers of course, but I’m more than happy to help with any bits you get stuck on! :slight_smile: