Exports
Start a minigame from any script and await the result.
Start a minigame from any script and await the result.
Everything goes through a single client export. You don't touch events or the NUI directly —
you call play, wait for the result, and act on it.
playexports['see_minigames']:play(game, options) -- booleanStarts a minigame and returns the verdict, re-validated on the server. It blocks until the
player wins, fails or times out, so call it inside a CreateThread (or any async context).
gamestringrequiredWhich game to play: 'wires', 'pattern', 'sequence' or 'lockpick'.
optionstableoptionalOptional. { difficulty = 'easy' | 'medium' | 'hard' }. Defaults to Config.defaultDifficulty.
Returns — boolean. true only when the server validates the player's attempt. false
if another game is already running, the player fails, the timer runs out, or the attempt is invalid.
CreateThread(function()
local success = exports['see_minigames']:play('lockpick', { difficulty = 'hard' })
if not success then
return -- failed or cancelled: leave the door locked
end
-- success: unlock the door, open the stash, start the heist...
TriggerServerEvent('myscript:door:open')
end)Each game runs server-authoritative: the server builds the challenge, ties it to a one-time
token, and is the only one that decides success when play returns. The interface just
plays and submits the attempt.
Skillchecks have to show the challenge to the player, so a fully modified client could in theory auto-solve one. The server guarantees no validation without a matching token and a coherent attempt — treat the games as friction and immersion, not as a standalone anti-cheat on a critical action.