[HELP]Esx_ambulancejob

Hello all,

i am having a problem with the ambulance job as soon as i enter the hospital it works fine etc also when i exit it. But when i am on duty and trying to enter a proppertie i bought it will spawn me towards the hospital again. Anyone got a solution for this ?

Thnx

bumpp

Why does it not work?
I am a medic. I just want it when I die. I can’t user F6 for revive.
esx_ambulancejob\client\main.lua

function SendDistressSignalMe()
local xPlayer = ESX.GetPlayerFromId(Source)
local JobName = xPlayer.job.name

ESX.ShowNotification(_U(‘used_medikit’))
if JobName == ‘ambulance’ then
TriggerServerEvent(‘esx_ambulancejob:revive’,GetPlayerServerId(PlayerId()))
end
end