# Version

Provides utilities for inspecting, modifying, and spawning vehicles with customization support.

***

## Accessing the Module

```lua
local VEHICLES <const> = exports.boii_utils:get("modules.vehicles")
```

***

## Server

### check\_version(opts)

Checks the version of a resource against the latest version on GitHub.

#### Parameters

| Name             | Type       | Description                                                                     |
| ---------------- | ---------- | ------------------------------------------------------------------------------- |
| opts             | `table`    | Configuration table containing:                                                 |
| └ resource\_name | `string`   | The resource name (optional, defaults to current resource)                      |
| └ url\_path      | `string`   | Path to the versions JSON file on GitHub                                        |
| └ callback       | `function` | Callback function receiving `(success, current_version, latest_version, notes)` |

#### Example

```lua
local options = {
    resource_name = 'my_resource',
    url_path = 'myuser/myrepo/refs/heads/main/versions.json',
    callback = function(success, current, latest, notes)
        if success then
            print('Up to date!')
        else
            print('Outdated:', notes)
        end
    end
}

VERSION.check(options)
```


---

# 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.boii.dev/old-docs/boii_utils/api/version.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.
