# 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'`.


---

# 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.infinitypulse.dev/redm/xp-system/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.
