Skip to main content

Server Events

The call list has a few events that make it easy to communicate with the call list. See the available server events below.

omik_callist:newCall

Send a new call to the call list

TriggerEvent("omik_callist:newCall", playerSrc, message, job, coords, y)

Parametre

ParameterBeskrivelseTypeDefault
playerSrcSenders src or 0 for unknown sendernumber0
messageMessage to be sentstring""
jobOne of the jobs in Config.jobsstring""
coords or xVector with x,y coords or xvector2(x, y) or number0
yNot necessary if you send coords as vector2(x,y)number0

Example

-- Inside a server side script
local player = source
local ped = GetPlayerPed(player)
local playerCoords = GetEntityCoords(ped)
TriggerEvent("omik_callist:newCall", source, "I need help", "police", playerCoords.xy)
-- Inside a client side script
local player = PlayerPedId()
local playerCoords = GetEntityCoords(player)
TriggerServerEvent("omik_callist:newCall", player, "I need help", "police", playerCoords.xy)

omik_callist:openCallist

Open the call list

info

This event is only available on the client side

TriggerServerEvent("omik_callist:openCallist")