Skip to content

Customization ​

Start with the supplied configuration and change one area at a time. Keep copies of your customized files so you can reapply your changes when updating the resource.

Editable files ​

File or folderPurpose
config.luaFramework, inventory, notification backend, categories, limits, commands, and actions
locales/*.jsonText connected to the locale system
web/theme.cssTheme overrides for the packaged interface
bridge/**Framework, inventory, screenshot, and notification integrations
shared/**Shared helpers
client/main.luaClient hooks for opening the UI and starting actions
server/main.luaServer hooks for access and report lifecycle behavior
server/exports.luaPublic export wrappers

These paths are listed as editable in the resource's escrow configuration. Public export signatures are integration contracts: preserve them when customizing behavior. See Exports and Events.

Categories ​

Each entry in Config.Categories has three fields:

FieldMeaning
keyPersistent database value; also used when creating reports through an export
labelText displayed to users
colorHex color in #rrggbb form

Use unique, stable keys. The database category column holds up to 32 characters. Renaming a key does not rename the category on existing reports.

lua
Config.Categories = {
    { key = 'player_report', label = 'Player Report', color = '#c4b5fd' },
    { key = 'bug_report', label = 'Bug Report', color = '#fdba74' },
    { key = 'other', label = 'Other', color = '#a1a1a1' },
}

An integration should send category = 'player_report', not category = 'player'.

The form submits the configured key independently of its displayed label. For example, key = 'support' with label = 'Pedido de ajuda' submits support. Restart the resource after configuration changes so clients receive the updated categories.

Report limits ​

Config.Reports controls creation cooldown, maximum active reports authored by each identity, and subject/description lengths. A value of 0 disables the creation cooldown or active-report limit respectively.

The default subject maximum is 30; the database subject column holds up to 64 characters. Subject and description limits count Unicode code points, preserving accents and emoji. Overlong input is rejected with an error instead of silently truncated. The server caps configured limits at 64 for subjects and 16000 for descriptions to fit the supplied schema.

Language files ​

  1. Copy the complete locales/en.json to a new file, for example locales/pt.json.
  2. Translate the string values while keeping the same keys and nested structure.
  3. Preserve placeholders such as %s and {count} in the strings that contain them.
  4. Set Config.Locale = 'pt' without a file extension.
  5. Restart the resource and check the translated messages in game.

For example, change the existing value of errors.cooldown to Aguarda antes de enviar outro report. in your copied JSON file. JSON strings use double quotes and entries must not have trailing commas.

The NUI receives the locale through bootstrap. Menus, controls, placeholders, errors, notification labels, and timeline templates use the locale. Additional interface strings are under ui.texts, and server-generated templates under server.texts. Missing keys fall back to English. Start from the current complete English file when adding a language. User messages, names, stored notes, and existing stored system text are not automatically translated; database-formatted date labels retain their server format.

Category labels and key descriptions are configured separately in Config.Categories and Config.UI.

Interface theme ​

Edit the existing rules and overrides in web/theme.css to customize the packaged interface. Keep the supplied selectors and variable names, and check contrast for text, borders, buttons, and category badges in game after changing colors.

When working with the separate Reports frontend source, the initial theme source is Reports/public/theme.css. The NUI copy script preserves an existing leno_reports/web/theme.css while replacing generated assets. Keep a backup of custom themes. Direct edits to generated JavaScript/CSS bundles will be overwritten by subsequent builds.

Layout changes require the frontend source. Interface translations can be edited in the locale files without rebuilding the NUI.

Commands and notifications ​

Change Config.UI.playerCommand, staffCommand, and their key settings for the menus. Config.StaffNotify.openKey controls the last-report notification shortcut. See Commands and the User Guide.

Select Config.Notify explicitly: default, ox_lib, okokNotify, qb, esx, or custom. Start the selected external resource before LenoReports.

StaffNotify.durationMs controls built-in toast duration and is forwarded to external notification adapters. Enable StaffNotify.notifyOnClaim to notify other eligible staff when a ticket is claimed. Enable Discord.events.playerMessage and staffMessage for report chat logs; these also require enabled Discord logging and the server-only logs webhook.

For a custom notification system, implement the adapter under bridge/notify/custom. The generic client hook is Bridge.Notify(message, type, duration, title); Bridge.StaffNotify(payload) can handle the richer staff-notification fields when needed.

Inventory bridges ​

Inventory integration supplies the captured item list for report investigations. Select a supported bridge with Config.Inventory; see Dependencies.

For a custom adapter, select Config.Inventory = 'custom' and implement InvBridge.GetInventory(source) in bridge/inventory/custom/server.lua. The supplied custom stub does not already implement this full-inventory read.

Return a flat table of item entries. Supported item fields include name (or item), label, count (or amount / quantity), and optional metadata (or info). Unwrap containers such as inventory.items in your adapter before returning them.

Example return shape for an adapter, using illustrative items:

lua
return {
    { name = 'water', label = 'Water', count = 2 },
    { name = 'sandwich', label = 'Sandwich', count = 1 },
}

The staff interface receives item labels and counts. The CodeM adapter reads GetInventory(identifier, source); Tgiann reads GetPlayerItems(source). Both normalize the full item list for snapshots. Verify recognizable items on the author and an involved player with your installed inventory version; API contract tests do not establish compatibility with every release.

Permissions and hooks ​

Use the existing hooks in server/main.lua for server-side access rules and lifecycle behavior. ReportsHooks.IsStaff controls staff privileges; CanOpenStaff and CanOpenPlayer control menu access. If creation must be blocked, enforce that rule through CanCreateReport as well. Blocking a menu is not a replacement for a creation rule.

Client hooks in client/main.lua customize user interactions, such as opening the menu or starting a screenshot. They are not a security boundary. Other resources should use the documented exports and server-local lifecycle events instead of internal network events.

See Exports and Events for hook signatures and examples, including the current CloseReport restriction on custom notes.