# Install Instructions

***

Follow the steps below to install this resource to your server.

{% stepper %}
{% step %}

## Install dependencies

{% hint style="warning" %}
Verify all dependencies below are started *before* this script in your `server.cfg`.
{% endhint %}

Install (or update) all dependencies below:

1. [oxmysql](https://github.com/overextended/oxmysql/releases/latest)
2. [ox\_lib](https://github.com/overextended/ox_lib/releases/latest)
3. apex\_lib (Included with the purchases - Please check your keymaster)
   {% endstep %}

{% step %}

## Add items <a href="#add-items" id="add-items"></a>

Open the `[install]` folder and add the `items` & their `images` to your inventory

{% hint style="info" %}
Are you on esx - Remember to add the `.sql` to your database.
{% endhint %}

{% tabs %}
{% tab title="ox\_inventory" %}

```lua
-- [FOOD INGREDIENTS]
['bacon'] = {
    label = 'Bacon',
    weight = 10,
},
['bun'] = {
    label = 'Buns',
    weight = 10,
},
['cheese'] = {
    label = 'Cheese Slices',
    weight = 10,
},
['lettuce'] = {
    label = 'Lettuce',
    weight = 10,
},
['onionslice'] = {
    label = 'Onion Slices',
    weight = 10,
},
['tomato'] = {
    label = 'Tomatos',
    weight = 10,
},

-- [FOOD]
['torpedo'] = {
    label = 'Torpedo',
    weight = 10,
        client = {
        status = { hunger = 200000 },
        anim = 'eating',
        prop = 'burger',
        usetime = 2500,
        cancel = true,
        notification = 'You ate a delicious Burger'
    }
},

-- [DRINKS]
['soda'] = {
    label = 'Soda',
    weight = 10,
        client = {
        status = { thirst = 200000 },
        anim = { dict = 'mp_player_intdrink', clip = 'loop_bottle' },
        prop = { model = `prop_ld_flow_bottle`, pos = vec3(0.03, 0.03, 0.02), rot = vec3(0.0, 0.0, -1.5) },
        usetime = 2500,
        cancel = true,
        notification = 'You drank some refreshing soda'
    }
},
```

{% endtab %}

{% tab title="qb-inventory" %}

```lua
bacon                       = { name = 'bacon',        label = 'Bacon',         weight = 10,   type = 'item', image = 'bacon.png',        unique = false, useable = true,  shouldClose = true, description = 'Ingredients' },
bun                         = { name = 'bun',          label = 'Buns',          weight = 10,   type = 'item', image = 'bun.png',          unique = false, useable = true,  shouldClose = true, description = 'Ingredients' },
cheese                      = { name = 'cheese',       label = 'Cheese Slices', weight = 10,   type = 'item', image = 'cheese.png',       unique = false, useable = true,  shouldClose = true, description = 'Ingredients' },
lettuce                     = { name = 'lettuce',      label = 'Lettuce',       weight = 10,   type = 'item', image = 'lettuce.png',      unique = false, useable = true,  shouldClose = true, description = 'Ingredients' },
onionslice                  = { name = 'onionslice',   label = 'Onion Slices',  weight = 10,   type = 'item', image = 'onionslice.png',   unique = false, useable = true,  shouldClose = true, description = 'Ingredients' },
tomato                      = { name = 'tomato',       label = 'Tomatos',       weight = 10,   type = 'item', image = 'tomato.png',       unique = false, useable = true,  shouldClose = true, description = 'Ingredients' },

-- [FOOD]
torpedo                     = { name = 'torpedo',      label = 'Torpedo',       weight = 10,   type = 'item', image = 'torpedo.png',      unique = false, useable = true,  shouldClose = true, description = 'Food' },

-- [DRINKS]
soda                        = { name = 'soda',         label = 'Soda',          weight = 10,   type = 'item', image = 'soda.png',         unique = false, useable = true,  shouldClose = true, description = 'Drink' },

```

{% endtab %}

{% tab title="old qb-inventory" %}

```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'},
['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'}, 
```

{% endtab %}

{% tab title="qs-inventory" %}

```lua
['bacon'] = {
    name = 'bacon',
    label = 'Bacon',
    weight = 10,
    type = 'item',
    image = 'bacon.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = nil
},
['bun'] = {
    name = 'bun',
    label = 'Buns',
    weight = 10,
    type = 'item',
    image = 'bun.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = nil
},
['cheese'] = {
    name = 'cheese',
    label = 'Cheese Slices',
    weight = 10,
    type = 'item',
    image = 'cheese.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = nil
},
['lettuce'] = {
    name = 'lettuce',
    label = 'Lettuce',
    weight = 10,
    type = 'item',
    image = 'lettuce.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = nil
},
['onionslice'] = {
    name = 'onionslice',
    label = 'Onion Slices',
    weight = 10,
    type = 'item',
    image = 'onionslice.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = nil
},
['tomato'] = {
    name = 'tomato',
    label = 'Tomatos',
    weight = 10,
    type = 'item',
    image = 'tomato.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = nil
},

-- [FOOD]
['torpedo'] = {
    name = 'torpedo',
    label = 'Torpedo',
    weight = 10,
    type = 'item',
    image = 'torpedo.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = nil
},

-- [DRINKS]
['soda'] = {
    name = 'soda',
    label = 'Soda',
    weight = 10,
    type = 'item',
    image = 'soda.png',
    unique = false,
    useable = true,
    shouldClose = true,
    description = nil
},
```

{% endtab %}

{% tab title="ESX" %}

```lua
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);
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

## Add jobs

Open the `[install]` folder and add the `jobs` to your core resource

{% hint style="info" %}
Are you on esx - Remember to add the `.sql` to your database.
{% endhint %}

{% tabs %}
{% tab title="qb-core" %}

```lua
-- [Install into: qb-core/shared/jobs.lua] --
bite = {
	label = 'Bite',
	defaultDuty = true,
	offDutyPay = false,
	grades = {
		['0'] = { name = 'Helper', payment = 30 },
		['1'] = { name = 'Cook', payment = 40 },
		['2'] = { name = 'Deliver', payment = 50 },
		['3'] = { name = 'Manager', payment = 60 },
		['4'] = { name = 'Boss', isboss = true, payment = 70 },
	},
},
```

{% endtab %}

{% tab title="qbx\_core" %}

```lua
-- [Install into: qbx_core/shared/jobs.lua] --   
['bite'] = {
        label = 'Bite',
        defaultDuty = true,
        offDutyPay = false,
        grades = {
            [0] = {
                name = 'Helper',
                payment = 30
            },
            [1] = {
                name = 'Cook',
                payment = 40
            },
            [2] = {
                name = 'Deliver',
                payment = 50
            },
            [3] = {
                name = 'Manager',
                payment = 60
            },
             [4] = {
                name = 'Boss',
                isboss = true,
                bankAuth = true,
                payment = 70
            },
        },
    },
```

{% endtab %}

{% tab title="ESX" %}

```lua
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', 50, '{}', '{}'),
('bite', 3, 'manager', 'Manager', 60, '{}', '{}'),
('bite', 4, 'boss', 'Boss', 70, '{}', '{}');
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

## Restart server <a href="#restart-server" id="restart-server"></a>

* Add this script into your main resources directory (usually `../resources`)
* Open `server.cfg` and add `start` or `ensure apex_bite`&#x20;
* Restart your server.
  {% endstep %}
  {% endstepper %}

{% hint style="danger" %}
Upon completion, do **not** delete the `[install]` folder or any `.sql` files or you will experience errors.
{% endhint %}
