# Framework protections

{% hint style="info" %}
This package will be granted on anticheat subscription, but you can also get it separately as one time purchase
{% endhint %}

{% hint style="info" %}
**Framework Anti weapons protection is a resource that checks if the player has the weapon in his inventory in order to prevent players giving weapons from external resources**
{% endhint %}

{% hint style="info" %}
This resource uses Asset Escrow System provided by FiveM.
{% endhint %}

### Description

{% code overflow="wrap" %}

```
Framework Anti weapons protection resource can be used only if your weapons are based on your inventory system. In case you use the weapon wheel for your weapons, this resource will not be useful for you. You can customize your functions for checking the weapon in player's inventory and punishment in the config file
```

{% endcode %}

### Configuration

#### Config.HasWeaponInInventory function

```
Example:

Config.HasWeaponInInventory = function(source, weaponname)
    local user_id = vRP.getUserId{source}
    if vRP.getInventoryItemAmount{user_id, weaponname} > 0 then -- determine if the number of the weapon item is more than 0
        return true
    else
        return false
    end
end
```

#### Config.Ban function

```
Example

Config.Ban = function(source, weaponname)
    return DropPlayer(source, "You have been kicked for using weapon: "..weaponname.." without having it in your inventory")
end
```

{% hint style="info" %}
weaponname represents the name of the item
{% endhint %}

{% hint style="danger" %}
Do not change name of functions Config.HasWeaponInInventory or Config.Ban. By changing the name of functions you will make the resource no longer working.
{% endhint %}

{% hint style="danger" %}
Do not add parameters on functions Config.HasWeaponInInventory or Config.Ban. By adding new parameters to the functions you will cause errors and the resource will no longer working.
{% endhint %}


---

# 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.reasonanticheat.net/resources-documentation/framework-protections.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.
