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
Parameter | Description | Type | Default |
---|---|---|---|
playerSrc | Sender's source ID or 0 for unknown sender | number | 0 |
message | Message to be sent | string | "" |
job | One of the jobs in Config.jobs | string | "" |
coords | Vector with x,y coords | vector2(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)