> For the complete documentation index, see [llms.txt](https://acestudios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://acestudios.gitbook.io/docs/jobs-and-economy/date-farming-job/installation.md).

# Installation

Install ace\_datepackagingJob on ESX, QBCore or Qbox.

## Requirements

* [ox\_lib](https://github.com/overextended/ox_lib) (required)
* One framework: **ESX**, **QBCore** or **Qbox**
* A supported inventory (see below)
* `ox_target` or `qb-target`, if you use a target interaction
* The **cleaning and packaging machine props** (`ace_datecleaning_machine`, `ace_datewrapping_machine`) placed in your map. See the warning below.

{% hint style="warning" %}
**Machine and map props aren't included in this resource.** It has no `stream/` folder. The config expects the machine models `ace_datecleaning_machine` and `ace_datewrapping_machine`, and the default zones and NPC are at coordinates east of the mainland (around X 3500–4000). Make sure the map or prop pack that provides these is installed, or change `Config.Models`, `Config.FarmingZones` and `Config.Locations` to match your own map.
{% endhint %}

## Steps

{% stepper %}
{% step %}

### Place the resource

Copy `ace_datepackagingJob` into your `resources` directory.
{% endstep %}

{% step %}

### Add it to `server.cfg`

Start it **after** `ox_lib`, your framework, your inventory and your target resource. Detection only finds resources that are already started.

{% code title="server.cfg" %}

```properties
ensure ox_lib
ensure qb-core          # or es_extended / qbx_core
ensure ox_inventory     # your inventory
ensure qb-target        # or ox_target (if used)

ensure ace_datepackagingJob
```

{% endcode %}

{% hint style="info" %}
The bundled `ReadMe.md` uses `ensure ace_datefarming`. Use the **actual folder name**, `ace_datepackagingJob`.
{% endhint %}
{% endstep %}

{% step %}

### Add the items

Create three items in your inventory. The names must match `Config.Items`:

{% tabs %}
{% tab title="ox\_inventory" %}
{% code title="ox\_inventory/data/items.lua" %}

```lua
['raw_dates'] = { label = 'Raw Dates', weight = 100 },
['clean_dates'] = { label = 'Clean Dates', weight = 100 },
['packaged_dates'] = { label = 'Packaged Dates', weight = 500 },
```

{% endcode %}

These are **example** definitions. Weights and labels are up to you.
{% endtab %}

{% tab title="QBCore / Qbox shared items" %}
{% code title="qb-core/shared/items.lua" %}

```lua
raw_dates = { name = 'raw_dates', label = 'Raw Dates', weight = 100, type = 'item', image = 'raw_dates.png', unique = false, useable = false, shouldClose = true, description = '' },
clean_dates = { name = 'clean_dates', label = 'Clean Dates', weight = 100, type = 'item', image = 'clean_dates.png', unique = false, useable = false, shouldClose = true, description = '' },
packaged_dates = { name = 'packaged_dates', label = 'Packaged Dates', weight = 500, type = 'item', image = 'packaged_dates.png', unique = false, useable = false, shouldClose = true, description = '' },
```

{% endcode %}

These are **example** definitions. Adjust them to your inventory's format.
{% endtab %}

{% tab title="ESX" %}

```sql
INSERT INTO `items` (`name`, `label`, `weight`) VALUES
  ('raw_dates', 'Raw Dates', 1),
  ('clean_dates', 'Clean Dates', 1),
  ('packaged_dates', 'Packaged Dates', 1);
```

This is an **example**. Adjust it to your inventory's format.
{% endtab %}
{% endtabs %}

Item images are in `ace_datepackagingJob/imgs/`: `raw_dates.png`, `clean_dates.png` and `packaged_dates.png`. Copy them to your inventory's image folder.
{% endstep %}

{% step %}

### Configure

Set `Config.Framework`, `Config.Inventory`, `Config.Interaction` and `Config.Locale`. See [Configuration](/docs/jobs-and-economy/date-farming-job/configuration.md).
{% endstep %}

{% step %}

### Restart the server

Set `Config.Debug = true` for the first start. The console shows which framework and inventory were detected:

```
[DateJob Debug] Server Framework initialized: qbcore
[DateJob Debug] Inventory bridge successfully bound to: ox
```

{% endstep %}
{% endstepper %}
