> For the complete documentation index, see [llms.txt](https://joaos-organization-3.gitbook.io/jpresources-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://joaos-organization-3.gitbook.io/jpresources-documentation/installation/inventory/installation-page/qbcore.md).

# QBCore

Installation guide

## Download Resource

You will receive the script in [`keymaster.fivem.net`](https://keymaster.fivem.net/asset-grants) profile, after this click in blue "download" button.

After download, put the script in your server files.

{% hint style="warning" %}
Remeber:

You need to be logged with the same cfx.re account you used to buy in my tebex store.
{% endhint %}

## Dependencies Part

* [**qb-core**](https://github.com/qbcore-framework/qb-core)

Download all the scripts by clicking on their respective names, put them in the server files and start server.cfg

## Webhooks

Inventory uses webhooks for logs system.\
All you need to do is replace the default webhooks, via config.lua

<figure><img src="https://3317815405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAcw6nAW8IGe15skCfMoj%2Fuploads%2FqXyuFXGhSrUrXQ7PfV4f%2F123.png?alt=media&amp;token=0000cc98-f325-4015-8006-d66eb3021114" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
For more info how to create a discord webhook follow this tutorial:\
<https://www.youtube.com/watch?v=fKksxz2Gdnc&t=7s&ab_channel=NoIntroTutorials>
{% endhint %}

## SQL

You only need to execute SQL file attached to inventory folder.

{% hint style="danger" %}
This is mandatory to avoid errors
{% endhint %}

## Config.lua

Setup all config.lua to your needs, read all comments in green color to be more easier.

{% hint style="danger" %}
**VERY IMPORTANT**\
\
If you are on **LATEST QBCore versions**, you need to set:

```lua
Config.LatestQBCoreVersions = true
```

{% endhint %}

## Adjust images

To edit/change images, only need to follow this directory: jpr-inventario - html - images.\
To change item image, put an image and rename to item name.

## Replacing Exports/Events

In order to use inventory, you need to replace all exports from **qb-inventory** to **jpr-inventory** otherwise you will have errors.

{% embed url="<https://drive.google.com/file/d/1IC8OIOjdilxXNw_8VJ1Vmbj5xuT8lUrA/view?usp=sharing>" %}
How to replace all exports ( fastest way ).
{% endembed %}

{% hint style="danger" %}
This is mandatory otherwise the inventory will show errors in console
{% endhint %}

## Backpack Part

{% tabs %}
{% tab title="Old QBCore Versions" %}
Go to `qb-core, shared, items.lua`, replace **phone item** line to this ones:

```lua
['smallbackpack'] 				 = {['name'] = 'smallbackpack', 			  	  	['label'] = 'Small Backpack', 				['weight'] = 5000, 		['type'] = 'item', 		['image'] = 'smallbackpack.png', 		['unique'] = true, 	['useable'] = true, 	['shouldClose'] = false,	   ['combinable'] = nil,   ['description'] = 'Small backpack'},
['mediumbackpack'] 				 = {['name'] = 'mediumbackpack', 			  	  	['label'] = 'Medium Backpack', 				['weight'] = 6000, 		['type'] = 'item', 		['image'] = 'mediumbackpack.png', 		['unique'] = true, 	['useable'] = true, 	['shouldClose'] = false,	   ['combinable'] = nil,   ['description'] = 'Medium backpack'},
['reinforcedbackpack'] 				 = {['name'] = 'reinforcedbackpack', 			  	  	['label'] = 'Reinforced Backpack', 				['weight'] = 7000, 		['type'] = 'item', 		['image'] = 'reinforcedbackpack.png', 		['unique'] = true, 	['useable'] = true, 	['shouldClose'] = false,	   ['combinable'] = nil,   ['description'] = 'Reinforced backpack'},
['bigbackpack'] 				 = {['name'] = 'bigbackpack', 			  	  	['label'] = 'Big Backpack', 				['weight'] = 8000, 		['type'] = 'item', 		['image'] = 'bigbackpack.png', 		['unique'] = true, 	['useable'] = true, 	['shouldClose'] = false,	   ['combinable'] = nil,   ['description'] = 'Big backpack'},
```

{% endtab %}

{% tab title="New QBCore Versions" %}
Go to `qb-core, shared, items.lua`, replace **phone item** line to this ones:

```lua
smallbackpack = { name = 'smallbackpack', label = 'Small Backpack', weight = 5000, type = 'item', image = 'smallbackpack.png', unique = true, useable = true, shouldClose = false, combinable = nil, description = 'Small backpack' }, 
mediumbackpack = { name = 'mediumbackpack', label = 'Medium Backpack', weight = 6000, type = 'item', image = 'mediumbackpack.png', unique = true, useable = true, shouldClose = false, combinable = nil, description = 'Medium backpack' }, 
reinforcedbackpack = { name = 'reinforcedbackpack', label = 'Reinforced Backpack', weight = 7000, type = 'item', image = 'reinforcedbackpack.png', unique = true, useable = true, shouldClose = false, combinable = nil, description = 'Reinforced backpack' }, 
bigbackpack = { name = 'bigbackpack', label = 'Big Backpack', weight = 8000, type = 'item', image = 'bigbackpack.png', unique = true, useable = true, shouldClose = false, combinable = nil, description = 'Big backpack' }, 
```

{% endtab %}
{% endtabs %}

## Last check

Now, only rest to see fxmanifest.lua, open it and confirm the name of scripts, if they are different adjust to your script names.

{% hint style="info" %}
If you use original QBCore base/scripts you can skip this
{% endhint %}

{% hint style="success" %}
All good.\
Be happy with the script !
{% endhint %}

<figure><img src="https://3317815405-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAcw6nAW8IGe15skCfMoj%2Fuploads%2F4bz1Hgy6vZTRx2LGvNmE%2Finventory_new.jpg?alt=media&amp;token=cc19a3cb-9de6-4960-a3c2-dc3964041cde" alt=""><figcaption></figcaption></figure>
