Client Events
The call list has a few events that make it easy to communicate with the call list from the client side. See the available client events below.
Adding a New Call
Event: omik_callist:newCall
Send a new call to the call list from a client script
Aliases
The following event names all perform the same action:
omik_callist:newCallomik_callist:NewCallomik_callist:addCallomik_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) |
Example
-- Using your current player information
local player = GetPlayerServerId(PlayerId())
local playerCoords = GetEntityCoords(PlayerPedId())
TriggerEvent("omik_callist:newCall", player, "I need help", "police", playerCoords.xy)
Opening the Call List
Event: omik_callist:open
Open the call list interface from a client script
Aliases
The following event names all perform the same action:
omik_callist:openomik_callist:Open
Example
-- To open the call list interface
TriggerEvent("omik_callist:open")