Onboarding
Whitelist / onboarding quiz gate shown between the loadscreen and character selection: the player must pass a short rules quiz before entering. Questions, pass threshold, result messages and a TopV badge are all editable in-game. QBCore-only. Resource: nx-onboarding.
Installation
nx-onboarding folder in resources/, after ox_lib, oxmysql and qb-core. The nexorp_onboarding table is created automatically on first boot.
ensure nx-onboardingThe gate is exposed as an export; your spawn / character-select flow must call it before letting the player spawn:
local ok = exports['nx-onboarding']:RequireOnboarding()
-- ok == true -> passed (or already passed) -> continue spawning
-- ok == false -> failed -> do not spawnRequireOnboarding() returns instantly with true if the player already passed (their license is in nexorp_onboarding).
Features
- Full-screen NUI quiz gate with a configurable pass threshold.
- In-game questions editor (
/onboardadmin): add/remove questions and options, mark the correct answer, set the threshold. Applied live, no restart. - Correct answers never leave the server (validation is server-side).
- Pass state stored per player license in MySQL (
nexorp_onboarding). - TopV badge in the footer, configurable in-game.
- 8 languages with automatic fallback to English.
Configuration
| Option | Description |
|---|---|
| Config.Locale | Language: es, en, fr, de, pt-br, it, pl, nl |
| Config.PassThreshold | Correct answers required to pass (default 3; also editable in-game) |
| Config.DiscordURL | Discord invite shown on the pass screen |
| Config.WelcomeTitle / WelcomeMessage | Pass-screen text (empty = use the language of Config.Locale) |
| Config.FailTitle / FailMessage | Fail-screen text (same empty = locale behaviour) |
| Config.AdminAce | ACE for the admin commands (default group.admin) |
| Config.TopV | TopV badge defaults: enabled, profileType, slug, color |
Commands
| Command | Who | What |
|---|---|---|
| /onboardadmin | admin | Admin panel: TopV Widget tab + Questions editor tab (saved to data, applied live) |
| /onboardpreview | admin | Shows the gate even if you already passed (does not block spawning or write to the DB; ESC closes) |
| /onboardreset [id] | admin / console | Deletes the onboarding record so the real gate appears again next connection (no id = yourself) |
Integrations
- Export
exports['nx-onboarding']:RequireOnboarding()to gate your spawn / character-select flow. - TopV badge in the footer (configurable in-game).
- Dependencies: qb-core (QBCore-only), oxmysql, ox_lib.
Common errors
add_ace lines in server.cfg only load at boot. Add the admin ACE and restart, or run it in the live console too.
- The gate never appears → your spawn flow must call
exports['nx-onboarding']:RequireOnboarding()before spawning the player. - A player who passed sees the gate again → the pass is stored by license in
nexorp_onboarding; use/onboardresetto clear it for testing. - Edited questions still show the old ones → the editor applies to the next player who hits the gate; reconnect to see changes.
- Branding → replace
html/img/background.webm,header.pngandlogo-inline.pngkeeping the exact file names (the markup is protected).