# Installation

## Item Installation

{% tabs %}
{% tab title="qb-core/shared/items.lua" %}

```lua
aviator_license = { 
    name = 'aviator_license', 
    label = 'Aviator Licenses', 
    weight = 10, 
    type = 'item', 
    image = 'aviator_license.png', 
    unique = true, 
    useable = true, 
    shouldClose = true, 
    description = '' 
}, 
```

{% endtab %}

{% tab title="ox\_inventory/data/items.lua" %}

```lua
["aviator_license"] = {
    label = "Aviator Licenses",
    weight = 10,
    stack = true,
    close = true,
    client = {
        image = "aviator_license.png",
    }
},
```

{% endtab %}
{% endtabs %}

## Metadata Installation

{% hint style="danger" %}
If you are using **ox\_inventory** or most recent **qb-inventory** ignore this
{% endhint %}

{% tabs %}
{% tab title="qb-inventory/html/app.js" %}

```lua
} else if (itemData.name == "aviator_license") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "<p><strong>Name: </strong><span>" +
        itemData.info.name +
        "</span></p><p><strong>Description: </strong><span>" +
        itemData.info.description +
        "</span></p>"
    );
```

{% endtab %}

{% tab title="qs-inventory/configs/config\_metadata.js" %}

```lua
} else if (itemData.name == "aviator_license") {
    $(".item-info-title").html("<p>" + itemData.label + "</p>");
    $(".item-info-description").html(
        "<p><strong>Name: </strong><span>" +
        itemData.info.name +
        "</span></p><p><strong>Description: </strong><span>" +
        itemData.info.description +
        "</span></p>"
    );
```

{% endtab %}

{% tab title="codem-inventory/config/metadata.js" %}

```lua
} else if (item.name.match("aviator_license")) {
    let infoData = [
        { label: "Name", value: iteminfo.name || "Unknown" },
        { label: "Description", value: iteminfo.description|| "Unknown" },
    ];
returnString = infoData;
```

{% endtab %}

{% tab title="tgiann-inventory/metadata.js" %}

```lua
} else if (
    itemData.name == "aviator_license"
  ) {
    html = `
      <div class="item_info_container">
        <div class="item_info_row">
            <div class="item_info_row_left">Name:</div>
            <div class="item_info_row_right"> ${itemData.info.name}</div>
        </div>
        <div class="item_info_row">
            <div class="item_info_row_left">Description: </div>
            <div class="item_info_row_right"> ${itemData.info.description}</div>
        </div>
      </div>
    `;
```

{% endtab %}
{% endtabs %}

## Database Installation

{% hint style="danger" %}
If you want jump this database installation you can active the option `Config.AutoDatabase`on config.lua file.
{% endhint %}

```sql
CREATE TABLE IF NOT EXISTS `aviator_licenses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `charid` varchar(50) NOT NULL,
  `owner_name` varchar(50) NOT NULL,
  `owner_licenses` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`owner_licenses`)),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;
```

## Jobs Installation

{% hint style="danger" %}
If you are using **ESX** you can active the option `Config.AutoDatabase`on config.lua file and the script run all correctly.
{% endhint %}

{% tabs %}
{% tab title="QBCore (qbcore/shared/jobs.lua)" %}

```lua
['aviator'] = {
	label = 'Aviator',
	grades = { 
		['0'] = { name = 'Recruit'},
		['1'] = { name = 'Teacher' },
		['2'] = { name = 'Boss', isboss = true },
	},
},
```

{% endtab %}

{% tab title="ESX (Database)" %}

```sql
INSERT INTO `jobs` (`name`, `label`, `whitelisted`) 
SELECT 'aviator', 'Aviator', 1 
WHERE NOT EXISTS (SELECT 1 FROM `jobs` WHERE `name` = 'aviator');

INSERT INTO `job_grades` (`job_name`, `grade`, `name`, `label`, `salary`, `skin_male`, `skin_female`) 
SELECT 'aviator', 0, 'recruit', 'Recruit', 500, '{}', '{}' 
WHERE NOT EXISTS (SELECT 1 FROM `job_grades` WHERE `job_name` = 'aviator' AND `grade` = 0);

INSERT INTO `job_grades` (`job_name`, `grade`, `name`, `label`, `salary`, `skin_male`, `skin_female`) 
SELECT 'aviator', 1, 'teacher', 'Teacher', 1000, '{}', '{}' 
WHERE NOT EXISTS (SELECT 1 FROM `job_grades` WHERE `job_name` = 'aviator' AND `grade` = 1);

INSERT INTO `job_grades` (`job_name`, `grade`, `name`, `label`, `salary`, `skin_male`, `skin_female`) 
SELECT 'aviator', 2, 'boss', 'Boss', 2000, '{}', '{}' 
WHERE NOT EXISTS (SELECT 1 FROM `job_grades` WHERE `job_name` = 'aviator' AND `grade` = 2);
```

{% endtab %}
{% endtabs %}


---

# 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://mscripts.gitbook.io/docs/both-framework/scripts/airplane-job/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.
