[HELP] EMS cant found player who died

Hi folks, I would like to ask if anyone knows, if there is a dead Person they can’t send a distress signal?
Im searching for some time and well i didnt really found anything

Exactly about esx_ambulancejob a slightly old version ‘1.2.0’.
Thanks in advance.

-- Disable most inputs when dead
Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)

		if IsDead then
			DisableAllControlActions(0)
			EnableControlAction(0, 47, true)
			EnableControlAction(0, 245, true)
			EnableControlAction(0, 38, true)
		else
			Citizen.Wait(500)
		end
	end
end)

function OnPlayerDeath()

--if GetPlayerRoutingBucket(source) ~= 5 then
	IsDead = true
	local second = 1000

	Citizen.CreateThread(function()
		repeat
			Citizen.Wait(300 * second)
			ClearPedTasksImmediately(GetPlayerPed(-1))
		until IsDead == false
	end)
		
	ESX.UI.Menu.CloseAll()
	TriggerServerEvent('esx_ambulancejob:setDeathStatus', true)

	StartDeathTimer()
	--SendDistressSignal()

	ClearPedTasksImmediately(GetPlayerPed(-1))
	StartScreenEffect('DeathFailOut', 0, false)
--end
end

function StartDistressSignal()
	Citizen.CreateThread(function()
		local timer = Config.EarlyRespawnTimer

		while timer > 0 and IsDead do
				Citizen.Wait(2)
				timer = timer - 30

			SetTextFont(4)
			SetTextScale(0.0, 0.5)
			SetTextColour(255, 255, 255, 255)
			SetTextDropshadow(0, 0, 0, 0, 255)
			SetTextEdge(1, 0, 0, 0, 255)
			SetTextDropShadow()
			SetTextOutline()
			SetTextCentre(true)
			BeginTextCommandDisplayText('STRING')
			AddTextComponentSubstringPlayerName(_U('distress_send'))
			EndTextCommandDisplayText(0.175, 0.805)

			if IsControlPressed(1, Keys['E']) then
				SendDistressSignal()
				
				Citizen.CreateThread(function()
					Citizen.Wait(60000)
					if IsDead then
						StartDistressSignal()
					end
				end)

				break
			end
		end
	end)
end

function SendDistressSignal()
	local playerPed = PlayerPedId()
	local coords    = GetEntityCoords(playerPed)
	local position = {x = coords.x, y = coords.y, z = coords.z}


	TriggerEvent("d-phone:client:message:senddispatch", "Verletzte Person entdeckt!", "ambulance", 0, 1, position, "5")
	TriggerEvent("d-notification", "Dein Notruf wurde abgesetzt", 5000,  "rgba(255, 0, 0, 0.8)")
end

function DrawGenericTextThisFrame()
	SetTextFont(4)
	SetTextScale(0.0, 0.5)
	SetTextColour(255, 255, 255, 255)
	SetTextDropshadow(0, 0, 0, 0, 255)
	SetTextEdge(1, 0, 0, 0, 255)
	SetTextDropShadow()
	SetTextOutline()
	SetTextCentre(true)
end