Hop til hovedindhold

Events & Exports

This section contains documentation for all the events and exports available in the omik_callist resource.

Available Documentation

Server-Side Integration

Client-Side Integration

Quick Reference

Adding a New Call

You can add a new call to the call list using any of these methods:

The from field takes precedence over the resolved sender name from src or identifier, allowing you to specify a custom sender label for the call (e.g. "Dispatch", "CAD", etc.) for better integration with various systems.

You must provide either of from, src, or identifier to ensure the call has a recognizable sender in the call list. If none of these are provided, the call will be added with an "Unknown" sender.

Server-Side

-- Using events (recommended in v2.2.2+)
TriggerEvent("omik_callist:newCall", {
src = playerSrc,
message = message,
service = job,
coords = coords,
from = "Dispatch" -- optional
})

-- Using exports (recommended in v2.2.2+)
exports["omik_callist"]:newCall({
src = playerSrc,
message = message,
service = job,
coords = coords,
from = "Dispatch" -- optional
})

-- Legacy format (still supported)
TriggerEvent("omik_callist:newCall", playerSrc, message, job, coords)
exports["omik_callist"]:newCall(playerSrc, message, job, coords)

Client-Side

-- Using events
TriggerEvent("omik_callist:newCall", playerSrc, message, job, coords)

-- Using exports
exports["omik_callist"]:newCall(playerSrc, message, job, coords)

Opening the Call List

You can open the call list interface using any of these methods:

Server-Side

-- Only available on the client side

Client-Side

-- Using events
TriggerEvent("omik_callist:open")

-- Using exports
exports["omik_callist"]:open()

Getting Configuration

-- Only available as an export
local config = exports["omik_callist"]:Config()