Download vise_pair_matching_game resource from Cfx.re Keymaster
Extract vise_pair_matching_game into your server's resources directory
Add ensure vise_pair_matching_game to your resources.cfg
🕹️ Starting the Game
You can either start the game through your own scripts or use the test command.
✅ Starting through your own scripts:
localresult=exports.vise_pair_matching_game:start()print('game ended with result:', result)
✅ Using the test command:
Type command /test_vise_pair_matching_game in-game.
Game can be seen at 1:38-1:52
Game main screen
Success screen
Failure screen
🔄 Result (return value)
The start() function will return true if the player finishes the game, or false if they fail or run out of time.
If you're using a callback, the same true or false will be passed into the callback function.
🔧 Settings
When starting the game, you can pass a settings table to customize how the game works.
Here are the available setting options:
numberOfPairs – How many matching pairs the game should have (default: 6)
timeout – How long (in seconds) the player has to finish the game (default: 35)
local result = exports.vise_pair_matching_game:start()
if result then
print('game completed')
else
print('game failed')
end
-- You can also optionally use a callback to determine if game was completed or not
exports.vise_pair_matching_game:start(settings, function(result)
if result then
print('game completed')
else
print('game failed')
end
end)
local settings = {
numberOfPairs = 6,
timeout = 35,
}
local result = exports.vise_pair_matching_game:start(settings)
if result then
print('game completed')
else
print('game failed')
end
local settings = {
numberOfPairs = 6,
timeout = 35,
}
exports.vise_pair_matching_game:start(settings, function(result)
if result then
print('game completed')
else
print('game failed')
end
end)