Client Events
These are net events the MDT registers on the client. Other resources can trigger them server-side using TriggerClientEvent to programmatically control the MDT for a specific player.
zephyr_mdt:client:open
Opens the MDT for the target player. Has no effect if the player’s job is not in Config.AllowedJobs or they do not meet Config.MinGrade.
TriggerClientEvent('zephyr_mdt:client:open', source)| Parameter | Type | Description |
|---|---|---|
source | number | Server ID of the player to open for. |
mdt:client:openPerson
Opens the MDT (if not already open) and navigates directly to a person’s profile. Used by dispatch integrations to push a suspect’s record to an officer.
TriggerClientEvent('mdt:client:openPerson', source, person)| Parameter | Type | Description |
|---|---|---|
source | number | Server ID of the target officer. |
person | table | Person object returned by GetPersonByCitizenId. |
Example
local person = exports.zephyr_mdt:GetPersonByCitizenId('ABC12345')
if person then
TriggerClientEvent('mdt:client:openPerson', officerSrc, person)
endmdt:client:openCharge
Opens the MDT (if not already open) and navigates to the charge / process screen for a person.
TriggerClientEvent('mdt:client:openCharge', source, person)| Parameter | Type | Description |
|---|---|---|
source | number | Server ID of the target officer. |
person | table | Person object returned by GetPersonByCitizenId. |
mdt:client:notify
Pushes a notification into the MDT UI. Only visible if the MDT is currently open for that player.
TriggerClientEvent('mdt:client:notify', source, title, message, ntype)| Parameter | Type | Description |
|---|---|---|
source | number | Server ID of the target player. |
title | string | Notification title. |
message | string | Notification body text. |
ntype | string | Notification type: 'info', 'success', 'error', 'warning'. Defaults to 'info'. |
Example
TriggerClientEvent('mdt:client:notify', source, 'Warrant Issued', 'A warrant has been issued for John Doe.', 'info')zephyr_mdt:client:offencesUpdated
Pushes a refreshed offences list to any open MDT instances on the target client. Used internally when the offences table is modified via the in-MDT editor, but can be triggered externally to force a sync.
TriggerClientEvent('zephyr_mdt:client:offencesUpdated', source, offences)| Parameter | Type | Description |
|---|---|---|
source | number | Server ID of the target player (-1 for all). |
offences | table | Array of offence category objects. Pass {} to clear. |