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)
endTriggerEvent(‘esx_phone:registerNumber’, ‘police’, _U(‘alert_sasp’), true, true)
TriggerEvent(‘esx_society:registerSociety’, ‘sasp’, ‘SASP’, ‘society_sasp’, ‘society_police’, ‘society_police’, {type = ‘public’})