---
description: There is five files for configuration. All files at config folder.
---

# Configuration

{% tabs %}
{% tab title="clientconfig.lua" %}
* **OpenCommand**\
  This variable sets the open command for inventory, inventory open key can be changed from Fivem Keybinds.
* **PlayerLevel**\
  This function is for getting the player's level. If you are not using any level system you can edit the return value as false. If you are using a levelsystem you can set your system export or callback as return value.

```lua
PlayerLevel = function()
   return exports["yourxpsystem"]:XPGetter() or false
end
```
{% endtab %}

{% tab title="serverconfig.lua" %}
* **InventoryTypes**\
  You can add new inventory types from here.\
  Example

{% code overflow="wrap" %}
```lua
["inventoryType"] = {
            maxWeight = 100, --kg
            label = "Inventory Type Label"
}
```
{% endcode %}

* **DeleteBlockedItems**\
  Players can delete items by double clicking on item. You can set items here which you don't want to be deleted.

{% code overflow="wrap" %}
```lua
["deluxo"] = true,
```
{% endcode %}

* **LeaderBoard**
  * `RefreshMin (minutes)`\
    You can set leaderboard refresh rate here. (I suggest you to set it 60 or more.)
  * `ListCount`\
    This option sets the listed player count on leaderboard.
{% endtab %}

{% tab title="sharedconfig.lua" %}
* **StatTypes**\
  You can add new stats to system from here. Don't remove kill and dead!\
  Example

```lua
{
    key = "newstat", 
    label = "New Stat", 
    listOnLeaderBoard = true, 
    listOnProfile = true
}
```

{% hint style="info" %}
Set listOnLeaderBoard to sort players for that statistic on leaderboard. Set it false for otherwise.
{% endhint %}

{% hint style="info" %}
Set listOnProfile to show that stat on profile section. Set it false for otherwise.
{% endhint %}

* **RemoveInventoriesWhenDead**\


{% code overflow="wrap" %}
```lua
Config.RemoveInventoriesWhenDead = {
    bool = function(source)
       return true -- you can put your inSafe export to make it dynamic
    end,
    deathEvent = "esx:onPlayerDeath",
    reviveEvent = "esx:onPlayerSpawn", --seconds
    types = {
        "inventory",
        --"protected"
    }
}
```
{% endcode %}

{% hint style="info" %}
bool: You can directly set return value true if you don't want to check if player is in safezone or etc. Otherwise you can set the return value according to your demand.
{% endhint %}

{% hint style="info" %}
deathEvent: You have to set here the event triggered when the player dies.
{% endhint %}

{% hint style="info" %}
reviveEvent: You have to set here the event triggered when the player revives.
{% endhint %}

{% hint style="info" %}
types: You can type thee inventory types that you want to be cleared when dead.
{% endhint %}
{% endtab %}

{% tab title="jsconfig.json" %}
* **CloseKeys**\
  This is the keys for closing the inventory.
* **SecondaryInventoryTypes**\
  This option is for making the inventory type style side by side.
* **MoneyFormat**\
  If you are using money system set this true, if you are using point system set this false.
{% endtab %}

{% tab title="items" %}
You have to add items to this file to get inventory working properly.

For adding new item you can check the example.

Example

{% code overflow="wrap" %}
```lua
["deluxo"] = {
        label = "Deluxo",
        weight = 1.0,
        type = "vehicle",
        useItemInfo = false,
        rarity = "epic"
},
```
{% endcode %}
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="client/shared.lua" %}
{% code overflow="wrap" %}
```lua
function IsDead()
    return IsPedDeadOrDying(PlayerPeId()) -- returnValue
end
```
{% endcode %}

You can set the return value according to your is player dead getter

{% code overflow="wrap" %}
```lua
function GetMoney()
    return exports["gfx-points"]:GetPoints()
end
```
{% endcode %}

You can use gfx-points for market transactions. \
You can download gfx-points on this link: https://github.com/fivegfx/gfx-points

{% code overflow="wrap" %}
```lua
function SetWeaponAttachments(ped, weaponHash, info)
    
end
```
{% endcode %}

You can set attachments of used weapon in this function according to your attachment data.
{% endtab %}

{% tab title="server/shared.lua" %}
{% code overflow="wrap" %}
```lua
function Notify(source, text)
    -- your notify function here
end
```
{% endcode %}

Place your server side notification trigger or export.
{% endtab %}
{% endtabs %}

{% hint style="info" %}
Use weapon, vehicle or item for type variable.
{% endhint %}

{% hint style="info" %}
Rarity is for color effects on inventory items.
{% endhint %}

### **Rarity Types**

* legend
* epic
* rare
* uncommon
* common

{% hint style="info" %}
useItemInfo is for setting the item has info data or not. For example each weapon has different ammo count.
{% endhint %}
