Installation
On this page12
Twelve steps. Read Requirements first.
1. Check the requirements
FXServer artifact 7290 or newer, OneSync on, oxmysql running, MySQL 8.0+
or MariaDB 10.4+. Optional: ox_lib, a voice system, an appearance script, a death
script, an MDT.
2. Place the folder
Drop the folder into resources/[scripts]/.
3. Add it to server.cfg
Start it after everything it integrates with, so 'auto' can find them at boot.
ensure oxmysql
ensure ox_lib # optional
ensure qbx_core # or qb-core / es_extended / nothing (standalone)
ensure ox_inventory # your inventory
ensure pma-voice # your voice system
ensure illenium-appearance
ensure 5code-recognitionOrder in one line: oxmysql → framework → inventory → (ox_lib) → voice →
ambulance / police / MDT / evidence / HUD → us.
4. Secrets and webhooks
They go in config_server.lua or in convars — never in config.lua, which every
player downloads.
set recognition_secret "YOUR_LONG_RANDOM_TEXT" # optional: auto-generated if empty
set recognition_webhook_default "[YOUR WEBHOOK URL]"
set recognition_webhook_proofs "[YOUR WEBHOOK URL]"Set recognition_secret before the first start if you can. Leave it empty and
the script generates one into the database instead, which is weaker (anyone with
database access can read it) and prints a warning at every boot. Once set, never
change it: a changed secret is refused at boot, because voices, voiceprint codes,
tattoo codes and the proof log all depend on it.
Full list: Files & Convars.
5. Edit config.lua
The three things worth doing on day one:
Config.Framework = 'auto' -- leave on auto, or pin your framework
Config.Jobs.Police = { 'police' } -- ships with 'police'; add your other departments
Config.Implant.Clinics = { ... } -- move the clinic where you want itEverything else has a working default. See Configuration.
6. Add the five items
voice_changer, hidden_camera, magnetic_scanner, recognition_battery,
recognition_report. Paste-ready definitions per inventory are in
Items and in the install/items/ folder of the zip.
Running standalone without an inventory? Skip it — items are then kept by the script
and the console says so:
[5code-recognition] standalone: items are kept by the script (use /recognition:use).
7. Admin permission
add_ace group.admin recognition.admin allow
add_principal identifier.license:YOUR_LICENSE_HERE group.adminLighter staff roles get one child ACE each instead of the parent:
recognition.admin.view, .edit, .export, .classifier, .identity,
.settings. See Admin & Permissions.
8. Character data (framework-specific)
So a deleted character's recognition identity goes with it:
Qbox
Add one entry to qbx_core/config/server.lua:
characterDataTables = {
-- ... keep every existing entry ...
{'recognition_identities', 'identifier'},
},If you use an external character selector, useExternalCharacters must be true.
ESX
esx_multicharacter builds its clean-up list only when it starts, so our table
has to exist by then. Pick one:
- Recommended: import
sql/install.sqlonce by hand (HeidiSQL, phpMyAdmin) before the next start. It is idempotent — running it twice changes nothing. - Or put
ensure 5code-recognitionbeforeensure esx_multicharacter(withoxmysqlandes_extendedstill before both) and restart the server once after the very first start.
Check it: create a test character, delete it, and confirm its row in
recognition_identities is gone.
0R Multicharacter v3
Add our character-keyed tables to its config/database.lua Database.List, in each
framework section you use, using the same entry format as the rows already there:
| Table | Columns |
|---|---|
recognition_identities | identifier |
recognition_memories | observer_key, target_key |
recognition_familiarity | observer_key, target_key |
recognition_introductions | observer_key, target_key |
recognition_devices | owner_key |
recognition_reports | author_key, holder_key |
recognition_death_sessions | char_key |
Do not list recognition_scans, recognition_proofs, recognition_admin_log
or recognition_anomalies. The proof and admin logs are tamper-evident: deleting
rows out of the middle makes recognition:verifyproofs report them as tampered.
QBCore & others
Nothing to install. QBCore deletes characters from a fixed list of tables and fires no event, so our own character clean-up job handles it (every 6 h by default, plus a 10 s check when it sees a delete happen). The same job covers UM, 17mov, CodeM, OP, ak47 and VMS selectors on any framework.
9. Start it
ensure 5code-recognitionYou should see these lines:
[5code-recognition] Schema ensured (mysql 8.0.39).
[5code-recognition] Integrations: framework=qbx inventory=ox_inventory voice=pma-voice appearance=illenium-appearance tattoos=illenium-appearance death=qbx_medical police=qbx_police mdt=none evidence=none target=none textui=native hud=jg-hud screenshot=builtin
[5code-recognition] Full scan time with current settings: 90 s.
[5code-recognition] Resource started successfully (v1.0.0).
[5code-recognition] Up to date (1.0.0).The last line arrives about eight seconds after the others, and is silently skipped if the update check cannot reach GitHub — its absence is not a fault.
Then run the self-test in the server console:
recognition:selftestEvery line should say PASS.
10. Test in game with a friend
Face your friend and press F3. Scan person to memory is already marked: press ENTER, then ENTER again to start on the orange arrow, and talk. Then have them put a mask on and scan again. Then check the result from the server console:
recognition:check <yourId> <friendId>Full walkthrough: First Test (5 minutes).
11. Optional extras
- JG HUD offset and the optional hide stack — HUDs
- MDT push for camera reports and statements — Police, MDT & Evidence
- Lab ID from your evidence script — same page
- A screenshot resource for photos — Photos & Screenshots
- A nametag driver so masked players lose their floating name — Nametags & Chat
- Target mode instead of the F3 menu — Target, Text UI, Progress, Notify & Emotes. Printing camera recordings needs the F3 menu, so it is not available in target or prompt mode.
12. If something is wrong
Every boot line has a fix on the Troubleshooting page. Two quick ones:
- "My changes don't apply." You are almost always editing a different copy of the folder than the one the server loaded, or on a different server than the one you are testing on. Check the path the console prints.
- Missing item definitions.
[5code-recognition] Missing item definitions: voice_changer, hidden_camera.→ step 6.