Installation

DEPENDENCIES

REQUIRED DEPENDENCIES

OPTIONAL DEPENDENCIES

Resource
Download

Mapping

Map4all Recommend / Whatever you want

RESOURCE INSTALLATION GUIDE

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_bite

3) ASSET ADDING

  1. Open apex_bite > assets > inventory_images

  2. 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]--
['bacon'] 		= {['name'] = 'bacon', 		['label'] = 'Bacon', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'bacon.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'},
--[FOOD]--
['torpedo'] 		= {['name'] = 'torpedo', 	['label'] = 'Torpedo', 		['weight'] = 10, ['type'] = 'item', ['image'] = 'torpedo.png', 		['unique'] = false, ['useable'] = true, ['shouldClose'] = true, ['combinable'] = nil,   ['description'] = 'Food'},
--[DRINKS]--
['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
('bacon', 'Bacon', 10, 0, 1),
('bun', 'Buns', 10, 0, 1),
('cheese', 'Cheese Slices', 10, 0, 1),
('lettuce', 'Lettuce', 10, 0, 1),
('onion', 'onion', 10, 0, 1),
('onionslice', 'Onion Slices', 10, 0, 1),
('tomato', 'Tomatos', 10, 0, 1),
('torpedo', 'Torpedo', 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

['bite'] = {
    label = 'Bite',
    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
('bite', 'Bite');

INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
('bite', 0, 'helper', 'Helper', 30, '{}', '{}'),
('bite', 1, 'delivery', 'Delivery', 40, '{}', '{}'),
('bite', 2, 'cook', 'Cook', 60, '{}', '{}'),
('bite', 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

qb-smallresources/config.lua
Config.ConsumablesDrink = {
    ["soda"] = math.random(40, 80),
}

Config.ConsumablesEat = {
    ["torpedo"] = 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

jim-consumables/config.lua
["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),
	},
},
["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),
	},
},

Last updated