np_legal v0.2.0 ​
A server-authoritative legal system for FiveM roleplay. Cases connect courtroom sessions, warrants, signed documents, bail, licences, notarial transfers and appeals in one timeline. It is also an np_jobs capability pack: jobs compose small features from this and other resources, with permission nodes and config schemas. The runtime does not hardcode job names.

| Warrant review | Notarial transfer |
|---|---|
![]() |
![]() |
Capabilities ​
| Feature id | Permission node | What it enables |
|---|---|---|
legal.judge |
feature.legal.judge |
Court sessions, gavel and phase flow, testimony, supported rulings and sentence effects |
legal.represent |
feature.legal.represent |
Retainers, case representation, file access and lawyer visit requests |
legal.prosecute |
feature.legal.prosecute |
Pleas, charge drops and warrant review |
legal.warrant_sign |
feature.legal.warrant_sign |
Approve, deny and revoke provider requests; ambiguous provider outcomes require reconciliation |
legal.bail |
feature.legal.bail |
Set case-linked bail, post bonds, resolve or recover bonds |
legal.notary |
feature.legal.notary |
Signature-gated vehicle title transfers; property transfers require a registered provider with a verified np_housing API |
legal.licence_issue |
feature.legal.licence_issue |
Issue, renew, replace or change ID/licence status through np_identification |
legal.records |
feature.legal.records |
Appeals, sealing, expungement and registered records providers |
A job can compose multiple features. Example compositions:
- Judge:
legal.judge - Defence attorney:
legal.represent - District attorney:
legal.prosecute+legal.warrant_sign - Notary:
legal.notary - DMV clerk:
legal.licence_issue - Bail bondsman:
legal.bail
The full config schemas, permission map, service contract and backlog are in IDEAS.md.
Case and court flow ​
- Create or import a case with parties, source references and evidence attachments.
- Schedule a court session. The server stores the assigned judge and checks that assignment before session actions and rulings.
- Record testimony, exhibits and a verdict in the append-only timeline.
- Issue supported effects. The case is atomically claimed while effects run. Partial or interrupted effects stay attached to the same ruling for administrative reconciliation, preventing a second sentence from being issued concurrently.
- Sign documents from the case record, np_inventory item or Legal app in np_phone.
Rulings that affect a licence must name a defendant/suspect/accused party and a serial that np_identification confirms belongs to that subject. Appeals must be filed by a case party and proceed through another court session.
Integrations and compatibility ​
| Resource | Current connection | Boundary |
|---|---|---|
| np_jobs | hasFeature(src, id) authorization |
The host API and live permission configuration must be available on the server. |
| np_inventory | Registered legal document item | Registry records remain authoritative if item delivery is unavailable. |
| np_prison | Jail rulings and bail release | Lawyer visit booking, probation and community-service APIs are not exposed yet. |
| np_payments | Court invoices, charges and refunds | Configured court account must exist. |
| np_identification | Document issue, ownership checks, status and points | Serial ownership is checked server-side before case sanctions. |
| np_dealership | Prepared and committed vehicle title transfer provider | Vehicle transfers require a running compatible provider. |
| np_housing | No runtime ownership API in the current checkout | Property transfer requests fail with provider_unavailable unless a deployment registers a verified provider. |
| np_police | Warrant approval, denial, expiry and revocation mirror | Police records mirror legal decisions; provider failures remain visible for retry. |
| np_surveillance | Requests route to legal; a named provider mirrors approve/deny/revoke to surveillance warrants | Tap and tracker coverage follows signed local warrants and expiry; local decisions remain the fallback when legal is absent. |
| np_phone | Legal docket and party document signing | Access is restricted to case readers and document parties. |
| np_screens / np_press | Court recording hooks | Recording requires the relevant provider and configured channel. |
| np_faction | Courtroom place type | Optional; place restrictions are also enforced by feature config. |
The first target is ESX, np_inventory and oxmysql. QB/QBX identity lookup is included. There is no ACE authorization path;
np_admin handles administrative permission checks through the vendored lib/np_admin.lua.
np_jobs contract ​
np_legal registers eight granular feature IDs using np_addon and declares config schemas and feature.legal.* nodes.
Each operation authorizes on the server through np_jobs:hasFeature(src, id) when the host runs. It never infers access
from a job name. With np_jobs absent, the local fallback map is owner-managed and limited to framework job/grade checks;
it cannot reproduce faction rank, certifications or dynamic job composition. If the host exists but is unavailable,
actions fail closed.

