I was trying to make gcphone notify police, ambulance or other jobs. Went through all possible forums topics tried all the suggestions and it still does not work. Later I decided to implement my own way to notify jobs when someone calls them. That did not work either. Tried to write a short script for testing:
That does not show any notifications for police (in this case) either.
Is there something I might be doing wrong or missing something that might cause this?
P.S. Distress signal when dead does not send anything to ambulance either
So, i have this in my esx_policejob -> client -> main.lua — LINE 2018
function SendPoliceDistressSignal()
local playerPed = GetPlayerPed(-1)
local coords = GetEntityCoords(playerPed)
ESX.ShowNotification(_U('distress_sent'))
TriggerServerEvent('esx_phone:send', 'police', _U('police_distress_message'), false, {
x = coords.x,
y = coords.y,
z = coords.z
})
end
function SendDistressSignal()
local playerPed = PlayerPedId()
local coords = GetEntityCoords(playerPed)
ESX.ShowNotification(_U(‘distress_sent’))
TriggerServerEvent(‘esx_phone:send’, ‘ambulance’, _U(‘distress_message’), false, {
x = coords.x,
y = coords.y,
z = coords.z
})
end
To
function SendDistressSignal()
local playerPed = PlayerPedId()
PedPosition = GetEntityCoords(playerPed)
local PlayerCoords = { x = PedPosition.x, y = PedPosition.y, z = PedPosition.z }
ESX.ShowNotification(_U(‘distress_sent’))
TriggerServerEvent('esx_addons_gcphone:startCall', 'ambulance', _U('distress_message'), PlayerCoords, {
PlayerCoords = { x = PedPosition.x, y = PedPosition.y, z = PedPosition.z },
})
end
Also you said you followed everything in that link it literally tells you in his original post how to do it. You needs the esx_addons_gcphone resource as well
Yup, I do, like I said tried everything from the forums topics I was able to find online. Tried 4 or 5 different gcphone resources. I am looking for solution for nearly a week.
My resources work perfectly fine and I changed them a month ago after the ESX latest update and everything worked fine, if you think sharing my resources would help you, let me know so I can send them over and tell you what to change.