np_passwords
Codes, logins and a keychain for every lock on the server. A resource registers a lock and calls one export: np_passwords shows the PIN pad, login or 2FA prompt, offers the code the character already knows, checks it on the server and answers yes or no. The calling resource never sees a secret. Players keep their codes in a Passwords app in np_phone, and criminals have ways to get them.
- Version
- 0.1.0
- Frameworks
- ESX, qbx, qb, standalone
- Dependencies
- oxmysql, np_prophandler 1.1.0+
- Database
- Tables created on start
- Inventory
- np_inventory, ox_inventory, qb-inventory or none
- Optional
- np_hud, np_phone, np_gangs, np_menu, np_identification, np_character, np_admin
- Languages
- English, German
- Build
- Node 18+ to build the NUI once

Taken from the NUI in the browser at 1920×1080 with mock data and cropped to the prompt. The phones are put side by side from the app's screenshots.
What's in it
Every code is checked on the server. Other resources ask for an unlock and get yes or no, and the keychain is decrypted only on the server.
Prompts for any resource
- PIN, password, login, phrase, pattern and 2FA from one export,
Prompt. - A lock has an owner (character, job, gang or vault), coords, a door, tries and a lockout.
- Logins can check against your resource's own accounts with a verifier.
Keychain and autofill
- Use saved code on TAB, and a dropdown of saved and shared logins.
- Type a code by hand and an np_hud toast offers to save or update it (Y / N).
- Walk up to a lock you know and press E to open it with the saved code.
Create with a generator
- A generator for PINs, passwords, phrases and patterns, inside the caller's rules.
- Strength shown as time to crack: "a thief needs days", not a bar of colours.
Wrong codes and alerts
- Tries left after a wrong code, then a lockout with a countdown, per lock for everyone.
- The owner gets an alert on the phone, and lockouts can go to your dispatch.
Crime
- A
code_breakercracks codes in a minigame: a weak PIN takes seconds, a long phrase much longer. - Shoulder surfing (H), paper notes as items, leak warnings to the owner and a warrant that lets police read a keychain.
Passwords app
- An np_phone app: categories, nearby doors, hold to reveal, copy, share and write on a note.
- 2FA codes, a security check for leaked, weak and reused codes, recently deleted and streamer mode.
Doors, stashes and guests
- Doors with their lock state and auto relock, double doors and gates up to 8 parts as one door, np_inventory stash locks by id.
- Guest codes with a number of uses and an expiry, shared by QR code from the app.
Secrets stay on the server
- Lock codes are bcrypt hashes. Keychains and vaults are encrypted per character and per vault.
- Autofill sends an entry id, not a code. Secrets never reach other resources and are never logged.
A closer look
One export, six prompts
Register a lock once with RegisterLock, then call Prompt with its id. The prompt knows the type, the length, the tries and whether the character has the code saved.
| Type | What the player sees | Good for |
|---|---|---|
| pin | A keypad with the length as dots. Digits from the keyboard work too | Safes, doors, alarm panels |
| password | One field with show / hide | Wi-Fi, laptops, files |
| login | User name and password, with saved and shared logins in a dropdown | MDT, bank, email, any account your resource keeps |
| phrase | Words joined with dashes, typed as chips | Radio passphrases, gang meetings |
| pattern | A 3×3 grid to draw through | Phones, tablets, laptops |
| otp | A six-digit 2FA code, filled from the Codes tab or sent by SMS | Transfers, admin actions, logins with RequireCode |
A wrong code shows the tries left. After the last one the lock is locked for everyone for a while, and the owner gets an alert. Logins can be checked by your own resource with RegisterVerifier, so it keeps its accounts.
Creating and changing codes
Create opens the create sheet for the lock's owner or manager. The caller sets the rules, the player picks the type and the code.

- A generator for each type. R shuffles, and the result always meets the caller's rules.
- Strength as crack time: "1234" is guessed at once, a six-digit PIN takes days. The same number decides how long a code breaker needs.
- Rules from the caller: minimum and maximum length, digits, symbols, capitals, number of words.
- Changing a code updates the shared vaults. Everyone else's saved code goes stale.
The Passwords app
A grey key tile in np_phone. It lists everything the character knows, sorted by distance when you stand near a door.

- Categories: doors and safes, logins, Wi-Fi and other, with nearby, A–Z and recent.
- Hold to reveal, copy, share with a player nearby or write it on a paper note. Reveals are rate limited and logged.
- A security check for leaked, weak and reused codes, with a badge on the app.
- 2FA codes that count down every 30 seconds, guest codes, change code and recently deleted.
- Streamer mode blurs logins and blocks reveal.
The app's screens and settings are in the phone app docs.
Shared vaults for gangs and jobs
Every np_gangs gang and every framework job gets a vault, and players can make their own. Members see what their rank allows.

- Gang vaults with np_gangs ranks, job vaults by grade with the boss as manager, and up to five custom vaults per character.
- A minimum rank per item: lower ranks see that it exists, not the code.
- When a member leaves, the codes they could see are flagged, and one tap rotates them.
- An activity feed: who added, changed or used what.
Ways to get a code you shouldn't have
Each one is a separate switch in the config, and each one leaves a trace the owner or the police can find.
| Feature | How it works |
|---|---|
| Code breaker | The code_breaker item runs a minigame. Its length comes from the code's strength, it cancels when you walk away, and the breaker can be used up |
| Shoulder surfing | Players within 10 m see someone typing. Stand close and hold H to catch the digits, some stay hidden |
| Paper notes | Write a code on a paper_note. Anyone who finds it can read it and save it |
| Leak warnings | When someone else opens your lock with your code, you get a warning and the entry is marked leaked |
| Warrant | Police on duty with a search_warrant read a suspect's keychain. Optionally they also need an np_identification badge, and every read is logged |
Every lock can opt out with crackable = false, and lockouts can raise np_passwords:dispatch for your police resource.
Doors, stashes and guest codes
np_passwords can be the whole lock, not only the prompt. Staff can place a lock where they stand with /pwlock.
- Doors: give a lock a door model and coords. np_prophandler keeps the door state, relocks after a few seconds and opens double doors and gates of up to 8 parts as one door.
- Stashes: a lock with the id
stash:<stashId>asks for the code before np_inventory opens that stash. np_gangs gang stashes can opt in. - Guest codes: the owner makes a code with a number of uses and an expiry, and shares it as text or a QR code. It never shows the real code.
- Keypads: a lock can spawn a keypad prop at its coords through np_prophandler.
Set it up
Compatibility
ESX with np_inventory is the first target. Every bridge is detected at start. np_prophandler 1.1.0 or newer is required, every other np_* sibling is optional.
| Kind | Supported |
|---|---|
| Framework | es_extended, qbx_core, qb-core, or standalone (characters from np_character when it runs) |
| Inventory | np_inventory, ox_inventory, qb-inventory, or none (no notes, code breakers or stash locks) |
| Database | oxmysql. The np_pw_* tables are created on start |
| Staff | np_admin permissions np_passwords.admin, .locks and .reveal. Without np_admin: the console, listed identifiers and ESX admin groups. No ACE |
| Look | Frosted Nimbus glass by default, Liquid Glass with Config.Material |
| Sibling | With it | Without it |
|---|---|---|
| np_phone | The Passwords app, alerts, 2FA by SMS | Prompts only |
| np_hud | Save offers, key prompts | Own toasts |
| np_inventory | Items and stash locks, registered at runtime | Add the items yourself |
| np_gangs | Gang vaults and stash lock | Job and custom vaults |
| np_menu | "Watch them type" and warrant options | Keys only |
| np_minigames | Cracking as its server-checked code cracker | Built-in overlay |
| np_admin | Permissions and live settings | Fallback staff check |
Installation
Build the NUI once, set the secret that encrypts the keychains and start it after its dependencies.
- Put the resource in
resources/asnp_passwords. - Build the NUI once (Node 18+):
cd web && npm ci && npm run build - Items: np_inventory registers
paper_note,code_breakerandsearch_warrantitself. On ox_inventory or qb-inventory add them from the docs. - Set the secret and start it:
set np_passwords:secret "a-long-random-string" ensure oxmysql ensure es_extended # or qbx_core / qb-core ensure np_inventory # optional siblings before np_passwords ensure np_hud ensure np_phone ensure np_prophandler # required, 1.1.0+ ensure np_passwords
Keep the secret and never change it: it encrypts every keychain and vault. Without it a key is generated and stored in the database, with a warning.
For your own scripts
Register a lock, ask for it, and trust the server's answer. Your resource never stores or sees the code.
-- server: a six-digit safe, the code goes to the owner's keychain
exports.np_passwords:RegisterLock({
id = 'apt12:safe', label = 'Bedroom safe', type = 'pin', length = 6,
owner = { type = 'char', id = citizenid }, coords = vec3(-47.2, -585.9, 88.3),
generate = true,
})
-- client: show the prompt
if exports.np_passwords:Prompt('apt12:safe') then
TriggerServerEvent('apt:openSafe')
end
-- server: check it really happened, once
if exports.np_passwords:ConsumeUnlock(source, 'apt12:safe') then OpenSafe(source) end
-- 2FA before a large transfer (blocking)
if not exports.np_passwords:RequireCode(source, 'fleeca', { reason = 'Transfer $12,000' }) then return endYour own NUI can embed the prompts as <np-password>, <np-password-new> and <np-otp> from one script, with no dependencies.
Questions
Can a cheater read the codes from the client?
No. Lock codes only exist as bcrypt hashes on the server, and autofill sends an entry id, not the code. The only plain code a client gets is the app's hold to reveal for the player's own entries, and that is rate limited and logged.
Does my resource have to store the code?
No. It registers a lock with an id and asks IsUnlocked or ConsumeUnlock on the server. For logins to accounts your resource already keeps, RegisterVerifier lets it check user name and password itself.
Do I need np_phone?
No. The prompts, autofill, save offers and cracking work without it. np_phone adds the Passwords app, owner alerts and 2FA codes by SMS.
Can crime be turned off?
Yes. Code breakers, shoulder surfing and warrants each have their own switch, and each lock can be made uncrackable.
Who counts as staff?
No ACE: np_admin's permissions, or without np_admin the console, the identifiers in the np_admin_fallback convar and ESX admin groups.
Is it in German?
English and German, for the Lua messages and the NUI, set with Config.Locale.
Works well with

Register a lock, call one export, keep the code off the client.
Installation, the exports and the web components are in the docs.