Links

Keymaster - Minigame

Step-by-step installation guide, common issues & solutions, code snippets, error codes, config previews, locales previews, SQL previews, and changelogs; all in 1 easily accessible place.

Translate

INSTALLATION GUIDE

1. Unzip the cd_keymaster.zip folder and place this folder in your server's resource folder.
2. Before starting the script, please read the config.lua (this is located inside the main cd_keymaster folder) and configure the script to suit your server's needs.

How do I use it?

Example 1

You can start the minigame by using the default settings.
local example = exports['cd_keymaster']:StartKeyMaster()
if example then
print('im a winner)
else
print('i suck so bad)
end

Example 2

Or you can use the start the minigame by sending customized settings in a table.
local CustomSettings = {
settings = {
handleEnd = true; --Send a result message if true and callback when message closed or callback immediately without showing the message
speed = 10; --pixels / second
scoreWin = 1000; --Score to win
scoreLose = -150; --Lose if this score is reached
maxTime = 60000; --sec
maxMistake = 5; --How many missed keys can there be before losing
speedIncrement = 1; --How much should the speed increase when a key hit was successful
},
keys = {"a", "w", "d", "s", "g"}; --You can hash this out if you want to use default keys in the java side.
}
local example = exports['cd_keymaster']:StartKeyMaster(CustomSettings)
if example then
print('im a winner)
else
print('i suck so bad)
end

Is the resource not working as expected?

  • Make sure the name of the folder is cd_keymaster.
  • Check the server console and the in-game F8 console for errors.
  • If all else fails, contact the Codesign Team in the Codesign Discord.