❔FAQ
Nothing works
Are you using OX for any of the framework / scripts?
If yes, you MUST uncomment @ox_lib/init.lua
line in the fxmanifest.
How do I fix the EMS dropping the player off at the hospital but it does not check them in?
If you are using qb-ambulancejob
they do a distance check in their check-in event. If the player is not within that distance, it will prevent the player from checking in when dropped off outside by the AI EMS.
There are a handful of ways you could fix this:
(preferred) create a new check-in event
increase the distance its checking for
remove the distance check completely
Here is an example of what a new event could look like that works with qb-ambulancejob.
-- 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)
Don't forget to update the config
Config.HospitalCheckinEvent = "qb-ambulancejob:aiems-checkin"
Last updated