NEXO Scripts · Documentation

Everything to install, configure and get the most out of every NEXO resource.

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-onboarding

The 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 spawn

RequireOnboarding() 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

OptionDescription
Config.LocaleLanguage: es, en, fr, de, pt-br, it, pl, nl
Config.PassThresholdCorrect answers required to pass (default 3; also editable in-game)
Config.DiscordURLDiscord invite shown on the pass screen
Config.WelcomeTitle / WelcomeMessagePass-screen text (empty = use the language of Config.Locale)
Config.FailTitle / FailMessageFail-screen text (same empty = locale behaviour)
Config.AdminAceACE for the admin commands (default group.admin)
Config.TopVTopV badge defaults: enabled, profileType, slug, color

Commands

CommandWhoWhat
/onboardadminadminAdmin panel: TopV Widget tab + Questions editor tab (saved to data, applied live)
/onboardpreviewadminShows the gate even if you already passed (does not block spawning or write to the DB; ESC closes)
/onboardreset [id]admin / consoleDeletes 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 /onboardreset to 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.png and logo-inline.png keeping the exact file names (the markup is protected).