> For the complete documentation index, see [llms.txt](https://kobralost.gitbook.io/advanced-accessory-system/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kobralost.gitbook.io/advanced-accessory-system/server-functions/utils.md).

# Utils

You can see some utils functions

## ASS.ItemExist(model, skin)

Return if the item exists by it model and skin

| Types                                      | Arguments  | Descriptions   | Optional |
| ------------------------------------------ | ---------- | -------------- | -------- |
| [string](https://www.lua.org/pil/2.4.html) | **model**  | The item model | ❌        |
| [number](https://www.lua.org/pil/2.3.html) | **radius** | The item skin  | ❌        |

Return :

| Types                                       | Parameters | Descriptions       |
| ------------------------------------------- | ---------- | ------------------ |
| [boolean](https://www.lua.org/pil/2.2.html) | exists     | If the item exists |

## AAS.GetTableById(uniqueId)

Return if the item exists by the item uniqueId

| Types                                      | Arguments    | Descriptions                         | Optional |
| ------------------------------------------ | ------------ | ------------------------------------ | -------- |
| [number](https://www.lua.org/pil/2.3.html) | **uniqueId** | The item uniqueId to check if exists | ❌        |

Return :

| Types                                       | Parameters | Descriptions       |
| ------------------------------------------- | ---------- | ------------------ |
| [boolean](https://www.lua.org/pil/2.2.html) | exists     | If the item exists |

## PLAYER:AASCheckDistEnt(class, radius)

Return if a certain entity class is near the player

| Types                                      | Arguments  | Descriptions                                       | Optional |
| ------------------------------------------ | ---------- | -------------------------------------------------- | -------- |
| [string](https://www.lua.org/pil/2.4.html) | **class**  | The entity class                                   | ❌        |
| [number](https://www.lua.org/pil/2.3.html) | **radius** | The max distance between the player and the entity | ❌        |

## PLAYER:AASCheckJob(uniqueId)

Return if the player has the good job for interact with the item

| Types                                      | Arguments    | Descriptions                 | Optional |
| ------------------------------------------ | ------------ | ---------------------------- | -------- |
| [number](https://www.lua.org/pil/2.3.html) | **uniqueId** | The item uniqueId to unequip | ❌        |

## PLAYER:AASAddMoney()

Add or remove to player some money

{% hint style="info" %}
If you want to remove to player money, you have to set a **negative number**
{% endhint %}

| Types                                      | Arguments | Descriptions               | Optional |
| ------------------------------------------ | --------- | -------------------------- | -------- |
| [number](https://www.lua.org/pil/2.3.html) | **money** | The money to add or remove | ❌        |

## AAS.ChangeLangage()

Change basics items descriptions and names compared to the selected language

## AAS.ConvertSqlToDataTable()

Convert the items list from the sql database to a lua table

{% hint style="info" %}
The converted lua table is located in **data/aas\_item\_table.txt**
{% endhint %}
