# Exports

### Exports

#### MAP:

* <mark style="background-color:blue;">**NAME**</mark>: `citizenId` / `job.name` / `gang.name`
* <mark style="background-color:purple;">**XPTYPE**</mark>: The name of the type you are using, defined in the `shared/sconfig.lua` file.
* <mark style="background-color:orange;">**AMOUNT**</mark>: An integer amount or the string `'auto'`.
* <mark style="background-color:green;">**typeMult**</mark>: The multiplier that will be applied.

**Note**: All exports work based on the specified `name` & `type`.

#### To use an export, use this format:

```lua
exports['ip_xpsystem']:AddXP(src, xpType, 'auto', 1)
```

#### Available Exported Functions:

**\[**<mark style="color:purple;">**CL**</mark>**]/\[**<mark style="color:red;">**SV**</mark>**]&#x20;**<mark style="color:orange;">**GetLevel**</mark>**(**<mark style="background-color:blue;">**name**</mark>**,&#x20;**<mark style="background-color:purple;">**xpType**</mark>**)**

* Returns the integer value of the level.

**\[**<mark style="color:purple;">**CL**</mark>**]/\[**<mark style="color:red;">**SV**</mark>**]&#x20;**<mark style="color:orange;">**GetXP**</mark>**(**<mark style="background-color:blue;">**name**</mark>**,&#x20;**<mark style="background-color:purple;">**xpType**</mark>**)**

* Returns the integer value of experience.

**\[**<mark style="color:red;">**SV**</mark>**]&#x20;**<mark style="color:orange;">**GetLimit**</mark>**(**<mark style="background-color:blue;">**name**</mark>**,&#x20;**<mark style="background-color:purple;">**xpType**</mark>**)**

* Returns the total required XP to reach the next level (not the remaining amount).

**\[**<mark style="color:red;">**SV**</mark>**]&#x20;**<mark style="color:orange;">**AddXP**</mark>**(**<mark style="background-color:yellow;">**src**</mark>**,&#x20;**<mark style="background-color:purple;">**xpType**</mark>**,&#x20;**<mark style="background-color:orange;">**amount**</mark>**,&#x20;**<mark style="background-color:green;">**typeMult**</mark>**)**

* Adds XP to the person with the source specified for the given `xpType`.
* `amount` can be an <mark style="color:yellow;">integer</mark> or `'auto'`.
* If `typeMult` is skipped, the multiplier defaults to <mark style="color:blue;">1</mark>.

**\[**<mark style="color:red;">**SV**</mark>**]&#x20;**<mark style="color:orange;">**RemoveXP**</mark>**(**<mark style="background-color:yellow;">**src**</mark>**,&#x20;**<mark style="background-color:purple;">**xpType**</mark>**,&#x20;**<mark style="background-color:orange;">**amount**</mark>**)**

* Removes XP from the person with the source specified for the given `xpType`.
* `amount` can be an integer or `'auto'`.
