Waypoint AI EMS
Overview of the Waypoint AI EMS Script and how to configure.
Last updated
Overview of the Waypoint AI EMS Script and how to configure.
Last updated
Waypoint AI EMS is a script that enables you to dispatch an AI controlled ambulance to a downed person, it will bring them to the closest hospital and check them in. This script can be used in a variety of ways to enhance your RP.
You can use it to help fill the gap, when your active EMS numbers are low. Or your EMS/Doctors can use it to send the AI out to bring people to the hospital while they focus on building RP out of a hospital.
When the AI EMS are dispatched, they will spawn within a radius of the downed player and drive to their location
The EMS will perform CPR, load the downed person into the ambulance and then drive to the closest hospital
Once at the hospital drop off zone, the EMS will unload the person and carry them to the checkin location, where they will be revived
Multiple hospital drop off zones can be configured.
OneSync compatible
Multiple layers of redundancy have been implemented to assist the AI in attempting to get unstuck, should it find itself in such a situation.
Support for both QB and ESX, all framework functions are open source in the framework.lua file.
You can easily modify the script to support other frameworks by modifying the framework.lua file
Example uses cases:
Dispatch AI EMS when player presses a button when they are dead
Dispatch AI EMS automatically when player dies
Add a command for EMS/Police job to send an AI EMS to the target id
In your dispatch app, add a button that lets you send an AI EMS to the downed player via the downed player alerts.
Performance:
The script has an idle CPU time of 0.00ms
While in use, the CPU time is 0.01ms - 0.02ms
Notes:
If AI EMS are called and then the player is moved away from the location and/or revived, then the AI will drive away and despawn
AI will drive slower when offroad. This helps ensure they don't lose control as often.
If the ambulance gets stuck for Config.StuckTime
(default 1.5 minutes), then the player will be force checked in to the hospital.
Use Config.StuckCheckInRequiresBeingTransported
to configure whether or not the player has to be in the ambulance for the force check in to work
If the ambulance is not able to get close enough to the person, it may appear that they are stuck. As long as they are within 50 units of the player, they should proceed after waiting for 15 seconds.
Framework: QBCore, QBox, or ESX
Notify: QB, ESX, OX
Ambulance/Hospital script: qb-ambulancejob, qbx_ambulancejob, wasabi_ambulance - or equivalent script for checking into hospital
Optional:
qb-hud - or equivalent hud, only needed if you want to show indicator that EMS is enroute
Fuel script: LegacyFuel, ox_fuel, ps-fuel or equivalent fuel script - for fueling up the ambulance
oxmysql - only needed if you want to use telemetry