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
Parameter | Beskrivelse | Type | Default |
---|---|---|---|
playerSrc | Senders src or 0 for unknown sender | number | 0 |
message | Message to be sent | string | "" |
job | One of the jobs in Config.jobs | string | "" |
coords or x | Vector with x,y coords or x | vector2(x, y) or number | 0 |
y | Not necessary if you send coords as vector2(x,y) | number | 0 |
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")