zephyr_mdtEventsClient

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)
ParameterTypeDescription
sourcenumberServer 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)
ParameterTypeDescription
sourcenumberServer ID of the target officer.
persontablePerson object returned by GetPersonByCitizenId.

Example

local person = exports.zephyr_mdt:GetPersonByCitizenId('ABC12345')
if person then
    TriggerClientEvent('mdt:client:openPerson', officerSrc, person)
end

mdt: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)
ParameterTypeDescription
sourcenumberServer ID of the target officer.
persontablePerson 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)
ParameterTypeDescription
sourcenumberServer ID of the target player.
titlestringNotification title.
messagestringNotification body text.
ntypestringNotification 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)
ParameterTypeDescription
sourcenumberServer ID of the target player (-1 for all).
offencestableArray of offence category objects. Pass {} to clear.