Skip to main content

Integrate with phone

Learn how to integrate the call list with your phone.

info

Choose the phone the server uses below and follow the guide to integrate the call list with the phone

  1. Open the folder high_phone and go into the file sh_config.lua
  2. Find the line Config.CustomCallbacks and scroll down to ["sendMessage"]

Now you insert the highlighted bit of code and it should send a call to the police or ems when a message is sent to them

./high_phone/sh_config.lua
-- Messages app
["sendMessage"] = function(data)
local service = ""
if data.number == "01" then -- Make sure the number is correct
service = "police"
elseif data.number == "02" then -- Make sure the number is correct
service = "ambulance"
end -- Add more lines if you have additional services
TriggerServerEvent("omik_callist:newCall", nil, data.content, service)
TriggerServerEvent("high_phone:sendMessage", data.number, data.content, data.attachments, data.time)
end,