> For the complete documentation index, see [llms.txt](https://fivem.lvsoft.com.ar/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fivem.lvsoft.com.ar/qb-esx/lvs-lib/skill-check.md).

# skill check

## Skill Check

<figure><img src="https://share.lvsoft.com.ar/images/Z4vKc.jpg" alt=""><figcaption></figcaption></figure>

***

### How to use:

Client-side using exports

### skillCheck

Runs a skill check with the defined difficulty.

```
exports.lvs_lib:skillCheck(difficulty, inputs)
```

* difficulty: `'easy'` or `'medium'` or `'hard'` or `table`
  * Preset difficulties:
    * 'easy' - `{ areaSize: 50, speedMultiplier: 1 }`
    * 'medium' - `{ areaSize: 40, speedMultiplier: 1.5 }`
    * 'hard' - `{ areaSize: 25, speedMultiplier: 1.75 }`
  * Custom difficulties can be set by sending an object instead of one of the preset strings above
    * areaSize: `number`
      * Size of the success area in degrees
    * speedMultiplier: `number`
      * Multiplier for the speed of the indicator
* inputs?: `string[]`
  * A random key will be picked from the inputs table for each skill check
  * If no inputs are defined the key is defaulted to `e`

***

### skillCheckActive <a href="#libskillcheckactive" id="libskillcheckactive"></a>

Returns true if a skill check is currently active.

```
exports.lvs_lib:skillCheckActive()
```

***

### cancelSkillCheck <a href="#libcancelskillcheck" id="libcancelskillcheck"></a>

Cancels the currently ongoing skill check.

```
exports.lvs_lib:cancelSkillCheck()
```

***

### Usage Example <a href="#usage-example" id="usage-example"></a>

```
local success = exports.lvs_lib:skillCheck(
    {
        'easy', 
        'medium',
        {areaSize = 60, speedMultiplier = 2}, 
        'hard'
    }, {'w', 'a', 's', 'd'}
)

print(success)
```

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://fivem.lvsoft.com.ar/qb-esx/lvs-lib/skill-check.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
