> For the complete documentation index, see [llms.txt](https://docs.apx-studios.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apx-studios.com/docs/resources/businesses/restaurants/apex-snr-buns/installation.md).

# Installation

### DEPENDENCIES

> **REQUIRED DEPENDENCIES**

<table data-full-width="false"><thead><tr><th>Resource</th><th>Download</th></tr></thead><tbody><tr><td>Apex Library</td><td><a href="https://astudios.tebex.io/package/5541419">Apex Studios Tebex Store</a></td></tr><tr><td>Framework</td><td><a href="https://github.com/qbcore-framework/qb-core">QBCore</a> or <a href="https://github.com/esx-framework/esx_core">ESX</a></td></tr><tr><td>Target</td><td><a href="https://github.com/qbcore-framework/qb-target">qb-target</a> / <a href="https://github.com/overextended/ox_target">ox_target</a></td></tr><tr><td>Menu</td><td><a href="https://github.com/qbcore-framework/qb-menu">qb-menu</a> &#x26; <a href="https://github.com/qbcore-framework/qb-input">qb-input</a> / <a href="https://github.com/overextended/ox_lib">ox_lib</a></td></tr><tr><td>Inventory</td><td><ul><li><a href="https://github.com/qbcore-framework/qb-inventory">qb-inventory</a></li><li><a href="https://github.com/loljoshie/lj-inventory">lj-inventory</a></li><li><a href="https://github.com/Project-Sloth/ps-inventory">ps-inventory</a></li><li><a href="https://github.com/overextended/ox_inventory">ox_inventory</a></li><li><a href="https://buy.quasar-store.com/category/2395209">Quasar Inventory</a></li></ul></td></tr></tbody></table>

> **OPTIONAL DEPENDENCIES**

| Resource | Download                                                                                                                              |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Mapping  | <p><a href="https://store.nopixel.net/category/assets">Nopixel - Crime & Civilian Interior Pack</a><br>(Only in the subscription)</p> |

### RESOURCE INSTALLATION GUIDE

> **1) RESOURCE DOWNLOAD**

{% hint style="info" %}
Download your resource from [FiveM's Keymaster](https://keymaster.fivem.net/asset-grants).
{% endhint %}

> **2) RESOURCE POSITIONING**

{% hint style="info" %}
**You need  to make sure that apex\_lib is always started before any of our scripts!**

```lua
ensure apex_lib
ensure [apex] -- or ensure apex_snrbuns
```

{% endhint %}

> **3) ASSET ADDING**

{% hint style="info" %}

1. Open apex\_snrbuns > assets > inventory\_images
2. Copy files from the folder and add them into your inventory image folder
   {% endhint %}

> **4) ITEM ADDING (QBCORE, ESX & OX)**

{% tabs %}
{% tab title="QBCore" %}
{% hint style="info" %}

```lua
--[FOOD INGREDIENTS]--
['bacon'] 		= {['name'] = 'bacon', 		['label'] = 'Bacon', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'bacon.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Ingredients'},
['beef'] 		= {['name'] = 'beef', 		['label'] = 'Beef', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'beef.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Ingredients'},
['beefraw'] 		= {['name'] = 'beefraw', 	['label'] = 'Raw Beef', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'beefraw.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Ingredients'},
['bun'] 		= {['name'] = 'bun', 		['label'] = 'Buns', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'bun.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Ingredients'},
['cheese'] 		= {['name'] = 'cheese', 	['label'] = 'Cheese Slices', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'cheese.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Ingredients'},
['lettuce'] 		= {['name'] = 'lettuce', 	['label'] = 'Lettuce', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'lettuce.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Ingredients'},
['onionslice'] 		= {['name'] = 'onionslice', 	['label'] = 'Onion Slices', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'onionslice.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Ingredients'},
['tomato'] 		= {['name'] = 'tomato', 	['label'] = 'Tomatos', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'tomato.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Ingredients'},
['frozenfries'] 	= {['name'] = 'frozenfries', 	['label'] = 'Frozen Fries', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'frozenfries.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Ingredients'},
['frozennuggets'] 	= {['name'] = 'frozennuggets', 	['label'] = 'Frozen Nuggets', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'frozennuggets.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Ingredients'},
--[FOOD]--
['fries'] 		= {['name'] = 'fries', 		['label'] = 'French Fries', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'fries.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Food'},
['nuggets'] 		= {['name'] = 'nuggets', 	['label'] = 'Chicken Nuggets', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'nuggets.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Food'},
['onion_rings'] 	= {['name'] = 'onion_rings', 	['label'] = 'Onion Rings', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'onion_rings.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Food'},
['bleeder'] 		= {['name'] = 'bleeder', 	['label'] = 'Bleeder', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'bleeder.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Food'},
['moneyshot'] 		= {['name'] = 'moneyshot', 	['label'] = 'Money Shot', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'moneyshot.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Food'},
['heartstopper'] 	= {['name'] = 'heartstopper', 	['label'] = 'Heart Stopper', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'heartstopper.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Food'},
['torpedo'] 		= {['name'] = 'torpedo', 	['label'] = 'Torpedo', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'torpedo.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Food'},
--[DRINKS]--
['icecream'] 		= {['name'] = 'icecream', 	['label'] = 'Ice Cream', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'icecream.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Drink'},   
['creamy'] 		= {['name'] = 'creamy', 	['label'] = 'Creamy', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'creamy.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Drink'},    
['milkshake'] 		= {['name'] = 'milkshake', 	['label'] = 'Milkshake', 	['weight'] = 10, ['type'] = 'item', ['image'] = 'milkshake.png', 	['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Drink'},   
['soda'] 		= {['name'] = 'soda', 		['label'] = 'Soda', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'soda.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Drink'}, 
```

{% endhint %}
{% endtab %}

{% tab title="ESX" %}
{% hint style="info" %}

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('bacon', 'Bacon', 10, 0, 1),
('beef', 'Beef', 10, 0, 1),
('beefraw', 'Raw Beef', 10, 0, 1),
('bun', 'Buns', 10, 0, 1),
('cheese', 'Cheese Slices', 10, 0, 1),
('lettuce', 'Lettuce', 10, 0, 1),
('onionslice', 'Onion Slices', 10, 0, 1),
('tomato', 'Tomatos', 10, 0, 1),
('frozenfries', 'Frozen Fries', 10, 0, 1),
('frozennuggets', 'Frozen Nuggets', 10, 0, 1),
('fries', 'French Fries', 10, 0, 1),
('nuggets', 'Chicken Nuggets', 10, 0, 1),
('onion_rings', 'Onion Rings', 10, 0, 1),
('bleeder', 'Bleeder', 10, 0, 1),
('moneyshot', 'Money Shot', 10, 0, 1),
('heartstopper', 'Heart Stopper', 10, 0, 1),
('torpedo', 'Torpedo', 10, 0, 1),
('icecream', 'Ice Cream', 10, 0, 1),
('creamy', 'Creamy', 10, 0, 1),
('milkshake', 'Milkshake', 10, 0, 1),
('soda', 'Soda', 10, 0, 1);
```

{% endhint %}
{% endtab %}

{% tab title="OX" %}
{% hint style="info" %}

```lua
['bacon']         = {
    label = "Bacon",
    weight = 5,
    stack= true,
    close = false,
    description = "Ingredients",
        image = "bacon.png",
},
["beef"] = {
    label = "Beef",
    weight = 5,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "beef.png",
    }
},
["beefraw"] = {
    label = "Beefraw",
    weight = 5,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "beefraw.png",
    }
},
["bun"] = {
    label = "Buns",
    weight = 1,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "bun.png",
    }
},
["cheese"] = {
    label = "Cheese",
    weight = 1,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "cheese.png",
    }
},
["lettuce"] = {
    label = "Lettuce",
    weight = 1,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "lettuce.png",
    }
},
["onionslice"] = {
    label = "Onion Slices",
    weight = 1,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "onionslice.png",
    }
},
["tomato"] = {
    label = "Tomato",
    weight = 1,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "tomato.png",
    }
},
["frozenfries"] = {
    label = "Frozen Fries",
    weight = 5,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "frozenfries.png",
    }
},
["frozennuggets"] = {
    label = "Frozen Nuggets",
    weight = 5,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "frozennuggets.png",
    }
},
--[FOOD]--
["fries"] = {
    label = "French Fries",
    weight = 5,
    stack = true,
    close = true,
    description = "French Fries",
    client = {
        image = "fries.png",
    }
},
["nuggets"] = {
    label = "Chicken Nuggets",
    weight = 5,
    stack = true,
    close = true,
    description = "Chicken Nuggets",
    client = {
        image = "frozennuggets.png",
    }
},
["onion_rings"] = {
    label = "Onion Rings",
    weight = 5,
    stack = true,
    close = true,
    description = "Onion Rings",
    client = {
        image = "onion_rings.png",
    }
},
["bleeder"] = {
    label = "Bleeder",
    weight = 5,
    stack = true,
    close = true,
    description = "A Bleeder",
    client = {
        image = "bleeder.png",
    }
},
["moneyshot"] = {
    label = "Money Shot",
    weight = 5,
    stack = true,
    close = true,
    description = "A Moneyshot",
    client = {
        image = "moneyshot.png",
    }
},
["heartstopper"] = {
    label = "Heart Stopper",
    weight = 5,
    stack = true,
    close = true,
    description = "A Heartstopper",
    client = {
        image = "heartstopper.png",
    }
},
["torpedo"] = {
    label = "Frozen Nuggets",
    weight = 5,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "torpedo.png",
    }
},
--[DRINKS]--
["icecream"] = {
    label = "Ice Cream",
    weight = 5,
    stack = true,
    close = true,
    description = "Ice Cream",
    client = {
        image = "icecream.png",
    }
},
["creamy"] = {
    label = "Creamy",
    weight = 5,
    stack = true,
    close = true,
    description = "A Creamy",
    client = {
        image = "creamy.png",
    }
},
["milkshake"] = {
    label = "milkshake",
    weight = 5,
    stack = true,
    close = true,
    description = "A Milkshake",
    client = {
        image = "milkshake.png",
    }
},
["soda"] = {
    label = "Soda",
    weight = 5,
    stack = true,
    close = true,
    description = "Ingredients",
    client = {
        image = "soda.png",
    }
},
```

{% endhint %}
{% endtab %}
{% endtabs %}

> **5) JOB ADDING**

{% tabs %}
{% tab title="QBCore" %}
{% hint style="info" %}

```lua
['snrbuns'] = {
    label = 'Snr Buns',
    defaultDuty = true,
    offDutyPay = false,
    grades = {
        ['0'] = {
            name = 'Helper',
            payment = 30
        },
        ['1'] = {
            name = 'Delivery',
            payment = 40
        },
        ['2'] = {
            name = 'Cook',
            payment = 50
        },
        ['3'] = {
            name = 'Manager',
            payment = 60,
            isboss = true
        },
    },
},
```

{% endhint %}
{% endtab %}

{% tab title="ESX" %}
{% hint style="info" %}

```sql
INSERT INTO `jobs` (name, label) VALUES
('snrbuns', 'Snr Buns');

INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
('snrbuns', 0, 'helper', 'Helper', 30, '{}', '{}'),
('snrbuns', 1, 'delivery', 'Delivery', 40, '{}', '{}'),
('snrbuns', 2, 'cook', 'Cook', 60, '{}', '{}'),
('snrbuns', 3, 'boss', 'Manager', 60, '{}', '{}');
```

{% endhint %}
{% endtab %}
{% endtabs %}

> **6) CONSUMABLES**

{% tabs %}
{% tab title="qb-smallresources" %}
{% hint style="info" %}

<pre class="language-lua"><code class="lang-lua">Config.ConsumablesDrink = {
    ["icecream"] = math.random(40, 80),
    ["creamy"] = math.random(40, 80),
    ["milkshake"] = math.random(40, 80),
    ["soda"] = math.random(40, 80),
}

Config.ConsumablesEat = {
    ["fries"] = math.random(80, 100),
    ["nuggets"] = math.random(80, 100),
    ["onion_rings"] = math.random(80, 100),
    ["bleeder"] = math.random(80, 100),
    ["moneyshot"] = math.random(80, 100),
<strong>    ["heartstopper"] = math.random(80, 100),
</strong>    ["torpedo"] = math.random(80, 100),
}
</code></pre>

{% endhint %}
{% endtab %}

{% tab title="jim-consumables" %}
{% hint style="info" %}
With jim-consumables, it is a little different, you'll have to find this: **Consumables = {}** in the config file add the following into it.

If you are not able to get it working, ask **jimathy** for help

```lua
["icecream"] = {
	emote = "drink", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "drink",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(0,0), thirst = math.random(40, 80),
	},
},
["creamy"] = {
	emote = "drink", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "drink",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(0,0), thirst = math.random(40, 80),
	},
},
["milkshake"] = {
	emote = "drink", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "drink",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(0,0), thirst = math.random(40, 80),
	},
},
["soda"] = {
	emote = "drink", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "drink",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(0,0), thirst = math.random(40, 80),
	},
},

["fries"] = {
	emote = "eat", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "food",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(80,100), thirst = math.random(0, 0),
	},
},
["nuggets"] = {
	emote = "eat", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "food",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(80,100), thirst = math.random(0, 0),
	},
},
["onion_rings"] = {
	emote = "eat", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "food",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(80,100), thirst = math.random(0, 0),
	},
},
["bleeder"] = {
	emote = "eat", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "food",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(80,100), thirst = math.random(0, 0),
	},
},
["moneyshot"] = {
	emote = "eat", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "food",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(80,100), thirst = math.random(0, 0),
	},
},
["heartstopper"] = {
	emote = "eat", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "food",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(80,100), thirst = math.random(0, 0),
	},
},
["torpedo"] = {
	emote = "eat", time = math.random(5000, 6000), stress = math.random(1, 2), heal = 0, armor = 5, type = "food",
	stats = {
		screen = "", effect = "heal", time = 10000, amount = 2,
		hunger = math.random(80,100), thirst = math.random(0, 0),
	},
},
```

{% endhint %}
{% endtab %}
{% endtabs %}
