Letter Minigame

Letter Finding Game Minigame Documentation

This documentation explains the usage and general features of the "Letter Finding Game" minigame designed for FiveM.

What is the Letter Finding Game?

The "Letter Finding Game" is a minigame where players must find and select random letters within a given time frame. Players succeed by selecting the correct letters. If they run out of time or make an incorrect selection, the game ends.

Key Features:

  • Timed Game: Players are given a certain amount of time to find the correct letters.

  • Success/Failure Condition: The game is completed when the correct letters are found. If time runs out or a wrong letter is selected, the game is lost.

  • Keyboard Simulation: The game allows players to interact by selecting letters using a simulated keyboard.

Export Usage

This minigame can be easily integrated into other systems via an export function.

Export Definition:

luaKodu kopyalaexports('letterGame', letterGame)

Parameters:

  • callback (function): The function to be called when the game finishes.

  • duration (integer): The total time for the game (in seconds).

  • header (string): The text displayed in the game header.

  • text (string): The description or instructions for the game.

  • speed (integer): Determines the game’s speed.

Command Example:

RegisterCommand("lettertest", function()
    exports['frkn-lettergame']:letterGame(function(status)
        if status then
            TriggerEvent("chatMessage", "SYSTEM", "error", "You completed the minigame!")
        else
            TriggerEvent("chatMessage", "SYSTEM", "error", "You failed the minigame!")
        end
    end, 10, "Test", "This is a test", 100)
end)

General Information

This minigame can be easily integrated into any FiveM project. The player's goal is to find and select the correct letters within the specified time limit. Players can trigger the minigame via commands and receive success or failure feedback based on their performance.

To use the minigame in your project, simply call the game using the export function mentioned above.

Last updated