# Exports

## Table of Contents

<table data-view="cards"><thead><tr><th align="center"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td align="center"><i class="fa-arrow-down-to-line">:arrow-down-to-line:</i> Export 1</td><td><a href="#export-1">#export-1</a></td></tr><tr><td align="center"><i class="fa-arrow-down-to-line">:arrow-down-to-line:</i> Export 2</td><td><a href="#export-2">#export-2</a></td></tr><tr><td align="center"><i class="fa-arrow-down-to-line">:arrow-down-to-line:</i> Export 3</td><td></td></tr></tbody></table>

### Export 1

{% hint style="info" %}
Brief description of what this export does and when to use it.
{% endhint %}

{% tabs %}
{% tab title="Client" %} <i class="fa-code">:code:</i> **Syntax**

```lua
exports['script-name']:FunctionName(param1, param2)
```

***

<i class="fa-sliders">:sliders:</i> **Parameters**

| Parameter | Type   | Required                                      | Description                     |
| --------- | ------ | --------------------------------------------- | ------------------------------- |
| param1    | string | <i class="fa-square-check">:square-check:</i> | Description of first parameter  |
| param2    | number | <i class="fa-square-xmark">:square-xmark:</i> | Description of second parameter |

***

<i class="fa-arrow-turn-down">:arrow-turn-down:</i> **Returns**

| Type    | Description                                     |
| ------- | ----------------------------------------------- |
| boolean | Returns `true` if successful, `false` otherwise |

***

<i class="fa-file-code">:file-code:</i> **Example Usage**

{% tabs %}
{% tab title="Example 1" %}

```lua
-- Example 1: Basic usage
local result = exports['script-name']:FunctionName('example', 50)

if result then
    print('Success!')
else
    print('Failed!')
end
```

{% endtab %}

{% tab title="Example 2" %}

```lua
-- Example 2: Advanced usage
local data = exports['script-name']:FunctionName('test')
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Important:** Make sure to check the return value before proceeding with other operations.
{% endhint %}
{% endtab %}

{% tab title="Server" %} <i class="fa-code">:code:</i> **Syntax**

```lua
exports['script-name']:FunctionName(param1, param2)
```

***

<i class="fa-sliders">:sliders:</i> **Parameters**

<table><thead><tr><th>Parameter</th><th>Type</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>param1</td><td>string</td><td>true</td><td>Description of first parameter</td></tr><tr><td>param2</td><td>number</td><td>false</td><td>Description of second parameter</td></tr></tbody></table>

***

<i class="fa-arrow-turn-down">:arrow-turn-down:</i> **Returns**

| Type    | Description                                     |
| ------- | ----------------------------------------------- |
| boolean | Returns `true` if successful, `false` otherwise |

***

<i class="fa-file-code">:file-code:</i> **Example Usage**

{% tabs %}
{% tab title="Example 1" %}

```lua
-- Example 1: Basic usage
local result = exports['script-name']:FunctionName('example', 50)

if result then
    print('Success!')
else
    print('Failed!')
end
```

{% endtab %}

{% tab title="Example 2" %}

```lua
-- Example 2: Advanced usage
local data = exports['script-name']:FunctionName('test')
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Important:** Make sure to check the return value before proceeding with other operations.
{% endhint %}
{% endtab %}
{% endtabs %}

### Export 2

{% hint style="info" %}
Brief description of what this export does and when to use it.
{% endhint %}

{% tabs %}
{% tab title="Client" %} <i class="fa-code">:code:</i> **Syntax**

```lua
local data = exports['script-name']:AnotherFunction(playerId)
```

***

<i class="fa-sliders">:sliders:</i> **Parameters**

<table><thead><tr><th>Parameter</th><th>Type</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>playerId</td><td>number</td><td>true</td><td>The server ID of the player</td></tr></tbody></table>

***

<i class="fa-arrow-turn-down">:arrow-turn-down:</i> **Returns**

| Type  | Description                                            |
| ----- | ------------------------------------------------------ |
| table | Returns a table with player data or `nil` if not found |

Return Structure:

```lua
{
    id = 1,
    name = "Player Name",
    balance = 5000,
    data = {...}
}
```

***

<i class="fa-file-code">:file-code:</i> **Example Usage**

{% tabs %}
{% tab title="Example 1" %}

```lua
-- Get player data
local playerData = exports['script-name']:AnotherFunction(PlayerId())

if playerData then
    print('Player:', playerData.name)
    print('Balance:', playerData.balance)
end
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Warning:** This function returns `nil` if the player is not found. Always check the return value!
{% endhint %}
{% endtab %}

{% tab title="Server" %} <i class="fa-code">:code:</i> **Syntax**

```lua
local data = exports['script-name']:AnotherFunction(source)
```

***

<i class="fa-sliders">:sliders:</i> **Parameters**

<table><thead><tr><th>Parameter</th><th>Type</th><th data-type="checkbox">Required</th><th>Description</th></tr></thead><tbody><tr><td>playerId</td><td>number</td><td>true</td><td>The server ID of the player</td></tr></tbody></table>

***

<i class="fa-arrow-turn-down">:arrow-turn-down:</i> **Returns**

| Type  | Description                                            |
| ----- | ------------------------------------------------------ |
| table | Returns a table with player data or `nil` if not found |

Return Structure:

```lua
{
    id = 1,
    name = "Player Name",
    balance = 5000,
    data = {...}
}
```

***

<i class="fa-file-code">:file-code:</i> **Example Usage**

{% tabs %}
{% tab title="Example 1" %}

```lua
-- Get player data
local playerData = exports['script-name']:AnotherFunction(PlayerId())

if playerData then
    print('Player:', playerData.name)
    print('Balance:', playerData.balance)
end
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
**Warning:** This function returns `nil` if the player is not found. Always check the return value!
{% endhint %}
{% endtab %}
{% endtabs %}


---

# 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://anxscripts.gitbook.io/docs/premium-resources/hud/guides/exports.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.
