# Exports

{% hint style="info" %}
This exports are **server side**, they won't work if added in a client file.
{% endhint %}

## GetSlots(playerId)

> Use it to retrieve the current character slots from a player.

**parameters:**

* **playerId** `number`: The player server ID

**returns:**

* **slots** `number`

```lua
local slots = exports['av_multicharacter']:GetSlots(playerId)
print(slots)
```

## **AddSlot(playerId, amount, temp)**

> Adds an extra slot to the designed player ID.

**parameters:**

* **playerId** `number`: The player server ID.
* **slots** `number`: The amount of slots to add.
* **temp?** `boolean:` If true, this extra slot will be temporal and will be available until next server restart.

**returns:**

* **added** `boolean`

<pre class="language-lua"><code class="lang-lua"><strong>local added = exports['av_multicharacter']:AddSlot(playerId, amount, temp) 
</strong></code></pre>

## RemoveSlot(playerId, amount)

> Removes X character slot(s) from the desired player.

**parameters:**

* **playerId** `number`: The player server ID.
* **slots** `number`: The amount of slots to remove

**returns:**

* **slots** `number:` Current player slots

```lua
local currentSlots = exports['av_multicharacter']:GetSlots(playerId)
print(currentSlots) -- extra slots = 5
local newSlots = exports['av_multicharacter']:RemoveSlot(playerId, 1)
print(newSlots) -- extra slots = 4
```

{% hint style="info" %}
Please be aware that the slot counts is a sum between the default slots any player can have (3 by default) + the amount of slots a specific player owns. This exports will add/remove/return the current player extra available slots and not the total.
{% endhint %}


---

# 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.av-scripts.com/guides/multicharacter/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.
