Hop til hovedindhold

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.

Adding a New Call

Event: omik_callist:newCall

Send a new call to the call list

Aliases

The following event names all perform the same action:

  • omik_callist:newCall
  • omik_callist:NewCall
  • omik_callist:addCall
  • omik_callist:AddCall
TriggerEvent("omik_callist:newCall", playerSrc, message, job, coords)

Parameters

ParameterDescriptionTypeDefault
playerSrcSender's source ID or 0 for unknown sendernumber0
messageMessage to be sentstring""
jobOne of the jobs in Config.jobsstring""
coordsVector with x,y coordsvector2(x, y)

Examples

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)