# 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="api" %}
[api](https://highqez.gitbook.io/docs/resources/headgear/api)
{% endcontent-ref %}

***


---

# 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://highqez.gitbook.io/docs/resources/headgear/installation.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.
