esx_ambulancejob and distresse signal - HalCroves/gcphone GitHub Wiki

For esx_ambulancejob you need to edit the send distress signal function if you want make it work with gcphone

https://github.com/ESX-Org/esx_ambulancejob/blob/c116378a6bed23005e833963d531133411a764f5/client/main.lua#L182

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

By :

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