---
description: Find information on configuring for OX_Inventory
---

# Item Support

{% hint style="info" %}
Please note that your resource folder should be named 'smartdrone' for our exports to work properly
{% endhint %}

## ESX Item Support

Firstly, head to the config.lua file and enable ESX in the config. Next, run the following SQL into your ESX database to add the item:

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('drone1', 'Drone 1', 1, 0, 1);

INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('drone2', 'Drone 2', 1, 0, 1);
```

## QB-Core Item Support

Firstly, head to the config.lua file and enable QBCore in the config. Next, add the following line of code into your **qb-core/shared/items.lua** file:

```
['drone1']   = {
    ['name'] = 'drone1',                             
    ['label'] = 'Drone 1',              
    ['weight'] = 1500,         
    ['type'] = 'item',         
    ['image'] = nil,                   
    ['unique'] = false,         
    ['useable'] = true,     
    ['shouldClose'] = true,      
    ['combinable'] = nil,   
    ['description'] = 'Drone 1'
},

['drone2']   = {
    ['name'] = 'drone2',                             
    ['label'] = 'Drone 2',              
    ['weight'] = 1500,         
    ['type'] = 'item',         
    ['image'] = nil,                   
    ['unique'] = false,         
    ['useable'] = true,     
    ['shouldClose'] = true,      
    ['combinable'] = nil,   
    ['description'] = 'Drone 2'
},
```

Feel free to adjust the various item settings depending on your server requirements!



## vRP Inventory Support

Firstly, head to the config.lua file and enable vRP in the config. Next, add the following line of code into your **vrp/cfg/items.lua** file:

```
["drone1"] = {"Drone1","Drone 1",function(args) return droneGen("drone1") end,0.1},
["drone2"] = {"Drone2","Drone 2",function(args) return droneGen("drone2") end,0.1},
 
 
local function droneGen(itemName)
  local fgen = function(args)
    choices["Use"] = {function(player,choice)
      local user_id = vRP.getUserId(player)
      if user_id ~= nil then
        TriggerEvent("Server:DroneItem", player, itemName)
      end
    end}
 
    return choices
  end
 
  return fgen
end
```



## Quasar Inventory Support

Add the following to Quasar Inventory:

```
['drone1'] = {
    name = 'drone1',
    label = 'Drone 1',
    weight = 5,
    type = 'item',
    unique = true,
    useable = true,
    description = 'Drone 1',
    client = {
        export = 'smartdrone.inventorySetupDrone1',
        removeAfterUse = true,
    },
},

['drone2'] = {
    name = 'drone2',
    label = 'Drone 2',
    weight = 5,
    type = 'item',
    unique = true,
    useable = true,
    description = 'Drone 2',
    client = {
        export = 'smartdrone.inventorySetupDrone2',
        removeAfterUse = true,
    },
},

```

## OX Inventory Support

The following code needs to be added into **ox\_inventory/data/items.lua** within your OX\_Inventory resource:

```lua
['drone1'] = {
        label = 'Drone 1',
        weight = 220,
        server = {
            export = 'smartdrone.OxUseSmartDrone',
        },
},

['drone2'] = {
        label = 'Drone 2',
        weight = 220,
        server = {
            export = 'smartdrone.OxUseSmartDrone',
        },
},
```

## Core Inventory Support

Core Inventory support is built into the resource. To start, head to the config.lua file and enable Core Inventory support within the resource.

We've done the rest for you and ensured that our Core Inventory support works for QBCore or ESX servers, so make sure you've also enabled QBCore or ESX within the config.lua file.
