# Install

## Requirements

### SD\_Lib

1. Download the latest release of [SD\_Lib](https://github.com/Samuels-Development/sd_lib/releases).
2. Follow the [Installation & Integration](https://docs.samueldev.shop/overview/library/installation-and-integration) guide from SD\_Lib.

### Target System

1. Download the latest release of the target system of your choice.
2. Follow the installation guide of your target system

<table><thead><tr><th>Target System</th><th data-type="content-ref">Releases</th><th data-type="content-ref">Installation Guide</th></tr></thead><tbody><tr><td>Ox Target</td><td><a href="https://github.com/overextended/ox_target/releases">https://github.com/overextended/ox_target/releases</a></td><td><a href="https://overextended.dev/ox_target">https://overextended.dev/ox_target</a></td></tr><tr><td>QB Target</td><td><a href="https://github.com/qbcore-framework/qb-target">https://github.com/qbcore-framework/qb-target</a></td><td></td></tr></tbody></table>

### xSound (Optional)

*We've added some sounds, but you can only hear them with xSound. (This is not required for the script to work, you just won't hear those).*

1. Download the latest release of [xSound](https://github.com/Xogy/xsound/releases).
2. Add xSound to your *resources* folder.
3. Add the `ensure xsound` to your server.cfg.\
   \&#xNAN;*(Before or after exp\_trainheist shouldn't be an issue)*

## Adding Items

### Images

Here are some images you can use from [bitc0de's items gallery](https://github.com/bitc0de/fivem-items-gallery).

<table data-view="cards"><thead><tr><th data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/files/8w1K7CUMhYxB3tRMVfzk">/files/8w1K7CUMhYxB3tRMVfzk</a></td><td><a href="https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/tools/powersaw.png">https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/tools/powersaw.png</a></td></tr><tr><td><a href="/files/Dthl6jiVWTTQ335sP7Ab">/files/Dthl6jiVWTTQ335sP7Ab</a></td><td><a href="https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/tools/powersaw2.png">https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/tools/powersaw2.png</a></td></tr><tr><td><a href="/files/kuFhVA7KILotj1twH3mA">/files/kuFhVA7KILotj1twH3mA</a></td><td><a href="https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/tools/powersaw3.png">https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/tools/powersaw3.png</a></td></tr><tr><td><a href="/files/iLIKn6K65UKnItTkkJ1Z">/files/iLIKn6K65UKnItTkkJ1Z</a></td><td><a href="https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/materials/gold-ingot.png">https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/materials/gold-ingot.png</a></td></tr><tr><td><a href="/files/ae5IwaPVjagUaH6OVHOc">/files/ae5IwaPVjagUaH6OVHOc</a></td><td><a href="https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/materials/goldingot.png">https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/materials/goldingot.png</a></td></tr><tr><td><a href="/files/Qd3G9QFU60kfII7iVc9I">/files/Qd3G9QFU60kfII7iVc9I</a></td><td><a href="https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/materials/goldbar.png">https://raw.githubusercontent.com/bitc0de/fivem-items-gallery/main/images/materials/goldbar.png</a></td></tr></tbody></table>

### Inventories

#### ox\_inventory

1. Add the following lines to your `ox_inventory/data/items.lua`.

<pre class="language-lua"><code class="lang-lua">```lua
grinder = {
<strong>    label = "Grinder",
</strong>    weight = 1000,
},

gold_ingot = {
    label = "Gold Ingot",
    weight = 1000,
},
```
</code></pre>

2. Choose icon items from the [images](#images) above and save them. You can also get custom ones yourself.
3. Rename the files to `grinder` and `gold_ingot`.
4. Add the files to `ox_inventory/web/images`.

#### esx\_inventory

1. Execute the following lines on your database.

<pre class="language-sql"><code class="lang-sql"><strong>INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
</strong>('grinder', 'Grinder', 1, 0, 1);
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('gold_ingot', 'Gold Ingot', 1, 0, 1);
</code></pre>

2. Choose icon items from the [images](#images) above and save them. You can also get custom ones yourself.
3. Rename the files to `grinder` and `gold_ingot`.
4. Add the files to `esx_inventory/html/img/items`.

#### qb-inventory

1. Add the following lines to your `qb-core/shared/items.lua`.

<pre class="language-lua"><code class="lang-lua">```lua
<strong>grinder = { name = 'grinder', label = 'Grinder', weight = 1000, type = 'item', image = 'grinder.png', unique = true },
</strong>gold_ingot = { name = 'gold_ingot', label = 'Gold Ingot', weight = 1000, type = 'item', image = 'gold_ingot.png', unique = true },```
</code></pre>

2. Choose icon items from the [images](#images) above and save them. You can also get custom ones yourself.
3. Rename the files to `grinder` and `gold_ingot`.
4. Add the files to `qb-inventory/html/images`.

## Starting the resource

1. Add the following line to your `server.cfg`.

```
ensure exp_trainheist
```

2. Restart your server.
3. Enjoy! :rocket:


---

# 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://gtadocs.gta-explore.com/train-heist/install.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.
