From 0d281fc3a933090d0f0a3d39d85f7a9a7b32839b Mon Sep 17 00:00:00 2001 From: Manason Date: Fri, 1 Dec 2023 08:44:49 -0800 Subject: [PATCH] fix: checking in on respawn --- server/hospital.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/hospital.lua b/server/hospital.lua index 4f96362..d480c31 100644 --- a/server/hospital.lua +++ b/server/hospital.lua @@ -142,10 +142,12 @@ local function respawn(src) end end - if not checkIn(src, src, closestHospital) then - lib.print.error(src, 'unable to check-in at hospital. Likely due to no available beds.') + local bedIndex = getOpenBed(closestHospital) + if not bedIndex then + exports.qbx_core:Notify(src, Lang:t('error.beds_taken'), 'error') return end + TriggerClientEvent('qbx_ambulancejob:client:checkedIn', src, closestHospital, bedIndex) if config.wipeInvOnRespawn then wipeInventory(player)