> For the complete documentation index, see [llms.txt](https://highqez.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://highqez.gitbook.io/docs/resources/headgear/installation.md).

# Installation

## Download Resource

{% hint style="success" %}
Purchase the script from our [HighQez Store](https://highqez.tebex.io/). After the purchase, the resource will be available in your [Keymaster Account](https://keymaster.fivem.net/asset-grants)
{% endhint %}

Make sure you purchase the script using the same [Keymaster Account](https://keymaster.fivem.net/) that is linked to your server. If not you will receive a warning "**You lack the required entitlement".**

If you receive the error mentioned above, you may have to transfer the resource from the current Keymaster account to the server's Keymaster account using the transfer feature in Keymaster.

***

## Transfer Resource

{% hint style="success" %}
Unzip the downloaded file and transfer it to your server's resource folder
{% endhint %}

If you are using **FTP**, please ensure you use [**WinSCP** ](https://winscp.net/eng/download.php)to transfer the resource to the server. If you use FileZilla, you may encounter the error "**Failed to verify protected resource**"

***

## Start Resource

{% hint style="success" %}
Ensure the resource in server.cfg of your server
{% endhint %}

Make sure to start the resource only after all essential server resources have been started. Follow the example below to **ensure highqez\_headgear**

```
ensure es_extended/qb-core #Don't start above this if you are using ESX OR QB

#Start the HighQez resource here

ensure highqez_headgear

#Start the rest of your resources
```

***

## Resource Items

{% hint style="success" %}
Transfer the item's images from the INSTALL folder of the resource to your server's inventory
{% endhint %}

{% hint style="info" %}
Ensure to add all required **items** to your server
{% endhint %}

<details>

<summary>ESX INVENTORY</summary>

```sql
INSERT INTO `items` (name, label, weight) VALUES
	('headgear','Headgear', 1)
;
```

</details>

<details>

<summary>OX INVENTORY</summary>

```lua
['headgear'] = {
    label = 'Headgear',
    weight = 1,
    stack = false,
    close = true,
},
```

</details>

<details>

<summary>OLD QBCore</summary>

```lua
["headgear"] = {
    ["name"] = "headgear",
    ["label"] = "Headgear",
    ["weight"] = 100,
    ["type"] = "item",
    ["image"] = "headgear.png",
    ["unique"] = false,
    ["useable"] = true,
    ["shouldClose"] = true,
    ["combinable"] = nil,
    ["description"] = "Drivers with long hair are free to ride motorcycles and cars without any restrictions"
},
```

</details>

<details>

<summary>NEW QBCore</summary>

```lua
headgear = {
    name = "headgear",
    label = "Headgear",
    weight = 100,
    type = "item",
    image = "headgear.png",
    unique = false,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = "Drivers with long hair are free to ride motorcycles and cars without any restrictions"
},
```

</details>

***

## Configure Resource

{% hint style="success" %}
Customize the script to suit the specific requirements of your server
{% endhint %}

Open-source files are available for editing the framework function. The main configuration of the resource is provided below.

<details>

<summary>Config File</summary>

```lua
Config = {}

Config.item_name = 'headgear'  -- Use name of item or false to disable it

Config.command = 'headgear'  -- Use command or false to disable it

Config.Peds ={
    [`mp_f_freemode_01`] = {
        componentId = 2, -- 0: Face 1: Mask 2: Hair 3: Torso 4: Leg 5: Parachute / bag 6: Shoes 7: Accessory 8: Undershirt 9: Kevlar 10: Badge 11: Torso 2
        drawableId = 2, -- Item number in clothing menu
        textureId = 0 -- Texture number in clothing menu
    },
    [`mp_m_freemode_01`] = {
        componentId = 2, -- 0: Face 1: Mask 2: Hair 3: Torso 4: Leg 5: Parachute / bag 6: Shoes 7: Accessory 8: Undershirt 9: Kevlar 10: Badge 11: Torso 2
        drawableId = 2, -- Item number in clothing menu
        textureId = 0 -- Texture number in clothing menu
    }
}
```

</details>

***

## Resource API

{% hint style="info" %}
Check out the API page to access all APIs for this resource, which can be very useful for **developers**
{% endhint %}

{% content-ref url="/pages/rnTOitaFaqofzEcUmQf4" %}
[API](/docs/resources/headgear/api.md)
{% endcontent-ref %}

***
