Ambulance Dispatch

If you are a qbcore user, this snippet will not work for you, but it is good to know how to run this system to be able to integrate it into other assets.

This system is to send a direct message from an event, but Smartphone PRO has a great and dynamic SOS system, check it out from the SOS Message System document.

Quasar Smartphone has a communication system with ambulances, here we will leave you an example using esx_ambulancejob in esx, since qbcore does not require said integration due to its different operation.

There is no longer export for business?

No, since Business is not an application that is on Smartphone PRO.

The old event won't work with this system?

No, we will have to edit the function again in case of Smartphone PRO.

Integration via Message

This snippet will be for esx_ambulancejob but you can integrate it wherever you want since it is standalone, in this example we will edit esx_ambulancejob/client/main.lua and replace the following function.

function SendDistressSignal()
  local coords = GetEntityCoords(PlayerPedId())
  local street = GetStreetNameAtCoord(coords.x, coords.y, coords.z)
  local streetName = GetStreetNameFromHashKey(street)
  local message = json.encode(coords)
  TriggerServerEvent('phone:sendSOSMessage', 'ambulance', message, 'location')
  message = ([[
      I need help! I'm at %s. Please fast come here!
  TriggerServerEvent('phone:sendSOSMessage', 'ambulance', message, 'message')

Last updated