Exports
Quality of life scripts for your FiveM server. Performance optimized resources that install in minutes, with free updates and support that actually answers.
The cad-citations resource provides utility exports to manage the UI, including showing citations list, citations receipt, creating citation, etc.
Class : ICitation
The data passed to various exports must follow the ICitation format:
---@class ICitation
---@field id number | nil -- Optional: Citation ID (used for updates)
---@field comments string | nil -- Optional: Additional comments
---@field fullName string -- Full name of the cited person
---@field citizenId string -- Unique citizen ID
---@field fineAmount string -- Fine amount as string (e.g., "250")
---@field violations table|string|nil -- List or string of violations
---@field vehicleModel string -- Model of the involved vehicle
---@field plateNumber string -- License plate number
---@field currentDate string|number -- Citation date (can be string or timestamp)
---@field streetName string -- Location of the incident
---@field officerCitizenId string|nil -- Officer's citizen ID
---@field officerName string -- Name of the officer issuing the citation
---@field officerCallsign string -- Officer's callsign
---@field officerJob string -- Officer's job role
---@field evidence string -- URL or reference to evidence (images, video, etc.)Class : IEventData
The data passed are in IEventDataformat:
---@class IEventData
---@field source number | nil
---@field citizenId string | nil
---@field data ICitationClient
showCitation(data: ICitation)
Displays a non-editable citation receipt for the user.
exports['cad-citations']:showCitation(data)data: Table containing citation information (see
ICitation).Usage: To show a preview or receipt of an existing citation.
createCitation(data: ICitation)
Opens the editable citation creation UI with pre-filled data.
exports['cad-citations']:createCitation(data)data: Table with optional predefined fields for citation.
Usage: Use when you want to create or pre-fill a citation with partial information.
showDashboard()
Opens the citation dashboard, listing all citations on the server.
exports['cad-citations']:showDashboard()Features: View, Pay, Edit, Delete citations based on user permissions.
Usage: Ideal for officers or administrative roles.
resetUI()
Resets the UI cursor and forcibly closes the citation UI.
exports['cad-citations']:resetUI()Usage: Useful as a fallback if the UI becomes unresponsive or stuck.
Server
showCitation(source: number, data: ICitation)
Displays a non-editable citation receipt to a specific player.
exports['cad-citations']:showCitation(source, data)source: The target player's server ID.
data: Citation data (see
ICitation).Usage: Show a citation to a player from the server-side (e.g., after a database fetch).
createCitation(source: number, data: ICitation)
Opens the editable citation UI for a specific player with optional pre-filled data.
exports['cad-citations']:createCitation(source, data)source: The target player's server ID.
data: Citation data available to pre-fill (see
ICitation).Usage: Trigger citation UI remotely from server events or commands.
