Link multiple department phone notifications

esx
esx_phone
esx_policejob
esx_ambulancejob

#1

Hey. I want to link the phone number between the ambulance job and the policejob. how do I go about linking the two departments to get unified notifications?

I do know that it has to do with with both server and client main.lua files.

RegisterNetEvent(‘esx_phone:loaded’)
AddEventHandler(‘esx_phone:loaded’, function(phoneNumber, contacts)
local specialContact = {
name = _U(‘phone_police’),
number = ‘police’,
base64Icon = somelonglinkthatidontwanttocopy’
}

TriggerEvent(‘esx_phone:addSpecialContact’, specialContact.name, specialContact.number, specialContact.base64Icon)
end)

And from server main.lua:

if Config.MaxInService ~= -1 then
TriggerEvent(‘esx_service:activateService’, ‘sasp’, Config.MaxInService)
end

TriggerEvent(‘esx_phone:registerNumber’, ‘police’, _U(‘alert_sasp’), true, true)
TriggerEvent(‘esx_society:registerSociety’, ‘sasp’, ‘SASP’, ‘society_sasp’, ‘society_police’, ‘society_police’, {type = ‘public’})


#2

This was me trying to link two policejobs together, having separate base sql’s (SASP and LAPD). It doesn’t work lol. I also need help for this