All products

np_minigames

Every minigame of the np_* resources in one engine with one look. 19 games for hacking, breaching, timing, control, sport and search, each judged by a replay on the server. Any resource starts any game with one export call and can trust the result. Players practise them in an arcade with leaderboards, on screen or in the phone.

v1.2.0ESX · qbx · qb · standaloneServer-validated
Price TBAStore link follows at release
Installation guideDocumentation
Version
1.2.0
Frameworks
ESX, qbx, qb, standalone (names and identifiers only)
Dependencies
None
Database
oxmysql for stats and leaderboards, optional
Inventory
np_inventory, ox_inventory, qb-inventory or the framework's, for items
Optional
np_phone, np_hud, np_menu, np_character, np_admin
Languages
English, German
Build
Node 18+ to build the NUI once
The practice arcade: every game as a glossy tile by category, and the hex hack's page with its source, input, difficulty picker, personal stats and the leaderboard
The practice arcade: every game as a glossy tile by category, and the hex hack's page with its source, input, difficulty picker, personal stats and the leaderboard

In-game captures from a local ESX server at 1920×1080, each game in its opening state. Game shots are cropped to the card. The phone settings shot is taken from the NUI in the browser.

What's in it

The server makes every puzzle from a seed, replays what the player did and decides. The client only draws it.

19 games, six kinds

  • Hacking: hex hack, pattern lock, code cracker. Breach: thermite, drill, lockpick, wires, battering ram.
  • Timing: skill ring, torque check, power meter, strike. Control: balance, reel.
  • Sport: swing meter, putting, steady aim, cue stroke. Search: wand sweep.
  • Mechanics and numbers taken from the resources they came from.

Checked on the server

  • A replay, not a success flag. The client sends picks, press times and holds; the server runs the same rules.
  • Timing on the server's clock: too fast, too slow, a clock that runs ahead, walking away.
  • The same rules in Lua and TypeScript, kept equal by parity tests.

One export call

  • Play, Start, Chain several games, or Team: everyone solves at once and finishes within a few seconds of each other.
  • An ox_lib lib.skillCheck drop-in with the same arguments.
  • Hooks and events for every start, result and progress step.

Profiles and receipts

  • For flows that run on the client: the server registers the game, the client plays it and hands in a one-time receipt bound to the player.
  • A forged, reused or foreign receipt is refused.

Items and progress

  • Needs a lockpick, breaks one time in three on a fail, wears it down: one option on the call.
  • np_inventory, ox_inventory, qb-inventory or the framework.
  • Cosmetic progress for things like an ATM's trace bar.

Practice arcade

  • Every game as a tile, a difficulty picker, personal stats and a top 10 per game.
  • /minigames, an np_menu radial item, and the Arcade app in np_phone.

Difficulty and Assist

  • Four presets per game, any param per call, per-server overrides and a global time scale.
  • Assist for wider windows and more time, an accessibility option the server allows or not.

Staff and your server

  • np_admin settings, Send a minigame to a player, logs of impossible answers and perfect streaks.
  • ESX first, also qbx, qb or standalone. No hard dependency, no ACE. English and German.

A closer look

19 games in six categories

Each game is one card: a glossy tile, a clock, the board and key hints. Every game has easy, medium, hard and expert.

Wires: cut the wires the card names, in its order; a wrong cut sparks
CategoryGames
HackingHex hack, pattern lock, code cracker (play or passive)
BreachThermite, drill, lockpick, wires (cut or connect), battering ram (np_doors raids)
TimingSkill ring (ox_lib style), torque check, power meter, strike
ControlBalance (heat, simmer, stir, pressure, trim), reel
SportSwing meter, putting, steady aim (darts or scope), cue stroke
SearchWand sweep

Why a resource can trust the result

A game is a pure function of a seed, its params and what the player did. The server makes it, times it and judges it.

Hex hack: the target sequence, the code grid and the trace
  1. Build: the server makes the puzzle from a seed and sends only its public part. Hidden state like sweet spots or the fish's runs stays on the server.
  2. Play: the card sends back raw input: picks, press times, holds, input events.
  3. Replay: the server runs the same rules on that input and on its own clock. Too fast, too slow, a clock ahead or walking away all fail.
  4. Settle: items are used up by rule, stats and logs are written, and the calling resource gets one result with a score and a grade.

The np_* resources that use it

Each one keeps its own minigame as the fallback when np_minigames is not running, and has a switch to turn the integration off. np_hunting and np_farming plan their skill moments on it too.

ResourceWhat runs in np_minigames
np_bankingRobbery hack, every Pacific and Union sync terminal and the ATM jackpot as hex hacks, thermite, the drill. Difficulty per heist; the ATM's trace bar follows the game
np_prisonEvery skill check that pays: work detail steps, activities, tunnel digging, the fence (or wires) and the shank, through receipts
np_mechanicInstalls as the torque check; quick fixes start with a skill ring
np_passwordsThe code breaker as the code cracker (difficulty from the lock's strength), pattern locks as the pattern game
np_drugsAttended lab stages as short balance checks; their care feeds the purity
np_fishingOptional arcade fights: the fight as the reel, the bite as a strike, per angler with /fishmode
np_vendingCash-box break-in as a lockpick (a drill behind a reinforced lock), skimmer install as wires
np_gangsLester's trial: junction box, back doors, camera, jammer, tracker and the photo; graffiti as an option
np_inventoryThe lockpick on vehicles, difficulty by vehicle class; repair kit and spare tire as an option
np_shopsThe safe's lockpick method on hard; register and display cases as an option
np_fuelOwner and staff repair an out-of-order pump early with a torque check
np_environmentalClean-up tasks through receipts: cutting a trunk (drill), valves and lines (torque), traffic lights (wires), fences (power), barrels (skill ring), pumps (balance)
np_manufacturingJob steps: fitting parts as a torque check, laying the wrap as balance
np_tattoosInking yourself with a kit as steady aim; the score sets how dark it comes out
np_npchandler, np_prophandlerAn optional game in front of any NPC or prop interaction, and lock picking on doors
np_doorsEvery breach: lockpick, the police battering ram, thermite, hacks, keypad cracking, drills and multi-step chains, with the tools passed as items
np_golf, np_darts, np_billiardsKeep their own swing, throw and stroke; other resources' games are refused mid-shot or let through with the clock held

The practice arcade

/minigames or the np_menu radial opens it. A practice run is a normal server-checked session, so the leaderboard can be trusted.

The arcade: every game as a tile by category, the selected game's stats and leaderboard
  • Every game as a tile, grouped by category. Games a server switches off are hidden.
  • Personal stats and a top 10 per game, weighted by difficulty.
  • Settings: Assist, reduced motion and sounds, kept on the player's PC and used by every game.
  • Follows the server theme from np_admin: brand colour, strength, frosted or Liquid Glass.

The Arcade app

With np_phone running, Arcade is on every phone (Games tab of the App Store). While any game runs, the phone is blocked and put away.

Home: runs, win rate and perfects, every game with your bestA game: difficulty, your stats and the top 10Settings: Assist, reduce motion and sounds
  • Home: runs, win rate and perfects, then every game by category with your best points.
  • Play: pick a difficulty, the phone goes away and the run starts.
  • New personal best: a phone notification that opens the game's page.
  • Settings: the same Assist, motion and sound preferences as the big-screen arcade.

Set it up

Compatibility

Nothing is required. The framework, the inventory and every np_* sibling are detected at start and used while they run.

FrameworkUsed for
es_extendedCharacter names and identifiers for stats and leaderboards
qbx_coreNames and citizenid
qb-coreNames and citizenid
StandaloneLicense identifiers, or np_character names and per-character stats
InventoryItems on a game call
np_inventoryCount, remove, wear (first choice)
ox_inventoryCount, remove, wear
qb-inventoryCount, remove, quality
FrameworkCount and remove, no wear
SiblingWith itWithout it
np_phoneBlocked and put away while a game runs; the Arcade app, in the phone's Liquid Glass settingNo app
np_hudToasts; the zones under the card are claimedChat line
np_menuMenus close when a game opens (closeMenus); the Arcade radial item/minigames
np_characterNames and per-character stats without a frameworkLicense
np_adminSettings, nodes, Send a minigame, logs, themeConfig files
oxmysqlStats and leaderboards keptIn memory until restart

np_minigames is covered by 13,037 game checks (19 games × 4 difficulties × 8 seeds), 53 server, 24 client and compatibility tests and 83 vitest tests (Lua ⇄ TypeScript parity, phone app, per-game traces), but it has not run on a live server yet.

Installation

No dependencies and no SQL to import. You build the NUI once.

  1. Put the resource in resources/ as np_minigames.
  2. Build the NUI once (Node 18+):
    cd web && npm ci && npm run build
  3. Start it before the resources that use it:
    ensure oxmysql            # optional: stats and leaderboards
    ensure es_extended        # or qbx_core / qb-core
    ensure np_inventory       # or ox_inventory / qb-inventory
    ensure np_admin           # optional siblings
    ensure np_hud
    ensure np_phone
    ensure np_minigames
    ensure np_banking         # the resources that use it
  4. Open the arcade with /minigames, or the Arcade app on the phone, and play a round.

For your own scripts

Detect it, keep your old minigame as the fallback, and call one export. The result says what happened.

-- server: validated, blocks until the game ends
local ok, result = exports.np_minigames:Play(src, 'thermite',
  { difficulty = 'hard', label = 'Back door', maxMove = 2 })
if ok then OpenDoor() end

-- needs a lockpick, loses it on a fail one time in three
exports.np_minigames:Play(src, 'lockpick',
  { item = { name = 'lockpick', remove = 'fail', chance = 0.35 } })

-- two players, finish within 6 s of each other
local ok, team = exports.np_minigames:Team({ a, b }, 'hexhack', { window = 6 })

-- a client-driven job: the server checks the receipt
local result = exports.np_minigames:Redeem(src, receipt, 'dig')
  • Result: success, a score from 0 to 1, a grade from perfect to fail, the reason and game stats.
  • Hooks and events: beforeStart can refuse a game, afterResult, and events for start, result and progress.
  • Client: local games for low-stakes gates, SkillCheck like ox_lib, PlayProfile for receipts.

Questions

Do my np_* resources need it?

No. Every resource that uses np_minigames keeps its own minigame and falls back to it when np_minigames is not running, or when its Config.Minigames switch is off.

Can a cheater fake a win?

Not by sending "success": the server replays the input and checks the timing on its own clock. What a replay can't rule out is a program that plays perfectly in real time. Staff get a note after a long streak of perfect grades, and impossible answers are logged.

Can I use it in my own scripts?

Yes. One server export starts any game; profiles and receipts cover flows that run on the client. SkillCheck takes the same arguments as ox_lib's lib.skillCheck.

Can I make the games easier or harder?

Per call, per server in Config.Games, and with one time scale for every game. Players can turn on Assist if the server allows it, also outside the arcade.

Does it need a database?

No. With oxmysql, stats and leaderboards are kept in a table it creates itself. Without it they live in memory until the restart.

Does it use ACE permissions?

No. The staff tool checks the np_admin node np_minigames.send. Without np_admin there is no staff tool; everything else works.

Has it been tested on a live server?

Not yet. Every game is checked over every difficulty and many seeds, and the server, client and compatibility layers have their own suites. The difficulty presets may need tuning with real players.

Is it in German?

English and German, for the game cards, the arcade, the Arcade app and the notifications.

Works well with

One engine, every minigame.

Installation, every game's params and every export are in the docs.

Install np_minigames