> 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-cat-cafe/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  | [Gabz](https://fivem.gabzv.com/package/4724734) Recommend / Whatever you want |

### 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_catcafe
```

{% endhint %}

> **3) ASSET ADDING**

{% hint style="info" %}

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

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

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

```lua
--[FOOD INGREDIENTS]--
sugar                        = { name = 'sugar', label = 'Sugar', weight = 10, type = "item", image = 'sugar.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
cocoa_powder                 = { name = 'cocoa_powder', label = 'Cocoa Powder', weight = 10, type = 'item', image = 'cocoa_powder.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
milk 		                 = { name = 'milk', label = 'Milk', weight = 10, type = 'item', image = 'soda.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
noodles 		             = { name = 'noodles', label = 'Noodles', weight = 10, type = 'item', image = 'noodles.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
onion 		                 = { name = 'onion', label = 'Onion', weight = 10, type = 'item', image = 'onion.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
butter 		                 = { name = 'butter', label = 'Butter', weight = 10, type = 'item', image = 'butter.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
chicken_fillet               = { name = 'chicken_fillet', label = 'Chicken Fillet', weight = 10, type = 'item', image = 'chicken_fillet.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
tofu 		                 = { name = 'tofu', label = 'Tofu', weight = 10, type = 'item', image = 'tofu.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
rice 		                 = { name = 'rice', label = 'Rice', weight = 10, type = 'item', image = 'rice.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
fish 		                 = { name = 'fish', label = 'Fish', weight = 10, type = 'item', image = 'fish.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
flour 		                 = { name = 'flour', label = 'Flour', weight = 10, type = 'item', image = 'flour.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
egg 		                 = { name = 'egg', label = 'Egg', weight = 10, type = 'item', image = 'eggs.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
orange_dye 		             = { name = 'orange_dye', label = 'Orange Dye', weight = 10, type = 'item', image = 'orange_dye.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Food Dye'},
green_dye 		             = { name = 'green_dye', label = 'Green Dye', weight = 10, type = 'item', image = 'green_dye.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Food Dye'},
pink_dye 		             = { name = 'pink_dye', label = 'Pink Dye', weight = 10, type = 'item', image = 'pink_dye.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Food Dye'},
turquoise_dye 	             = { name = 'turquoise_dye', label = 'Turquoise Dye', weight = 10, type = 'item', image = 'turquoise_dye.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Food Dye'},
bakingsoda 		             = { name = 'bakingsoda', label = 'Baking Soda', weight = 10, type = 'item', image = 'bakingsoda.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Ingredients'},
--[FOOD]--
orangemacaroon 	             = { name = 'orangemacaroon', label = 'Orange Macaroon', weight = 30, type = 'item', image = 'orangemacaroon.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Orange Macaroon'},
greenmacaroon 	             = { name = 'greenmacaroon', label = 'Green Macaroon', weight = 30, type = 'item', image = 'greenmacaroon.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Green Macaroon'},
pinkmacaroon 	             = { name = 'pinkmacaroon', label = 'Pink Macaroon', weight = 30, type = 'item', image = 'pinkmacaroon.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Pink Macaroon'},
turquoisemacaroon 	         = { name = 'turquoisemacaroon', label = 'Turquoise Macaroon', weight = 30, type = 'item', image = 'turquoisemacaroon.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Turquoise Macaroon'},
cookie 		                 = { name = 'cookie', label = 'Cookie', weight = 30, type = 'item', image = 'cookie.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Cookie'},
cupcake 		             = { name = 'cupcake', label = 'Cupcake', weight = 30, type = 'item', image = 'cupcake.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Cupcake'},
donut 		                 = { name = 'donut', label = 'Donut', weight = 30, type = 'item', image = 'donut.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Donut'},
chocosandwich 	             = { name = 'chocosandwich', label = 'Choco Sandwich', weight = 30, type = 'item', image = 'chocosandwich.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Choco Sandwich'},
pancake 		             = { name = 'pancake', label = 'Pancake', weight = 30, type = 'item', image = 'pancake.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Pancake'},
chickennoodlesoup            = { name = 'chickennoodlesoup', label = 'Chicken Noodle Soup', weight = 30, type = 'item', image = 'chickennoodlesoup.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Chicken Noodle Soup'},
misosoup 		             = { name = 'misosoup', label = 'Miso Soup', weight = 30, type = 'item', image = 'misosoup.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Miso Soup'},
sushi 		                 = { name = 'sushi', label = 'Sushi', weight = 10, type = 'item', image = 'sushi.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Food'},
--[DRINKS]--
brewedcoffee 	             = { name = 'brewedcoffee', label = 'Brewed Coffee', weight = 10, type = 'item', image = 'brewedcoffee.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Brewed Coffee Drink'},
hotchocolade 	             = { name = 'hotchocolade', label = 'Hot Chocolate', weight = 30, type = 'item', image = 'hotchocolade.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Hot Chocolate Drink'},
latte 		                 = { name = 'latte', label = 'Latte', weight = 30, type = 'item', image = 'latte.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Latte Drink'},
matchatea 		             = { name = 'matchatea', label = 'Matcha Tea', weight = 30, type = 'item', image = 'matchatea.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Matcha Tea Drink'},
bubbletea 		             = { name = 'bubbletea', label = 'Bubble Tea', weight = 30, type = 'item', image = 'bubbletea.png', unique = false, useable = true, shouldClose = true, combinable = nil, description = 'Bubble Tea Drink'},
```

{% endhint %}
{% endtab %}

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

```sql
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('sugar', 'Sugar', 10, 0, 1),
('cocoa_powder', 'Cocoa Powder', 10, 0, 1),
('milk', 'Milk', 10, 0, 1),
('noodles', 'Noodles', 10, 0, 1),
('onion', 'Onion', 10, 0, 1),
('butter', 'Butter', 10, 0, 1),
('chicken_fillet', 'Chicken Fillet', 10, 0, 1),
('tofu', 'Tofu', 10, 0, 1),
('rice', 'rice', 10, 0, 1),
('fish', 'Fish', 10, 0, 1),
('flour', 'Flour', 10, 0, 1),
('egg', 'Egg', 10, 0, 1),
('orange_dye', 'Orange Dye', 10, 0, 1),
('green_dye', 'Green Dye', 10, 0, 1),
('pink_dye', 'Pink Dye', 10, 0, 1),
('turquoise_dye', 'Turquoise Dye', 10, 0, 1),
('bakingsoda', 'Baking Soda', 10, 0, 1),
('orangemacaroon', 'Orange Macaroon', 10, 0, 1),
('greenmacaroon', 'Green Macaroon', 10, 0, 1),
('pinkmacaroon', 'Pink Macaroon', 10, 0, 1),
('turquoisemacaroon', 'Turquoise Macaroon', 10, 0, 1),
('cookie', 'Cookie', 10, 0, 1),
('cupcake', 'Cupcake', 10, 0, 1),
('donut', 'Donut', 10, 0, 1),
('chocosandwich', 'Choco Sandwich', 10, 0, 1),
('pancake', 'Pancake', 10, 0, 1),
('chickennoodlesoup', 'Chicken Noodle Soup', 10, 0, 1),
('misosoup', 'Miso Soup', 10, 0, 1),
('sushi', 'Sushi', 10, 0, 1),
('brewedcoffee', 'Brewed Coffee', 10, 0, 1),
('hotchocolade', 'Hot Chocolate', 10, 0, 1),
('latte', 'Latte', 10, 0, 1),
('matchatea', 'Matcha Tea', 10, 0, 1),
('bubbletea', 'Bubble Tea', 10, 0, 1);
```

{% endhint %}
{% endtab %}

{% tab title="OX" %}

{% endtab %}
{% endtabs %}

> **5) JOB ADDING**

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

```lua
catcafe = {
	label = 'Cat Cafe',
	defaultDuty = true,
	offDutyPay = false,
	grades = {
		['0'] = { name = 'Helper', payment = 30 },
		['1'] = { name = 'Cook', payment = 45 },
		['2'] = { name = 'Deliver', payment = 55 },
		['3'] = { name = 'Manager', isboss = true, payment = 60 },
	},
},
```

{% endhint %}
{% endtab %}

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

```sql
INSERT INTO `jobs` (name, label) VALUES
('catcafe', 'Cat Cafe');

INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
('catcafe', 0, 'helper', 'Helper', 30, '{}', '{}'),
('catcafe', 1, 'cook', 'Cook', 45, '{}', '{}'),
('catcafe', 2, 'deliver', 'Deliver', 55, '{}', '{}'),
('catcafe', 3, 'boss', 'Manager', 60, '{}', '{}');
```

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

> **6) CONSUMABLES**
>
> The first 2 blocks i'll show how to add the items into both [qb-smallresources](https://github.com/qbcore-framework/qb-smallresources) and [jim-consumables](https://github.com/jimathy/jim-consumables) for **qbcore**

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

```lua
Config.ConsumablesDrink = {
    ["brewedcoffee"] = math.random(40, 80),
    ["hotchocolade"] = math.random(40, 80),
    ["latte"] = math.random(40, 80),
    ["matchatea"] = math.random(40, 80),
    ["bubbletea"] = math.random(40, 80),
}

Config.ConsumablesEat = {
    ["orangemacaroon"] = math.random(80, 100),
    ["greenmacaroon"] = math.random(80, 100),
    ["pinkmacaroon"] = math.random(80, 100),
    ["turquoisemacaroon"] = math.random(80, 100),
    ["cookie"] = math.random(80, 100),
    ["cupcake"] = math.random(80, 100),
    ["donut"] = math.random(80, 100),
    ["chocosandwich"] = math.random(80, 100),
    ["pancake"] = math.random(80, 100),
    ["chickennoodlesoup"] = math.random(80, 100),
    ["misosoup"] = math.random(80, 100),
    ["sushi"] = math.random(80, 100),
}
```

{% 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

{% code title="jim-consumables/config.lua" %}

```lua
["brewedcoffee"] = {
	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),
	},
},
["hotchocolade"] = {
	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),
	},
},
["latte"] = {
	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),
	},
},
["matchatea"] = {
	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),
	},
},
["bubbletea"] = {
	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),
	},
},

["orangemacaroon"] = {
	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),
	},
},
["greenmacaroon"] = {
	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),
	},
},
["pinkmacaroon"] = {
	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),
	},
},
["turquoisemacaroon"] = {
	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),
	},
},
["cookie"] = {
	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),
	},
},
["cupcake"] = {
	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),
	},
},
["donut"] = {
	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),
	},
},
["chocosandwich"] = {
	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),
	},
},
["pancake"] = {
	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),
	},
},
["chickennoodlesoup"] = {
	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),
	},
},
["misosoup"] = {
	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),
	},
},
["sushi"] = {
	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),
	},
},
```

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