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
# onCaseCreation -> [id: string, plaintiff: string, plaintiffName: string, defendant: string, defendantName: string, date: string, verdict: string, judge: string, judgeName: string, jurors: {}, charges: { count: number, type: "civil" | "criminal", degree: "civil-infraction" | "misdemeanor" | "felony", name: string }, evidence: { id: string, name: string, type: "image" | "video" "audio" | "document", url: string }, witnesses: { identifier: string, name: string, side: "plaintiff" | "defendant" }, notes: string, status: string, history: { date: string, action: string, action_by: string }, penalty: { fine: number, jailtime: number }, isClosed: boolean]
# onCaseUpdate -> [id: string, plaintiff: string, plaintiffName: string, defendant: string, defendantName: string, date: string, verdict: string, judge: string, judgeName: string, jurors: {}, charges: { count: number, type: "civil" | "criminal", degree: "civil-infraction" | "misdemeanor" | "felony", name: string }, evidence: { id: string, name: string, type: "image" | "video" "audio" | "document", url: string }, witnesses: { identifier: string, name: string, side: "plaintiff" | "defendant" }, notes: string, status: string, history: { date: string, action: string, action_by: string }, penalty: { fine: number, jailtime: number }, isClosed: boolean]
# onCaseVerdict -> [id: string, plaintiff: string, plaintiffName: string, defendant: string, defendantName: string, date: string, verdict: string, judge: string, judgeName: string, jurors: {}, charges: { count: number, type: "civil" | "criminal", degree: "civil-infraction" | "misdemeanor" | "felony", name: string }, evidence: { id: string, name: string, type: "image" | "video" "audio" | "document", url: string }, witnesses: { identifier: string, name: string, side: "plaintiff" | "defendant" }, notes: string, status: string, history: { date: string, action: string, action_by: string }, penalty: { fine: number, jailtime: number }, isClosed: boolean]
# onCaseDismissal -> [id: string, plaintiff: string, plaintiffName: string, defendant: string, defendantName: string, date: string, verdict: string, judge: string, judgeName: string, jurors: {}, charges: { count: number, type: "civil" | "criminal", degree: "civil-infraction" | "misdemeanor" | "felony", name: string }, evidence: { id: string, name: string, type: "image" | "video" "audio" | "document", url: string }, witnesses: { identifier: string, name: string, side: "plaintiff" | "defendant" }, notes: string, status: string, history: { date: string, action: string, action_by: string }, penalty: { fine: number, jailtime: number }, isClosed: boolean]
# onCaseAdjournment -> [id: string, plaintiff: string, plaintiffName: string, defendant: string, defendantName: string, date: string, verdict: string, judge: string, judgeName: string, jurors: {}, charges: { count: number, type: "civil" | "criminal", degree: "civil-infraction" | "misdemeanor" | "felony", name: string }, evidence: { id: string, name: string, type: "image" | "video" "audio" | "document", url: string }, witnesses: { identifier: string, name: string, side: "plaintiff" | "defendant" }, notes: string, status: string, history: { date: string, action: string, action_by: string }, penalty: { fine: number, jailtime: number }, isClosed: boolean]
# onCaseHearingScheduled -> [id: string, plaintiff: string, plaintiffName: string, defendant: string, defendantName: string, date: string, verdict: string, judge: string, judgeName: string, jurors: {}, charges: { count: number, type: "civil" | "criminal", degree: "civil-infraction" | "misdemeanor" | "felony", name: string }, evidence: { id: string, name: string, type: "image" | "video" "audio" | "document", url: string }, witnesses: { identifier: string, name: string, side: "plaintiff" | "defendant" }, notes: string, status: string, history: { date: string, action: string, action_by: string }, penalty: { fine: number, jailtime: number }, isClosed: boolean]
The following are the exports available
# getTaxData(identifier: string) -> [identifier: string, assets: number, income: number, amountDue: number; dueDate: string, status: "paid" | "unpaid" | "late", actions?: { type: "vehicle-seized" | "property-seized" | "bank-account-frozen" | "none" }, content: string, asset: [ { name: string, label: string, value: number, identifier?: string } ], name?: string]
# onVehiclePurchase(src: number, price: number) -> void
# onMarketSale(src: number, price: number -> void
# onPropertyTransaction(src: number, price: number) -> void
Last updated