Installation
Last updated
Last updated
REQUIRED DEPENDENCIES
Resource | Download |
---|---|
OPTIONAL DEPENDENCIES
Resource | Download |
---|---|
1) RESOURCE DOWNLOAD
Download your resource from FiveM's Keymaster.
2) RESOURCE POSITIONING
You need to make sure that apex_lib is always started before any of our scripts!
ensure apex_lib
ensure [apex] -- or ensure apex_koi
3) ASSET ADDING
Open apex_koi > assets > inventory_images
Copy files from the folder and add them into your inventory image folder
4) ITEM ADDING (QBCORE & ESX)
The first block shows the data, you'll have to put into shared/items.lua in qbcore
The second block shows the data, you'll have to put into the database in esx
--[FOOD 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'},
['seaweed'] = {['name'] = 'seaweed', ['label'] = 'Sea Weed', ['weight'] = 10, ['type'] = 'item', ['image'] = 'seaweed.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Ingredients'},
['skewer'] = {['name'] = 'skewer', ['label'] = 'Skewer', ['weight'] = 10, ['type'] = 'item', ['image'] = 'skewer.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'},
['teriyaki'] = {['name'] = 'teriyaki', ['label'] = 'Teriyaki', ['weight'] = 10, ['type'] = 'item', ['image'] = 'teriyaki.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'},
['chickenraw'] = {['name'] = 'chickenraw', ['label'] = 'Raw Chicken Fillet', ['weight'] = 10, ['type'] = 'item', ['image'] = 'chickenraw.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Ingredients'},
--[FOOD]--
['ramen_hot'] = {['name'] = 'ramen_hot', ['label'] = 'Ramen Hot', ['weight'] = 10, ['type'] = 'item', ['image'] = 'ramen_hot.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Food'},
['ramen_chicken'] = {['name'] = 'ramen_chicken', ['label'] = 'Ramen Chicken', ['weight'] = 10, ['type'] = 'item', ['image'] = 'ramen_chicken.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Food'},
['ramen_pork'] = {['name'] = 'ramen_pork', ['label'] = 'Ramen Pork', ['weight'] = 10, ['type'] = 'item', ['image'] = 'ramen_pork.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Food'},
['yakitori'] = {['name'] = 'yakitori', ['label'] = 'Yakitori', ['weight'] = 10, ['type'] = 'item', ['image'] = 'yakitori.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Food'},
['teriyaki_chicken'] = {['name'] = 'teriyaki_chicken', ['label'] = 'Teriyaki Chicken', ['weight'] = 10, ['type'] = 'item', ['image'] = 'teriyaki_chicken.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Food'},
['sushi'] = {['name'] = 'sushi', ['label'] = 'Sushi', ['weight'] = 10, ['type'] = 'item', ['image'] = 'sushi.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Food'},
['misosoup'] = {['name'] = 'misosoup', ['label'] = 'Miso Soup', ['weight'] = 30, ['type'] = 'item', ['image'] = 'misosoup.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Food'},
['onigiri'] = {['name'] = 'onigiri', ['label'] = 'Onigiri', ['weight'] = 10, ['type'] = 'item', ['image'] = 'onigiri.png', ['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil, ['description'] = 'Food'},
--[DRINKS]--
['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'},
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
('tofu', 'Tofu', 10, 0, 1),
('rice', 'Rice', 10, 0, 1),
('seaweed', 'Sea Weed', 10, 0, 1),
('skewer', 'Skewer', 10, 0, 1),
('fish', 'Fish', 10, 0, 1),
('teriyaki', 'Teriyaki', 10, 0, 1),
('noodles', 'Noodles', 10, 0, 1),
('chickenraw', 'Raw Chicken Fillet', 10, 0, 1),
('ramen_hot', 'Ramen Hot', 10, 0, 1),
('ramen_chicken', 'Ramen Chicken', 10, 0, 1),
('ramen_pork', 'Ramen Pork', 10, 0, 1),
('yakitori', 'Yakitori', 10, 0, 1),
('teriyaki_chicken', 'Teriyaki Chicken', 10, 0, 1),
('sushi', 'Sushi', 10, 0, 1),
('misosoup', 'Miso Soup', 10, 0, 1),
('onigiri', 'Onigiri', 10, 0, 1),
('milkshake', 'Milkshake', 10, 0, 1),
('soda', 'Soda', 10, 0, 1);
5) JOB ADDING
The first block shows the data, you'll have to put into shared/jobs.lua in qbcore
The second block shows the data, you'll have to put into the database in esx
['koi'] = {
label = 'Koi Restaurant',
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
},
},
},
INSERT INTO `jobs` (name, label) VALUES
('koi', 'Koi Restaurant');
INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
('koi', 0, 'helper', 'Helper', 30, '{}', '{}'),
('koi', 1, 'delivery', 'Delivery', 40, '{}', '{}'),
('koi', 2, 'cook', 'Cook', 60, '{}', '{}'),
('koi', 3, 'boss', 'Manager', 60, '{}', '{}');
6) CONSUMABLES
The first 2 blocks i'll show how to add the items into both qb-smallresources and jim-consumables for qbcore
Config.ConsumablesDrink = {
["milkshake"] = math.random(40, 80),
["soda"] = math.random(40, 80),
}
Config.ConsumablesEat = {
["ramen_hot"] = math.random(80, 100),
["ramen_chicken"] = math.random(80, 100),
["ramen_pork"] = math.random(80, 100),
["yakitori"] = math.random(80, 100),
["teriyaki_chicken"] = math.random(80, 100),
["sushi"] = math.random(80, 100),
["misosoup"] = math.random(80, 100),
["onigiri"] = math.random(80, 100),
}
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
["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),
},
},
["ramen_hot"] = {
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),
},
},
["ramen_chicken"] = {
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),
},
},
["ramen_pork"] = {
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),
},
},
["yakitori"] = {
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),
},
},
["teriyaki_chicken"] = {
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),
},
},
["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),
},
},
["onigiri"] = {
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),
},
},
Apex Library
Framework
Target
Menu
Inventory
Mapping
Gabz Recommend / Whatever you want