Waypoint Scripts
  • Waypoint Scripts
  • Store
  • Support Discord
  • Scripts
    • 🚑Waypoint AI EMS
      • 📝Setup
      • 🖥️Code Snippets
      • ❔FAQ
      • 📃Exports / Events
      • 🔢Telemetry
    • 🚕Waypoint AI Taxi
      • 📝Setup
      • 🖥️Code Snippets
      • 📃Exports / Events
      • 🔢Telemetry
    • 🎆Waypoint Fireworks
      • 📝Setup
    • 💡Waypoint Neons
      • 📝Setup
    • 🐕Waypoint Animals
      • 📝Setup
      • ❔FAQ
  • Free Scripts
    • 🚚Waypoint Tow / Hauling
    • 🛠️Waypoint Placeables
    • 🚦Waypoint Traffic Lights
    • 🧘‍♂️Waypoint Yogamats
    • 🖨️Waypoint Printer
    • 🚲Waypoint Pocket Bikes
    • 👻Waypoint Smoke Monster
    • 🪑Waypoint Seats
Powered by GitBook
On this page
  • Nothing works
  • How do I fix the EMS dropping the player off at the hospital but it does not check them in?
  1. Scripts
  2. Waypoint AI EMS

FAQ

PreviousCode SnippetsNextExports / Events

Last updated 2 months ago

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-ambulancejobthey do a distance check . 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"

🚑
❔
in their check-in event