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
  • Client Event
  • Server Event
  1. Scripts
  2. Waypoint AI EMS

Exports / Events

Client Event

-- Called on the client where the AI EMS should be dispatched to
--- @param isInstantDispatch: boolean if true dispatch immediately, else delay based on Config.DispatchEMSWaitTime
TriggerClientEvent('wp-ai-ems:client:DispatchAIEMS', isInstantDispatch)
-- Add this event to your HUD script to show an indicator when EMS are enroute to the player
--- @param isEnroute boolean of whether the EMS is enroute to the player
RegisterNetEvent('hud:client:ToggleEMSEnroute', function(isEnroute)
    showEmsEnroute = isEnroute
end)

-- Returns a boolean of whether the player is currently being transported by AI EMS
exports["wp-ai-ems"]:isPlayerBeingTransported()

Server Event

-- Server event to dispatch AI EMS, can be used to dispatch to other players.
--- @param targetId - the serverId of the downed player that the AI EMS is dispatched to
--     Example of how to get the current users serverId: GetPlayerServerId(PlayerId())
--- @param isInstantDispatch: boolean boolean if true dispatch immediately, else delay based on Config.DispatchEMSWaitTime
TriggerServerEvent('wp-ai-ems:server:DispatchAIEMS', targetId, isInstantDispatch)

PreviousFAQNextTelemetry

Last updated 2 months ago

🚑
📃