local MiniGame = exports['bcc-minigames'].initiate()
RegisterCommand('playgame', function(args, rawCommand)
local cfg = {
focus = true, -- Should minigame take nui focus (required)
cursor = false, -- Should minigame have cursor
maxattempts = 3, -- How many fail attempts are allowed before game over
type = 'bar', -- What should the bar look like. (bar, trailing)
userandomkey = true, -- Should the minigame generate a random key to press?
keytopress = 'B', -- userandomkey must be false for this to work. Static key to press
keycode = 66, -- The JS keycode for the keytopress
speed = 20, -- How fast the orbiter grows
strict = false -- if true, letting the timer run out counts as a failed attempt
}
MiniGame.start('skillcheck', cfg, function(result)
print("Passed?", result.passed) -- true/false
end)
end)