[Release] EmergencyBlips

@DesertFade It’s literally just a copy of source. Defined it right at the beginning of the event handler that calls eblips:add. source should work just the same assuming you aren’t doing anything asynchronously (which if I had to guess you aren’t)

Let me know how your testing goes!

Make PoliceBlips plss

Yea, works now. Don’t know what was the issue …

Btw, a little feature request:
Would be nice to have classes which you can assign to police, ems and other departments so they can see each other but not other departments, e.g.: EMS sees other EMS members but no police members.
Event would look like this: TriggerEvent("eblips:add", {name = GetPlayerName(source), src = source, color = 29, class = 1})

Greetings

3 Likes

@DesertFade Glad it works!

I can work on adding that extra feature when I find some time! That’s not a bad idea! I’ll update the post whenever that is added!

1 Like

I have not looked at the code yet, but does this allow for all players to see the police blips or just specified peds to see each others blips? Anyways great work!

@TreyWoods Only specified peds see the blips. Anyone who shows up as a blip on the map sees everyone else who also shows with blips on the map and others cannot see them.

Sure, would be nice to have such a thing.^^
Thank you for your still really nice resource which i’m already using.^^

2 Likes

Nice work, using it!

1 Like

Not sure what im doing wrong, ive put the folder in my resource folder, added

-start Emergencyblips

into server.cfg, and still nothing on the map. Using ESX btw…

@DiizeQT this is a resource for script developers to use and does nothing by itself, you must use the above two events for the blips to work.

For this i would think police and ems should see each other just have red and blue blips to tell them apart. That way ems or police can find the other and help as needed.

1 Like

Great idea. Anyone got an ESX friendly version? I’d write it myself but I literally don’t have time.

1 Like

@Fourthbeam This should work for ESX already.

Thank you for your reply and sorry for my late response, so where would someone go about and add in these two events to make sure the blips is on the map? Using esx_policejob.

Hi. You wonna Easy Automated Job Blips (ESX)?
All you need is to have esx_policejob, which has every server with ESX, and it’s easy to do it and it will automatically blip.

Find in esx_policejob \ client \ main.lua:

-- Is the player a cop? In that case show all the blips for other cops
if not isDead and PlayerData.job ~= nil and PlayerData.job.name == 'police' then
	ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players)
		for i=1, #players, 1 do
			if players[i].job.name == 'police' then
				local id = GetPlayerFromServerId(players[i].source)
				if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then
					createBlip(id)
				end
			end
		end
	end)
end

Right now, just copy and replace the work name :D.

Example:

I’m sorry for my fatal English I hope you understood me.

1 Like

what wrong ?

  1. make sure you call those events from a SERVER SIDED script, not client sided.

  2. you don’t need that “class” attribute in the object passed to eblips:add.

  3. make sure you are using the correct source/server ID

1 Like

could you do it to where ems and cops can see eachother aswell?

They are able to see each other already and you can change the blip color for EMS to something like red.

yeah that’d be amazing