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()
Last updated
Was this helpful?