@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)
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})
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.
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.
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.