# :icon-book: Installation

This guide will walk you through installing **ox_inventory** along with **of_inv_extension**, our custom extension that adds additional functionality on top of the base inventory.

### 1. Install dependencies

Before installing ox_inventory, make sure the following resources are installed and running:

- **oxmysql** — handles all database operations
- **ox_lib** — required utility library
- **ox_target** *(optional)* — enables enhanced item targeting

[!ref](/ox_inventory/dependencies.md)

### 2. Download ox_inventory

Head to [Portal CFX](https://portal.cfx.re/) and search for **ox_inventory**. Download the latest version and extract it into your server's `resources` folder.

### 3. Download of_inv_extension

In the same [Portal CFX](https://portal.cfx.re/), download **of_inv_extension** and extract it into your `resources` folder as well.

### 4. Configure server.cfg

Open your `server.cfg` and ensure the resources in the following order. **of_inv_extension must come after ox_inventory.**

+++ server.cfg
```cfg
ensure oxmysql
ensure ox_lib
ensure your_framework   # e.g. qb-core, es_extended, qbx_core

ensure ox_inventory
ensure of_inv_extension  # <-- Must be after ox_inventory
```
+++

### 5. Configure convars *(optional)*

You can customize inventory capacity by adding these convars to your `server.cfg`:

+++ server.cfg
```cfg
setr inventory:slots 50           # Inventory slots per player
setr inventory:weight 30000       # Max carry weight in grams
setr inventory:dropslots 50       # Drop inventory slots
setr inventory:dropweight 30000   # Max drop weight in grams

setr inventory:police ["police", "sheriff"]
```
+++

### 6. Start the server

Start your server and verify that both resources loaded without errors. You should see output similar to this in the console:

```
[ script:ox_inventory] ox_inventory initialized successfully
[script:of_inv_extension] [Overflow] of_inv_extension loaded successfully
```

If you see any dependency errors, double-check the ensure order in your `server.cfg`.
