# 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 %}
