Waypoint AI EMS

20.00 USD

This resource uses FiveM escrow protection. Configuration, framework, and server files are accessible.

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.
Trailer Video

Preview Video

How it works:

  • 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
  • We provide a /callems command by default, as well as expose the client and server events for dispatching AI EMS. These can be added wherever you would like to use them.
  • 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

Dependencies:

  • Framework: QBCore, QBox,  ESX
  • Notify: QB, ESX, OX
  • AmbulanceScript: qb-ambulancejob, qbx_ambulancejob, esx_ambulancejob, wasabi_ambulancejob - 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
    • FuelScript: LegacyFuel, ox_fuel, ps-fuel or equivalent fuel script

    • oxmysql - only needed if you want to use telemetry

Additional Notes

  • It is not 100% guaranteed that the AI EMS will be able to reach the downed players location. There are several factors that contribute to reducing the reliability. 
    • The current success rate is approximately 90% (+/- 5% deviation). 
    • We have run the script on our server for over a year and have observed a reliability of 93% on more than 4000 times it was used.  
  • AI navigation is far from perfect. There is no guarantee that the AI EMS will be able to reach the downed players location. There are plenty of variables and obstacles that can result in the AI not reaching a player including but not limited to: downed player location, traffic, other players, etc.
  • The AI EMS tends to have the most difficulties / fail, when the downed person is far away from the road, in tight alleyways, on roof tops, or other hard to reach areas. The success rate, is highly dependent on the location that the AI EMS is dispatched to. It is most successful when the downed person is in an open, accessible area near a road.
  • Custom MLOs are a known problematic area. Often this is due to MLOs not properly setting up a navmesh, which is required for the AI to properly pathfind its way in the world. This often results in the AI EMS not being able to enter or navigate interiors of these MLOS. This is not something that this script can solve.
    • If you have an interior with improper navmesh, it is recommended to have players bring the downed player outside of the building first and then trigger the dispatch AI EMS.

Click here for Documentation and Setup Instructions