Skip to content

Commit

Permalink
fix: checking in on respawn
Browse files Browse the repository at this point in the history
  • Loading branch information
Manason committed Dec 1, 2023
1 parent f8b24a6 commit 0d281fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/hospital.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0d281fc

Please sign in to comment.