Skip to content

Exports & integration ​

All qualification exports are server-side. They return only the caller-facing record state; resources should still validate their own job capability and action context.

Export Use
hasQualification(src, typeKey, class?) Check that the player's certificate is currently usable. Returns boolean, reason?; use this at the point of action.
getQualifications(src) List a player's qualification summaries, including status and expiry.
hasValidDocument(src, typeKey) Legacy-compatible document query used by np_fishing, np_flightradar, np_vending, np_shops and other existing scripts.
getDocuments(srcOrCitizenId) Read active document summaries, including offline characters by citizen id.
issueDocument(src, typeKey, inputs?, opts?) Issue through the same validation, requirements, payment and audit path as the in-game flows.
setStatus(serial, status, reason?, untilDays?) Change a document status and apply dependent qualification cascades.
getDutyHours(citizenid, jobs?) / addDutyTime(citizenid, job, seconds) Read or add qualification duty-time progress.
setWarrantProvider(fn) Connect the police document check to an MDT/warrant resource.

The old exports.np_identification:* namespace and np_identification:* server events remain supported. The new namespace is exports.np_documents:* and np_documents:*. Export signatures are documented in the resource's docs/ARCHITECTURE.md.

Inventory ​

With Config.Inventory = 'auto', np_documents uses np_inventory when started, then the available ox_inventory, qb-inventory/ps-inventory/lj-inventory or framework bridge. np_inventory cards use item metadata containing the document serial; its standard AddItem, RemoveItem, GetItemCount and item-registration APIs are used. When no metadata-capable inventory is present, set Config.RequireItem = false or Config.Inventory = 'none' to keep certificates digital-only.

np_jobs ​

The optional integration registers the cert requirement provider when np_jobs exposes registerRequirementProvider, and asks pack-owned features to authorize document actions. np_documents remains a normal resource: it does not register a feature pack or claim feature IDs.

Action Feature IDs Scope
Issue documents legal.licence_issue, cert.issue types, actions, and certificate IDs from the feature config
Check / request ID police.mdt The feature must include the people section
Add points police.citations Document type rules still apply
Suspend / reinstate legal.licence_issue, cert.revoke Feature config scopes permitted types/actions
Revoke certification cert.revoke Type-level rules still apply
Seize police.seize Police evidence action

A live feature denial is authoritative. If np_jobs or every mapped feature is unavailable/unknown, the current job, grade, and duty checks remain in effect. Existing document exports and both np_documents / np_identification namespaces continue to work. See the np_jobs resource integration guide for fallback behavior and the pack matrix.

The documents requirement accepts a certificate type, a list of required types, or an any list. This lets a job feature require, for example, pilot_license or paramedic_certificate without embedding certification logic in the job pack.

Pack-facing APIs include getDocument, validateDocument, revokeDocument, and owner-tracked registerDocumentType / unregisterDocumentType. The historic setWarrantProvider remains available as a resource-scoped compatibility alias; named warrant providers can be composed without displacing np_prison.

Other np_* resources ​

  • np_faction: issuer, instructor, examiner, revoker and rank checks can use held jobs and grades; shift-end events supply duty totals.
  • np_minigames: optional skill steps for practical exams.
  • np_phone: document wallet and the player-facing Certs career-path app.
  • np_flightradar, np_fishing, np_vending, np_shops and np_police: existing integrations continue through the legacy np_identification alias until they migrate.

Migration from np_identification ​

See Migration for the resource folder, dependency, export and permission changes.