Installation ​
Requirements ​
- A recent FiveM server artifact (Lua 5.4)
- oxmysql
- np_npchandler 1.1.0+: the desk and forger NPCs and their interact option
- np_prophandler: the card and badge prop in the hand
np_npchandler and np_prophandler must start before np_identification.
- Node 18+ to build the NUI once
Optional, auto-detected at start:
| Kind | Resources | Used for |
|---|---|---|
| Framework | qbx_core, qb-core, es_extended | Character data, jobs, money, admin groups. Without one, np_identification runs standalone: no money (every price is 0), no jobs |
| Inventory | ox_inventory, qb-inventory (and the ps-inventory / lj-inventory forks) |
Physical cards with item metadata. Without one of these (or on the default ESX inventory) every document is digital |
| Photos | screenshot-basic or MugShotBase64 |
screenshot-basic: in-world mugshot camera at the desk, and card photos for the phone gallery. MugShotBase64: ped headshot as the passport photo |
| Target | ox_target, qb-target |
The police Ausweis verlangen option on players. The desk and forger NPCs show their option through np_npchandler (np_hud prompt, ox_target or qb-target) |
| UI | np_hud, np_phone | np_hud: notifications and prompts. np_phone: the Dokumente wallet app, expiry reminders and photo evidence |
| Staff | np_admin | Permissions, settings, audit log forwarding and staff tools. See Permissions |
Steps ​
- Put the resource in
resources/asnp_identification. The NUI callbacks usehttps://np_identification/…, so keep the name. - Build the NUI:shThis creates
cd web && npm ci && npm run buildweb/distwith two entries:index.html(the game UI, loaded as theui_page) andphone.html(the np_phone app). - Start it after its dependencies. The bridges are picked once, at start:cfg
ensure oxmysql ensure np_prophandler ensure np_npchandler ensure qbx_core # or qb-core / es_extended (optional) ensure ox_inventory # or qb-inventory (optional) ensure screenshot-basic # optional, mugshot photos ensure ox_target # optional, or qb-target ensure np_hud # optional ensure np_phone # optional ensure np_payments # optional, checkout for fees ensure np_admin # optional: permissions, settings, logs, staff tools ensure np_identification - Database: nothing to do. The
ident_*tables are created on start (CREATE TABLE IF NOT EXISTS).sql/install.sqlhas the same schema if you prefer to import it yourself. See Bridges → Tables. - Add the inventory items (one per document type, plus the UV lamp).
- Give your staff the designer: grant the node
np_identification.adminto their group in np_admin. Without np_admin, see the fallback under Permissions. No ACE lines are needed. - Optional: a Discord webhook for the audit log. Use
set, notsetr, so clients never see it:cfgThe convar wins overset np_identification_webhook "https://discord.com/api/webhooks/…"Config.Log.webhook. Onlyhttps://URLs are used.
Test it
Join, walk to the Bürgerbüro Los Santos desk (the pink blip near the city hall) and apply for a Personalausweis.
Then press F6 to open the picker and look at your card with F. As an admin, /iddesigner opens the designer.
Items ​
Every document type has one inventory item (TypeDef.item; for the built-in types it is the type key). The item
only carries the serial in its metadata. The database record behind the serial is what the card shows, so a revoked
licence shows as revoked while the player still holds the card.
Items are only handed out when Config.RequireItem is on and the inventory supports item metadata (ox_inventory,
qb-inventory and its forks). Otherwise every document is digital (picker and phone app).
| Item | Label | Item | Label | |
|---|---|---|---|---|
id_card |
Personalausweis | firstaid_license |
Erst-Helfer-Schein | |
driver_license |
Führerschein | hunting_license |
Jagdschein | |
weapon_license |
Waffenschein | pilot_license |
Pilotenlizenz | |
taxi_license |
P-Schein | boat_license |
Bootsführerschein | |
lawyer_license |
Anwaltslizenz | business_license |
Gewerbeschein | |
btm_license |
BTM-Schein | press_pass |
Presseausweis | |
service_id |
Dienstausweis | medical_license |
Approbation | |
uv_lamp |
UV-Lampe: not a document. Holding it unlocks U in the viewer |
Document types you create in the designer need an item entry too, with the same pattern. The item name is shown in the
designer's Item & Gültigkeit box. Item images are not shipped: put your own PNGs into the inventory's image folder.
ox_inventory ​
Add to ox_inventory/data/items.lua. server.export makes ox call np_identification when the card is used (it opens
the viewer), and consume = 0 keeps the card. ox shows the metadata label / description (holder and expiry) in
the tooltip.
['id_card'] = {
label = 'Personalausweis',
weight = 10,
stack = false,
close = true,
consume = 0,
server = { export = 'np_identification.id_card' },
},
['driver_license'] = {
label = 'Führerschein',
weight = 10,
stack = false,
close = true,
consume = 0,
server = { export = 'np_identification.driver_license' },
},
-- … the same block for weapon_license, taxi_license, lawyer_license, btm_license, service_id,
-- firstaid_license, hunting_license, pilot_license, boat_license, business_license, press_pass,
-- medical_license (label from the table above, export = 'np_identification.<item>')
['uv_lamp'] = {
label = 'UV-Lampe',
weight = 250,
stack = true,
close = true,
description = 'Macht die UV-Merkmale echter Dokumente sichtbar.',
},
The resource repo has the full list for copy and paste in
docs/items.md.
qb-core / qbx_core ​
qbx_core uses ox_inventory, so use the ox snippet above. For qb-core, add to qb-core/shared/items.lua.
unique = true keeps every card in its own slot (the metadata differs per card). np_identification registers the
usable handler itself (QBCore.Functions.CreateUseableItem).
id_card = { name = 'id_card', label = 'Personalausweis', weight = 10, type = 'item', image = 'id_card.png', unique = true, useable = true, shouldClose = true, description = '' },
driver_license = { name = 'driver_license', label = 'Führerschein', weight = 10, type = 'item', image = 'driver_license.png', unique = true, useable = true, shouldClose = true, description = '' },
-- … the same line for every other document item
uv_lamp = { name = 'uv_lamp', label = 'UV-Lampe', weight = 250, type = 'item', image = 'uv_lamp.png', unique = false, useable = false, shouldClose = true, description = 'Macht die UV-Merkmale echter Dokumente sichtbar.' },
qb-core ships its own id_card and driver_license
Replace those two entries with the ones above, and remove what hands them out or uses them elsewhere:
- Starter items on character creation (
qb-multicharacter/ the qb-core starter items config). Those cards have no serial and are ignored by np_identification. Issue starter documents withexports.np_identification:issueDocument(src, 'id_card', {}, { free = true })instead. - Other usable handlers for
id_card/driver_license(for example inqb-smallresourcesor an olderqb-cityhall) and the City Hall ID handout ofqb-cityhall. The desks of np_identification replace them.
ESX ​
The default ESX inventory has no item metadata, so np_identification never hands out cards there (a warning is
printed at start when Config.RequireItem is on). Documents live in the database and are shown from the picker
(/ausweis) and the phone app. If you add the items anyway (items table: name, label, weight), using one opens
the holder's newest document of that type. For physical cards on ESX, run ox_inventory.
Permissions ​
np_identification uses no ACE. Its node is managed in np_admin (grant it to a group or a
single player; wildcards like np_identification.* work):
| Node | Grants |
|---|---|
np_identification.admin |
/iddesigner, every designer and desk RPC, the full audit log, the staff tools, and admin overrides on all police and clerk checks |
Without np_admin running, admins are:
- the server console;
- identifiers in the convar
np_admin_fallback, e.g.set np_admin_fallback "license:abc…,discord:123…"; - on ESX, the groups in
np_admin_fallback_groups(defaultadmin,superadmin); - the framework's own admins: the qbx / qb
adminpermission (qb alsogod), ESX groupsadminandsuperadmin. Standalone has no framework admins.
While np_admin runs, only the node counts. See Concepts → Permissions.
Police and clerk permissions come from jobs, not nodes: see Police and Showing & issuing → Player clerks.
Troubleshooting ​
| Symptom | Fix |
|---|---|
| Blank UI, nothing opens | web/dist is missing. Build the NUI |
| Documents are issued but no card appears in the inventory | The item is missing from the inventory's item list, or the inventory has no metadata (ESX default). Check the console for the inventory bridge line |
[np_identification] framework bridge "…" selected but resource "…" is … |
Config.Framework (or Inventory) names a resource that is not started. Fix the start order or set it to 'auto' |
Prices are all 0 and jobs are empty |
The framework started after np_identification, so the standalone bridge was picked. Fix the start order |
| The old qb-core ID card still shows up | See the qb-core warning above: remove the starter items and other id_card handlers |
| Desk NPCs stand there without an option | np_npchandler found no provider: start np_hud, ox_target or qb-target, or set np_npchandler's interaction.fallback = true |
| Desk photo stays empty | Config.Photo.method = 'screenshot' needs screenshot-basic, 'mugshotbase64' needs MugShotBase64. Or set 'none' for a silhouette |
C (photo) is missing in the viewer |
Photo evidence needs both screenshot-basic and np_phone |
/iddesigner says "no permission" |
Grant the np_identification.admin node to your group in np_admin. Without np_admin, add your identifier to np_admin_fallback (Permissions) |
| Images in the designer are rejected | The host is not in Config.ImageHosts, or the URL isn't https:// |