Skip to main content

How it works

The document is the identity

A lookup returns the identity printed on the document. The script never checks who carries it: a stolen real document works until its owner reports it.

Only the server knows what is real

Real serials live in the register (jksm_identity_documents), forged serials in jksm_identity_forgeries with their quality. A real and a forged item carry exactly the same metadata.

Facts, not force

Expiry, suspensions and old photos are shown on the card and in the register check. Nothing is removed, blocked or renewed automatically: what follows is roleplay.

The framework holds the licences

ESX: the esx_license tables (licenses, user_licenses). QBCore/Qbox: the character metadata licences.
Anonymity: the photo is taken from a local, non-networked clone of the character, with mask, hat and glasses removed. Nobody nearby sees the face, and the photo shows no mask.

Document types

Document types are configured in Config.Documents (config/documents.lua). There are three kinds: Each entry has these fields:

Licence classes

One document can cover several licence types as classes:
The card prints the classes held when it was issued. The register check shows the classes held now and names every printed class that was revoked.

Add your own document

Any licence in your framework can become a document. Add the item to your inventory, then one entry here:

Item metadata

Every document carries the same fields: serial, firstname, lastname, dob, sex, issued, expires, photo, and classes for licence classes. photo is only a photo ID: the image lives in the jksm_identity_photos table.

Register statuses

Every real document has a status in the register: A new document always replaces the old one: the older valid document of that type is marked replaced.

The register check

The register check is what an authority sees. It reports:
  • No record: the serial is unknown, and whether a person with the printed name exists at all
  • Status: lost, stolen, seized, suspended, replaced or revoked
  • Expired: the expiry date has passed
  • Licence missing / class revoked: the licence, or one of the printed classes, is no longer held
  • Left job: the badge owner no longer has that job
  • Data mismatch: the printed name or date of birth differs from the register
It never reveals who made a forgery or its quality. Admins see that with /documents truth <serial>.

Using and showing a document

Config.UseAction decides what using a document item does: Documents are shown only to players in the same instance. Shown from a distance only coarse flaws are visible, in hand you get the close look.

Forged documents and flaws

A forged card shows flaws on three levels. How many depends on its quality: The UV level shows while the viewer carries the UV lamp item (Config.UvItem, default uv_lamp). A good forgery can pass every visual check and only fail in the register.
A document made by a jaksam shop or an admin give is registered (real), unless its jaksam rarity is listed in Config.UnregisteredRarities. Then it becomes an unregistered forgery with the quality Config.UnregisteredQuality.