βFAQ
Nothing works
How do I fix the EMS dropping the player off at the hospital but it does not check them in?
-- This will check the player into the hospital that they spawn near
-- The hospitalIndex provided by wp-ai-ems must match the index for the hospital locations defined in this script
RegisterNetEvent('qb-ambulancejob:aiems-checkin', function(hospitalIndex)
QBCore.Functions.Progressbar("hospital_checkin", Lang:t('progress.checking_in'), 2000, false, true, {
disableMovement = true,
disableCarMovement = true,
disableMouse = false,
disableCombat = true,
}, {}, {}, {}, function() -- Done
-- Gets a bed that is not occupied at this hospital to place the player in
local bedId = getClosestAvailableBed(hospitalIndex)
if bedId then
TriggerServerEvent("hospital:server:SendToBed", bedId, true, hospitalIndex)
hospitalLocation = hospitalIndex
HospitalOutfit()
else
QBCore.Functions.Notify(Lang:t('error.beds_taken'), "error")
end
end)
end)Last updated