For the complete documentation index, see llms.txt. This page is also available as Markdown.

Configuration

Page dedicated to how to configure our DOJ MDT [V2]

Everything below lives in config/config.lua, which stays open after escrow. The file is split into the same sections as this page. After changing it, restart the resource and run /mdt doctor to check the result.

Languages

The default language of the tablet is set in Config.NUI.defaultLangCode. Every player can switch it in the tablet's own settings.

  • en-US: English

  • pl-PL: Polish

  • de-DE: German

  • fr-FR: French

  • es-ES: Spanish

  • it-IT: Italian

  • pt-BR: Portuguese

  • ja-JP: Japanese

  • ko-KR: Korean

Config.NUI = {
    defaultLangCode = "en-US",
    -- Languages offered in the tablet's language switcher.
    langs = {
        { code = "en-US", name = "English", iconUrl = "./img/flags/gb.svg" },
        { code = "pl-PL", name = "Polski",  iconUrl = "./img/flags/pl.svg" },
        -- ...
    },
}

The translation files are in config/translations/ and stay editable after escrow.

Commands & Keybinds

Every key is a FiveM key binding, so players can change it under Settings > Key Bindings > FiveM. An empty key registers the binding unassigned.

General

  • /qf_mdt_doj_v2 (DELETE): Open the tablet.

  • /qf_mdt_doj_v2badge (B): Show your court ID to the people around you.

  • /docsettings: Set where shown documents appear on your screen, with scale and opacity.

Requests board

  • /qf_mdt_doj_v2_alert_accept (Z): Accept the latest request on screen.

  • /qf_mdt_doj_v2_alert_dismiss (O): Dismiss the latest request on screen.

  • /qf_mdt_doj_v2_alert_expand (J): Expand the latest request on screen.

  • /qf_mdt_doj_v2_alert_gps (unassigned): Set the GPS to the latest request.

  • /qf_mdt_doj_v2_dispatch (unassigned): Open the tablet straight on the requests board.

  • /dojlocation: Staff report their position to colleagues.

Citizens

  • /914 <text>: Ask for counsel.

  • /papers: Ask the nearest player to show a document (court staff and the jobs in Config.Identity.inspect.jobs).

Camera Mode

  • /qf_mdt_doj_v2_blocknuifocus (L-ALT): Free the cursor while using the tablet camera.

  • /qf_mdt_doj_v2_capturephoto (ENTER): Take the photo.

Admin

  • /mdt doctor: Configuration check. Needs the qf_mdt_doj_v2.doctor ace.

  • /identity issue | revoke | check | points: Identity document tools for the console or an admin. Needs the qf_mdt_doj_v2.identity ace.

Both the keys and the command names come from Config.ToggleMDT, Config.Badge.show, Config.Camera, Config.Dispatch and Config.Identity in config/config.lua. The names above are the defaults.


General

Config.Frameworks detects ESX, QBCore and QBox on start. Change it only if your framework runs under another resource name.

Running several tablets side by side (Config.Base)

Every module stores its data in its own table named after the resource (qf_mdt_doj_v2_*). Config.Base lets you point a module at another table, so a second courthouse tablet can share selected data while keeping its own staff, announcements and logs.


Jobs & Permissions

Config.Jobs decides which framework jobs may open the tablet. With a single job set to true the tablet uses the settings of this file.

The id values must match the grade numbers of the job in your framework.

Several offices on one tablet

Give a job a table instead of true to make it a separate office with its own name, colour, ranks, society account and court ID look. A typical setup is the bench, the prosecution and the defence:

Field
Description

primary

The main office. Set it on exactly one job.

enabled

false removes access without deleting the entry.

fractionName / fractionFullName

Short name in the sidebar and full name on the court ID.

title

Tablet title under the short name.

color / primaryColor

Accent as { r, g, b }, or as HSL when it has to differ.

logo

Office emblem: a file in artwork/ or an https address.

badge

Own court ID look, any field of Config.Badge.template.

letterhead

Heading of this office's papers: { name, logo, seal, city }.

grades

Own ranks. A rank may add badgeTitle, printed above the name on its court ID.

requiredGrades

Own permission thresholds over Config.NUI.requiredGrades.

society, officers, billingLimits

Own versions of the global options of the same name.

stations

Own buildings on the map, same shape as Config.Map.Courthouses.

sharedWith

Other jobs this one sees in the staff list, on the map and on the requests board.

Config.PerJobData decides which modules keep separate data per office (announcements, radio codes, gallery, audit log, requests board). Cases, warrants, verdicts and hearings are always shared.

Staff management

Permissions per action

Config.NUI.requiredGrades sets the lowest grade for every action in the tablet. Every check is made on the server, not only hidden in the interface.

With the default ladder this means:

Grade
Name
Can typically

0

Intern

read the docket and the penal code

1

Clerk

open cases, add notes, request warrants

2

Attorney

manage charges, change case status, schedule hearings

3

Senior Attorney

assign roles, post court notices, manage radio codes

4

Judge

decide warrants, deliver and vacate verdicts, manage staff and the penal code


Tablet & Interface

Other useful options:

Option
Description

Config.Mugshot

autoTake, size and uploadType (localfiles or fivemanage).

Config.Limits

Longest text accepted for notes, case descriptions, verdicts and photos, checked on the server.

Config.Basics.primaryColor

Accent used when neither the office nor Config.NUI sets one.

Config.Camera

Keys of the in-game camera used for gallery photos.

For uploadType = "fivemanage" put the key in server.cfg, not in the config: set qf_mdt_mugshot_fivemanage_api_key "your key".


Money

Fines paid at the e-office and identity document fees are paid into this account. Only the primary office uses Config.Society; any other office pays into society_<job> unless it sets its own society.

Config.Billings and Config.Banks list the supported billing and banking resources. Turn on at most one entry in Config.Billings to send fees from the citizen file through your billing resource. With all of them off, the amount is taken from the citizen's bank and paid into Config.Society.

Court fees

Config.FineList holds the court fees and honoraria charged from the citizen file. Criminal fines come from the penal code through a verdict, not from this list.

Config.BillingLimits sets how close the citizen must be, the cooldown between two fees and the highest total per grade.


Items & Showing

Court ID (Config.Badge)

Office logos and card backgrounds go into the artwork/ folder next to fxmanifest.lua. Drop the file in, name it in the config without the folder ("da.webp") and restart the resource. Nothing has to be rebuilt.


Citizen File

Config.Licenses picks where licences are stored (esx_license, qb_license, bcs_license or cs_license). Config.CitizenLicenses lists the licences shown in the citizen file and the grades that may grant or revoke them.


Court

Cases (Config.Docket)

A status with closing = true counts as finished: the case drops out of the default filter and can no longer get a verdict.

Penal code (Config.PenalCode)

The seed is imported once, into an empty table on the first start. After that the penal code is edited in the tablet and changes in the config have no effect.

Warrants, hearings and evidence

Config.Dashboard sets what the first screen counts: expiring documents, upcoming hearings and stalled cases. Config.DefaultRadioCodes are created once on the first start and edited in the tablet afterwards.

Court papers (Config.Documents)

Verdicts, approved warrants and summonses can be printed as papers with a letterhead, the judge's drawn signature and a code anyone can check in the tablet.

Papers from templates

Config.Documents.templates lists papers officials write by hand. Five ship with the script: court order, criminal record certificate, power of attorney, witness summons and bail order. Add your own with a key, a name and fields:

Field types are text (multiline, max), date (time), person (from the citizen register) and amount (max). builder = "criminal_record" prints the convictions that stand, read by the server from the court register. A broken entry is left out and /mdt doctor names the field to fix.


Citizen E-Office (Config.Portal)

A clerk at the courthouse counter where players without the DOJ job read their own papers, cases and hearing dates, pay their fines and ask for counsel.


Identity Documents (Config.Identity)

ID cards, driving licences, weapon permits and residence cards, issued by the office with a photo and a term of validity. The document grants and removes the matching framework licence.

Option
Description

kinds[kind].approval

"clerk" queues the application for an official, "auto" issues it as soon as the fee is paid.

kinds[kind].issuers

Offices that issue it, each with its lowest rank: { doj = 2, prokurator = 3 }. Without it, minGrade.

kinds[kind].template

Look of the card: layout ("card", "badge" or "paper"), accent and your own background.

applications

Default approval, pickupDays, refunds, cooldown and appeals against a refusal.

points

Penalty points from verdicts and police charges. Reaching suspendAt suspends the driving licence.

studio

The photo booth: photographer location, private routing bucket and photo validity.

photoFallback

"mugshot" or "none", used when the booth is off or screenshot-basic is missing.

inspect

Who may ask a player for their papers (jobs, commandName) and whether they may seize them.

forgery

Forged papers. Off by default and needs at least one location.

transition

For servers adding the module later: until endsAt, current licence holders collect their card for free.

items

Cards as inventory items, one item per document.

retention

Days before closed applications, old documents and expired points are deleted. 0 keeps them forever.

Your own documents

A hunting licence, a press card or a bar card is a new entry in Config.Identity.kinds. The key is the document's name in the database, so pick it once.

Add its item under Config.Identity.items if documents are items on your server. Nothing has to be rebuilt: the tablet and the e-office get the list from the server.

Putting it on your server

  1. Set the photographer's desk in Config.Identity.studio.locations[1].coords and the spot where the picture is taken in studio (both vector4).

  2. Make sure screenshot-basic is running, otherwise the booth does not open and cards carry the stored mugshot.

  3. Put the jobs that check papers at the roadside in Config.Identity.inspect.jobs (default police and sheriff).

  4. Decide who approves what with approval, issuers and minGrade of each document.

  5. Optional: add the items from ox_inventory_items.md and turn on Config.Identity.items.


Police MDT Bridge (Config.PoliceBridge)

When our Police MDT [V2] runs on the same server, charges filed there open a case on the DOJ docket automatically. The bridge is one way and read only: it never writes to a police table and never calls a police export.

Without the police resource the bridge stays off and the tablet works on its own.


QF Banking V2 Billing (Config.Integrations)

The tablet can use the billing of our Banking [V2] as the place where its court tariff lives and where its bills are issued and paid. It is off by default; without it nothing changes.

  1. In the bank: Admin → Billing → Service tablets, switch on doj, pick its billing faction (your court job, allowed to fine) and set the resource name to qf_mdt_doj_v2. On the first switch-on the bank copies the penal code into the faction's tariff.

  2. In config/config.lua:

While both are on:

  • the penal code is the bank tariff. Adding, editing and deleting offences in the tablet writes to the bank (the bank checks the faction's tariff grade); qf_mdt_doj_v2_penal_code is kept as a copy. Offences without a fine stay in the MDT only, and a fine range starting at 0 is stored in the bank from 1,

  • court fees in the citizen file come from the rest of the bank tariff. Config.FineList is added to it once; custom charges are not available,

  • verdict fines and fees become bank bills (Config.Billings is not used for them). The citizen pays a verdict fine at the e-office, where the bank takes it from their account, or at any bank. Verdicts are marked paid when the bank reports it, and bills paid or canceled while the MDT was stopped are caught up on start,

  • deleting fees or vacating a verdict cancels its open bank bill. Who may do it is checked by the MDT's own grades.

If the bank is stopped or the tablet is switched off there, the MDT goes back to its own list and Config.Billings. Every bank call is protected, so a bank restart never breaks the tablet.

Map & Dispatch

Live map (Config.Map)

Requests board (Config.Dispatch)

The DOJ dispatch handles requests for counsel, not patrols. Citizens raise them with /914, staff with /dojlocation or from the tablet.

QF tablets use /911 police, /912 ambulance, /913 mechanic and /914 DOJ. A command belongs to one tablet only, and clashes with the tablets in SiblingMDTs are printed on start.

Last updated