# İtems and Job

## &#x20;🧱 Items & Jobs Setup

## Required Item

All items used in recipes must be registered in your inventory system.

```
### Material Items

| Item Name | Label | Used In |
|-----------|-------|---------|
| `iron` | Iron | Workbench, Weapon |
| `plastic` | Plastic | Workbench |
| `electronic` | Electronic | Workbench |
| `copper` | Copper | Workbench |
| `rubber` | Rubber | Workbench, Weapon |
| `gunpowder` | Gunpowder | Weapon |
| `steel` | Steel | Weapon |
| `spring` | Spring | Weapon |
| `bread` | Bread | Cooking |
| `meat` | Meat | Cooking |
| `lettuce` | Lettuce | Cooking |
| `cheese` | Cheese | Cooking |
```

```

### Result Items

| Item Name | Label | Category |
|-----------|-------|----------|
| `lockpick` | Lockpick | Workbench |
| `radio` | Radio | Workbench |
| `repairkit` | Repair Kit | Workbench |
| `hamburger` | Hamburger | Cooking |
| `sandwich` | Sandwich | Cooking |
| `pistol_ammo` | Pistol Ammo | Weapon |
```

```
### Special Items

| Item Name | Label | Purpose |
|-----------|-------|---------|
| `toolkit` | Toolkit | Required to open weapon bench |
| `blueprint_pistol` | Pistol Blueprint | Required to craft pistol |
```

### QB Core Item Registration

````
### qb-core/shared/items.lua

```lua
-- Materials
['iron']        = { name = 'iron',        label = 'Iron',        weight = 100, type = 'item', image = 'iron.png',        unique = false, useable = false, shouldClose = true, description = 'Iron material' },
['plastic']     = { name = 'plastic',     label = 'Plastic',     weight = 50,  type = 'item', image = 'plastic.png',     unique = false, useable = false, shouldClose = true, description = 'Plastic material' },
['electronic']  = { name = 'electronic',  label = 'Electronic',  weight = 80,  type = 'item', image = 'electronic.png',  unique = false, useable = false, shouldClose = true, description = 'Electronic component' },
['copper']      = { name = 'copper',      label = 'Copper',      weight = 100, type = 'item', image = 'copper.png',      unique = false, useable = false, shouldClose = true, description = 'Copper material' },
['rubber']      = { name = 'rubber',      label = 'Rubber',      weight = 80,  type = 'item', image = 'rubber.png',      unique = false, useable = false, shouldClose = true, description = 'Rubber material' },
['gunpowder']   = { name = 'gunpowder',   label = 'Gunpowder',   weight = 100, type = 'item', image = 'gunpowder.png',   unique = false, useable = false, shouldClose = true, description = 'Gunpowder' },
['steel']       = { name = 'steel',       label = 'Steel',       weight = 200, type = 'item', image = 'steel.png',       unique = false, useable = false, shouldClose = true, description = 'Steel material' },
['spring']      = { name = 'spring',      label = 'Spring',      weight = 50,  type = 'item', image = 'spring.png',      unique = false, useable = false, shouldClose = true, description = 'Metal spring' },

-- Food
['bread']       = { name = 'bread',       label = 'Bread',       weight = 50,  type = 'item', image = 'bread.png',       unique = false, useable = true,  shouldClose = true, description = 'Fresh bread' },
['meat']        = { name = 'meat',        label = 'Meat',        weight = 200, type = 'item', image = 'meat.png',        unique = false, useable = false, shouldClose = true, description = 'Raw meat' },
['lettuce']     = { name = 'lettuce',     label = 'Lettuce',     weight = 30,  type = 'item', image = 'lettuce.png',     unique = false, useable = false, shouldClose = true, description = 'Fresh lettuce' },
['cheese']      = { name = 'cheese',      label = 'Cheese',      weight = 50,  type = 'item', image = 'cheese.png',      unique = false, useable = false, shouldClose = true, description = 'Cheese slice' },

-- Craft Results
['lockpick']    = { name = 'lockpick',    label = 'Lockpick',    weight = 200, type = 'item', image = 'lockpick.png',    unique = false, useable = true,  shouldClose = true, description = 'Used to pick locks' },
['radio']       = { name = 'radio',       label = 'Radio',       weight = 500, type = 'item', image = 'radio.png',       unique = true,  useable = true,  shouldClose = true, description = 'Communication device' },
['repairkit']   = { name = 'repairkit',   label = 'Repair Kit',  weight = 1000,type = 'item', image = 'repairkit.png',   unique = false, useable = true,  shouldClose = true, description = 'Vehicle repair kit' },
['hamburger']   = { name = 'hamburger',   label = 'Hamburger',   weight = 200, type = 'item', image = 'hamburger.png',   unique = false, useable = true,  shouldClose = true, description = 'Delicious hamburger' },
['sandwich']    = { name = 'sandwich',    label = 'Sandwich',    weight = 150, type = 'item', image = 'sandwich.png',    unique = false, useable = true,  shouldClose = true, description = 'Quick snack' },
['pistol_ammo'] = { name = 'pistol_ammo', label = 'Pistol Ammo', weight = 300, type = 'item', image = 'pistol_ammo.png', unique = false, useable = true,  shouldClose = true, description = '12 rounds of pistol ammo' },

-- Blueprints & Tools
['blueprint_pistol'] = { name = 'blueprint_pistol', label = 'Pistol Blueprint', weight = 100, type = 'item', image = 'blueprint_pistol.png', unique = true, useable = true, shouldClose = true, description = 'Blueprint for crafting a pistol' },
['toolkit']     = { name = 'toolkit',     label = 'Toolkit',     weight = 1000,type = 'item', image = 'toolkit.png',     unique = false, useable = false, shouldClose = true, description = 'Required for weapon crafting' }
````

### ESX Item Registration

#### Database SQL

```
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('iron', 'Iron', 1, 0, 1),
('plastic', 'Plastic', 1, 0, 1),
('electronic', 'Electronic', 1, 0, 1),
('copper', 'Copper', 1, 0, 1),
('rubber', 'Rubber', 1, 0, 1),
('gunpowder', 'Gunpowder', 1, 0, 1),
('steel', 'Steel', 1, 0, 1),
('spring', 'Spring', 1, 0, 1),
('bread', 'Bread', 1, 0, 1),
('meat', 'Meat', 1, 0, 1),
('lettuce', 'Lettuce', 1, 0, 1),
('cheese', 'Cheese', 1, 0, 1),
('lockpick', 'Lockpick', 1, 0, 1),
('radio', 'Radio', 1, 0, 1),
('repairkit', 'Repair Kit', 1, 0, 1),
('hamburger', 'Hamburger', 1, 0, 1),
('sandwich', 'Sandwich', 1, 0, 1),
('pistol_ammo', 'Pistol Ammo', 1, 0, 1),
('blueprint_pistol', 'Pistol Blueprint', 1, 0, 1),
('toolkit', 'Toolkit', 1, 0, 1);
```

### ox\_inventory Item Registration

#### data/items.lua

```
['iron']        = { label = 'Iron',              weight = 100,  stack = true,  close = true, description = 'Iron material' },
['plastic']     = { label = 'Plastic',           weight = 50,   stack = true,  close = true, description = 'Plastic material' },
['electronic']  = { label = 'Electronic',        weight = 80,   stack = true,  close = true, description = 'Electronic component' },
['copper']      = { label = 'Copper',            weight = 100,  stack = true,  close = true, description = 'Copper material' },
['rubber']      = { label = 'Rubber',            weight = 80,   stack = true,  close = true, description = 'Rubber material' },
['gunpowder']   = { label = 'Gunpowder',         weight = 100,  stack = true,  close = true, description = 'Gunpowder' },
['steel']       = { label = 'Steel',             weight = 200,  stack = true,  close = true, description = 'Steel material' },
['spring']      = { label = 'Spring',            weight = 50,   stack = true,  close = true, description = 'Metal spring' },
['bread']       = { label = 'Bread',             weight = 50,   stack = true,  close = true, description = 'Fresh bread' },
['meat']        = { label = 'Meat',              weight = 200,  stack = true,  close = true, description = 'Raw meat' },
['lettuce']     = { label = 'Lettuce',           weight = 30,   stack = true,  close = true, description = 'Fresh lettuce' },
['cheese']      = { label = 'Cheese',            weight = 50,   stack = true,  close = true, description = 'Cheese slice' },
['lockpick']    = { label = 'Lockpick',          weight = 200,  stack = true,  close = true, description = 'Used to pick locks' },
['radio']       = { label = 'Radio',             weight = 500,  stack = false, close = true, description = 'Communication device' },
['repairkit']   = { label = 'Repair Kit',        weight = 1000, stack = true,  close = true, description = 'Vehicle repair kit' },
['hamburger']   = { label = 'Hamburger',         weight = 200,  stack = true,  close = true, description = 'Delicious hamburger' },
['sandwich']    = { label = 'Sandwich',          weight = 150,  stack = true,  close = true, description = 'Quick snack' },
['pistol_ammo'] = { label = 'Pistol Ammo',       weight = 300,  stack = true,  close = true, description = '12 rounds' },
['blueprint_pistol'] = { label = 'Pistol Blueprint', weight = 100, stack = false, close = true, description = 'Blueprint for crafting a pistol' },
['toolkit']     = { label = 'Toolkit',           weight = 1000, stack = true,  close = true, description = 'Required for weapon crafting' },
```

### Job Setup

#### weapondealer Job (QBCore)

Add to `qb-core/shared/jobs.lua`:

```
['weapondealer'] = {
    label = 'Weapon Dealer',
    defaultDuty = true,
    offDutyPay = false,
    grades = {
        ['0'] = { name = 'Apprentice', payment = 100 },
        ['1'] = { name = 'Dealer',     payment = 200 },
        ['2'] = { name = 'Master',     payment = 350 },
        ['3'] = { name = 'Boss', isboss = true, payment = 500 },
    },
},
```

Give job to player:

```
/setjob [player_id] weapondealer 0
```

#### weapondealer Job (ESX)

Run in your database:

```
INSERT INTO `jobs` (`name`, `label`) VALUES ('weapondealer', 'Weapon Dealer');

INSERT INTO `job_grades` (`job_name`, `grade`, `name`, `label`, `salary`, `skin_male`, `skin_female`) VALUES
('weapondealer', 0, 'apprentice', 'Apprentice', 100, '{}', '{}'),
('weapondealer', 1, 'dealer',     'Dealer',     200, '{}', '{}'),
('weapondealer', 2, 'master',     'Master',     350, '{}', '{}'),
('weapondealer', 3, 'boss',       'Boss',       500, '{}', '{}');
```

Give job to player:

```
/setjob [player_id] weapondealer 0
```

**Tip:** Set `job = nil` and `needItem = nil` in `config/tables.lua` to remove all restrictions from a craft table.


---

# 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://elena-scripts.gitbook.io/elenascripts/gameplay/craft-system/items-and-job.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.
