# Stick Minigame

#### Stick Game Minigame Documentation

This documentation outlines the usage and basic details of the "Stick Game" minigame designed for FiveM.

#### What is the Stick Game?

The "Stick Game" is a timing-based minigame where players must launch sticks toward a rotating center without overlapping any existing sticks. Success is achieved when all sticks are launched without collision. Failure occurs if a stick collides with another one on the same position.

**Key Features:**

* **Timed Gameplay**: Players must complete the game within a specified time limit.
* **Difficulty Levels**: The game can adjust the difficulty by changing the number of sticks and rotation speed.
* **Success/Failure Condition**: The game is completed successfully if all sticks are launched without collision. If any stick overlaps, the game is lost.

#### Export Usage

This minigame is accessible via an export function, allowing it to be integrated into other scripts.

**Parameters:**

* **callback** (function): The function that is triggered when the game ends.
* **duration** (integer): The total time for the game (in seconds).
* **header** (string): The title displayed during the game.
* **text** (string): Descriptive text for the game.
* **level** (integer): Difficulty level (number of sticks).
* **rotationSpeed** (integer): Speed at which the central object rotates.

**Command Example:**

```lua
RegisterCommand("sticktest", function()
    exports['frkn-stickgame']:stickGame(function(success)
        if success then
            TriggerEvent("chatMessage", "SYSTEM", "success", "Stick Game completed!")
        else
            TriggerEvent("chatMessage", "SYSTEM", "error", "Stick Game failed!")
        end
    end, 15, "Stick Game", "Finish the game and win!", 5, 100)
end)
```

#### General Information

The "Stick Game" minigame can be used in any FiveM project where players need to complete a timing-based challenge. The goal is to launch all sticks successfully without overlapping. Players can adjust the difficulty and speed according to their needs.

To integrate the game into your project, use the export function described above.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.0resmon.org/0resmon/0resmon-1/frkn-resources/frkn-minigame-pack/stick-minigame.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
