Listeners and Exports

This page tells you all about our listeners setup and available exports

What are listeners? Listeners are function references that get triggered when a specific action is done by the system, and can be registered on the Server Side Only Available Listeners These are the current listeners available to you

  • onCaseCreation

  • onCaseUpdate

  • onCaseVerdict

  • onCaseDismissal

  • onCaseAdjournment

  • onCaseHearingScheduled

Example

local listener = exports['veil-government']:registerListener('onCaseCreation', function(payload)
    print('Case event received')
    print(payload)
    if (type(payload) == 'table') then
        for k,v in pairs(payload) do
            print(k,v)
        end
    end
end)

This outputs the following

Case event received
table: 00000000495CF7C0
id 187472
plaintiff G3BY378F
plaintiffName John Doe
defendant BF2H378F
defendantName John Dae
date 2024/01/01 12:00:00 PM
verdict 
judge
judgeName
jurors
charges
evidence
witnesses
notes
status Pending
history table: 0000000278H3D2
penalty table: 000000072H783D
isClosed false

The following are the listeners and the data they provide

The following are the exports available

Last updated