Zyke Resources' Products
DiscordStore
  • Introduction
  • Common Issues
    • zyke_lib error
    • Lacking Entitlement
    • UI Not Working
    • Missing Files Via FTP
    • Resource Starting Sequence
    • Item Not Usable
    • Any other issues?
  • FAQ
  • Paid Resources
    • Consumables
      • Resource Description
      • Config
      • Exports & Events
      • Dependencies
      • Changelog
      • Guides
      • Setup
    • Smoking
      • Resource Description
      • Config
      • Exports & Events
      • Examples
      • Dependencies
      • Changelog
      • Test Server
      • Setup
    • Garages
      • Resource Description
      • Config
      • Exports & Events
      • Dependencies
      • Changelog
      • Setup
      • Common Issues
    • Drugdealer
      • Resource Description
      • Config
      • Exports & Events
      • Dependencies
      • Changelog
    • Crafting
      • Resource Description
      • Config
      • Exports & Events
      • Dependencies
      • Changelog
    • Plants
      • Resource Description
      • Config
      • Exports & Events
      • Dependencies
      • Changelog
    • Mugging
      • Resource Description
      • Config
      • Exports & Events
      • Changelog
    • Gangsystem
      • Resource Description
      • Config
      • Exports & Events
      • Examples
      • Dependencies
      • Changelog
  • Free Resources
    • Zyke Lib
      • Resource Description
      • Dependencies
      • Config
      • Setup
    • Status
      • Resource Description
      • Dependencies
      • Changelog
      • Setup
    • Propaligner
      • Resource Description
      • Exports & Events
      • Dependencies
      • Changelog
    • Vending Machines
      • Resource Description
      • Dependencies
      • Changelog
    • Sounds
      • Resource Description
      • Exports & Events
    • Key Minigame
      • Resource Description
      • Exports & Events
      • Changelog
    • Stabwheels
      • Resource Description
      • Dependencies
      • Changelog
    • Burncars
      • Resource Description
      • Dependencies
      • Changelog
    • Catalytic
      • Resource Description
      • Exports & Events
      • Config
      • Dependencies
      • Changelog
Powered by GitBook
On this page
  • Client Sided Exports
  • Start Minigame
  • Start Non-Intrusive Minigame
  • Stop Minigame
  • Is Active

Was this helpful?

  1. Free Resources
  2. Key Minigame

Exports & Events

All exports and events available to integrate this resource into others.

Client Sided Exports

Start Minigame

Simply starts a minigame for the client executing it. Default time limit will be 10 if nothing is provided. Will throw an error if started when a minigame is already in progress. Example:

---@param keys string[] @Any keyboard keys except TAB & ESCAPE
---@param randomizeKeys? integer @If a number, the `keys` param is sample size for randomization, and this is the amount
---@param timeLimit? integer @In seconds, time to complete the minigame otherwise you fail
---@return boolean, "success" | "fail" | "cancel"
exports["zyke_keyminigame"]:Start(keys, randomizeKeys, timeLimit)

Start Non-Intrusive Minigame

Starts a similar minigame to our standard export, but without any UI focusing. The minigame spawns at the top of your screen and only accepts arrow key inputs. This approach allows decent variety forcing you to really pay attention without freezing your game rendering you unable to walk. In situations where the player still needs to be able to walk/drive, use this. Example:

---@param keyCount integer @The amount of keys to press
---@param timeLimit? integer @In seconds, time to complete the minigame otherwise you fail
---@return boolean, "success" | "fail" | "cancel"
exports["zyke_keyminigame"]:StartNonIntrusive(keyCount, timeLimit)

Stop Minigame

Stops the ongoing minigame. Example:

exports["zyke_keyminigame"]:Stop()

Is Active

Returns if there's an active minigame. Example:

---@return boolean
exports["zyke_keyminigame"]:IsActive()
PreviousResource DescriptionNextChangelog

Last updated 24 days ago

Was this helpful?