# Usage

#### Check if Player is Currently Looting a Dead Body (Client-Sided)

```lua
exports["petris-lootdeadbodies"]:IsCurrentlyLootingDeadBody()
```

{% hint style="info" %}
You can use this export to make your anti-exploit code into one of your scripts.
{% endhint %}

### Whitelisted/Blacklisted Areas Configuration

```lua
["Locations"] = {
        ["System"] = "blacklisted", -- Possible Values: whitelisted | blacklisted (Define if you want to blacklisted areas and whitelist the other map locations or whitelist areas and block the other map locations)

        ["WhitelistedLocations"] = { -- The only locations where loot bags can be dropped
            { AreaName = "Test1", AreaCoordinates = vector3(0.0, 0.0, 0.0), AreaRange = 10.0 }, -- Area Name is not used, but it is recommended to fill so you know which areas are whitelisted.
            { AreaName = "Test2", AreaCoordinates = vector3(0.0, 0.0, 0.0), AreaRange = 5.0 } -- Area Name is not used, but it is recommended to fill so you know which areas are whitelisted.
        },

        ["BlacklistedLocations"] = { -- Location that loot bags won't be dropped even if the function is triggered.
            { AreaName = "Test1", AreaCoordinates = vector3(0.0, 0.0, 0.0), AreaRange = 10.0 }, -- Area Name is not used, but it is recommended to fill so you know which areas are blacklisted.
            { AreaName = "Test2", AreaCoordinates = vector3(0.0, 0.0, 0.0), AreaRange = 5.0 } -- Area Name is not used, but it is recommended to fill so you know which areas are blacklisted.
        },
    },
```

{% hint style="info" %}
Firstly, you must select how the location restriction system will work.\
\
In <mark style="background-color:red;">\["System"]</mark> value, change between <mark style="color:purple;">whitelisted</mark> and <mark style="color:purple;">blacklisted</mark> values.\
\
Then, you will add your own blacklisted/whitelisted locations just like the examples above.
{% endhint %}

### Set Blacklisted Items/Money/Weapons

```lua
Blacklisted = {
        ["Items"] = {
            "id_card", 
        },
        ["Money"] = {
            "bank",
        },
        ["Weapons"] = {
            "WEAPON_STUNGUN",
        }
    },
```

### Icon Customization

```lua
Icons = { -- Find some here: https://fontawesome.com/search?o=r&m=free
            ["money"] = {
                ["default"] = {icon = "dollar-sign", iconColor = "#289931"},
                Specific = {
                    ["money"] = {icon = "wallet", iconColor = "#289931"},
                    ["black_money"] = {icon = "sack-dollar", iconColor = "#e30707"},
                },
            },
            ["weapon"] = {
                ["default"] = {icon = "gun", iconColor = "#cf2b1f"}
            },
            ["item"] = {
                ["default"] = {icon = "box", iconColor = "#d5e30b"},
                Specific = {
                    ["water"] = {icon = "bottle-water", iconColor = "#1599e6"},
                    ["bread"] = {icon = "bread-slice", iconColor = "#b0580b"},
                },
            }
        }
```

{% hint style="info" %}
You can freely customize icons for all your server items.\
\
[Click here to find icon names.](https://fontawesome.com/search?o=r\&m=free)\
[Click here to get a color hex code.](https://imagecolorpicker.com/en)
{% endhint %}
