Events & commands ​
Server events ​
server
Local server events (AddEventHandler), fired with TriggerEvent after the server did the work:
| Event | Arguments | Fired when |
|---|---|---|
np_identification:issued |
src, serial, typeKey |
A new document was issued: desk, clerk or the issueDocument export (not for replacements of lost documents) |
np_identification:statusChanged |
serial, status |
Status set by police, the owner (lost), an export, points, or a suspension that ended ('valid') |
np_identification:shown |
src, target, serial |
src showed a document to target (picker, phone, or an accepted ID request) |
np_identification:typesPublished |
key, version |
A type was published or rolled back in the designer |
AddEventHandler('np_identification:statusChanged', function(serial, status)
if status == 'revoked' then print(('document %s revoked'):format(serial)) end
end)
AddEventHandler('np_identification:issued', function(src, serial, typeKey)
if typeKey == 'weapon_license' then TriggerClientEvent('my_gunstore:unlocked', src) end
end)
Net events ​
These are internal between np_identification's client and server. Listed so you know what they are; don't trigger or listen to them from other resources.
| Direction | Event | Payload | Purpose |
|---|---|---|---|
| client → server | np_identification:rpc |
reqId, method, params |
Every RPC (latent for the photo methods desk.submit, issue.submit, forger.buy) |
| client → server | np_identification:ready |
– | Client loaded, asks for the init payload (one retry after 8 s) |
| server → client | np_identification:rpcResult |
reqId, ok, dataOrError |
RPC answer |
| server → client | np_identification:init |
init payload + desks | Types, config, player info, desk list |
| server → client | np_identification:types |
TypeDef[] |
After a publish, rollback or delete (also bumps GlobalState['ident:typesVersion']) |
| server → client | np_identification:desks |
desk list | After a desk was placed or deleted in the designer |
| server → client | np_identification:nui |
action, data |
Server-pushed NUI messages (viewer, badge, request toast, …) |
| server → client | np_identification:notify |
{ type, title, message, icon? } |
Notification |
| server → client | np_identification:openDesigner |
– | Opens the designer (np_admin staff tool Document designer) |
Client events ​
np_identification fires no client events for other resources. Use the server events above.
Commands and keys ​
| Command | Default key | Who | What |
|---|---|---|---|
/ausweis |
F6 | Everybody | Document picker. See Showing & issuing → Picker |
/badge |
unbound | Jobs in Config.Badges |
Flash the badge. See Badges |
/lizenz |
– | Jobs in a type's rules.issuers, admins |
Clerk issue panel. See Player clerks |
/ausweispruefung |
– | On-duty police, admins | Check the nearest player's document. See Document check |
/iddesigner |
– | Admins | Document designer. See Designer |
+np_ident_accept |
Y | Everybody | Accept a police ID request |
np_ident_decline |
N | Everybody | Refuse a police ID request |
The command names come from Config.Commands, the default keys from Config.Keys. Players rebind them under
Settings → Key Bindings → FiveM (Dokumente: Ausweis-Auswahl, Dokumente: Ausweis-Anfrage annehmen,
Dokumente: Ausweis-Anfrage ablehnen). The badge gets a key mapping (Dokumente: Dienstmarke zeigen) only when
Config.Keys.badge is set; otherwise players bind /badge themselves with bind keyboard <key> badge.
np_admin staff tools ​
With np_admin running, two actions appear under Resource tools (quick menu, panel and
palette). Both need the node np_identification.admin.
| Action | Label | Target | What |
|---|---|---|---|
np_identification.designer |
Document designer | – | Opens the designer for the staff member |
np_identification.documents |
Player documents | Player | Lists the documents of the player's current character |
Keys inside the UI ​
| View | Keys |
|---|---|
| Picker | ↑ / ↓ select, E show, G hand over, F look yourself, TAB next target, ESC close |
| Viewer | F flip, right mouse tilt, U UV lamp, C photo, mouse wheel / + − zoom, ESC close |
| Desk | 1 / 2 / 3 camera angle, SPACE take photo, ENTER next, ESC close |
| Police check | F flip, P points, S suspend, E seize, R revoke, ESC close |
| Forger | 1 / 2 / 3 quality, C take photo, ENTER buy, ESC close |
| Designer | Ctrl+Z / Ctrl+Shift+Z undo / redo, Ctrl+D duplicate, Del delete, arrow keys nudge (Shift 10 px), ESC close |