> For the complete documentation index, see [llms.txt](https://l3th.gitbook.io/l3th-development/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://l3th.gitbook.io/l3th-development/paid-assets/garbage-job/setup-guide.md).

# Setup Guide

{% stepper %}
{% step %}

### Install dependencies

{% hint style="warning" %}
Verify all dependencies below are started *before* this resources in your  `sever.cfg`&#x20;
{% endhint %}

Install (or update) all dependencies below:

{% embed url="<https://github.com/CommunityOx/ox_lib>" %}

Install one of these for your server's group system:

{% tabs %}
{% tab title="YPhone" %}
Install YPhone resource, download from <https://portal.cfx.re/assets/granted-assets>
{% endtab %}

{% tab title="LB-Phone" %}
Install LB-Phone resource, download from: <https://portal.cfx.re/assets/granted-assets>

For LB-Phone group you will need a third party group app, which you will need to download from: <https://github.com/solareon/slrn_groups>
{% endtab %}

{% tab title="ps-playergroups" %}
Download ps-playergroups from: <https://github.com/Project-Sloth/ps-playergroups>
{% endtab %}
{% endtabs %}

It is possible to use your own group system, you will need yo create the exports in the bridge folder.
{% endstep %}

{% step %}

### Soft Dependencies

This resource does not only require `ox_lib`, it also requires a inventory, target, vehicle keys and notify.

If you’re not using `ox_inventory` or `qb-inventory`, your inventory resource will need to include these exports. The same applies to target and notify.

Under here is the exports that I will need in order to make the resource work. I use `ox` or `qbox` resources as the example here.

{% tabs %}
{% tab title="Inventory" %}

```lua
// Client Side

return exports.ox_inventory:Search('count', item) >= count

// Server Side

return exports.ox_inventory:AddItem(source, item, count, metadata or nil)

// This as to beable to remove items from a vehicle trunk/glovebox
return exports.ox_inventory:RemoveItem(inv, item, count, metadata, slot, ignoreTotal, strict)

return exports.ox_inventory:Search(source, 'count', item) >= count

return exports.ox_inventory:GetItem(inv, item, metadata, returnsCount)

```

{% endtab %}

{% tab title="Target" %}

```lua
// Client Side

return exports.ox_target:addSphereZone({
      coords = data.coords,
      radius = data.radius or 1.0,
      debug = data.debug or false,
      options = utils.getTargetOptions(data.options)
    })
    
 return exports.ox_target:addLocalEntity(entity, utils.getTargetOptions(options))
 
 exports.ox_target:removeZone(zone)
 
 return exports.ox_target:addLocalEntity(entity, utils.getTargetOptions(options))
 
 exports.ox_target:removeModel(models)
 
 return exports.ox_target:addModel(models, utils.getTargetOptions(options))
 
```

{% endtab %}

{% tab title="Notify" %}

```lua
// Client Side

lib.notify({
      title = data.title or '',
      description = data.description or '',
      type = data.type or 'info',
      position = data.position or 'bottom',
      duration = data.duration or 3000,
    })

// Server Side

TriggerClientEvent('ox_lib:notify', data.source, data, 'buttom')

```

{% endtab %}

{% tab title="Vehicle Keys" %}

```lua
// Server Side

return exports.qbx_vehiclekeys:HasKeys(data.source, data.vehicle)

exports.qbx_vehiclekeys:GiveKeys(data.source, data.vehicle, true)

```

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

{% step %}

### Add Items

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

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

* Grab an item image and rename it to `'garbage_bag'`
* Copy the item from this table and paste it into your items.lua.

```lua
-- Item data format for ox_inventory
['garbage_bag'] = {
		label = 'Garbage Bag',
		weight = 250,
		stack = false,
	},
```

{% endtab %}

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

* Grav an item image and rename it to `'garbage_bag'`
* Copy the item from this table and paste it into your items.lua.

```lua
-- Item data format for qb-inventory
['garbage_bag']               = {['name'] = 'garbage_bag',                 ['label'] = 'Garbage Bag',               ['weight'] = 250, ['type'] = 'item',               ['unique'] = false,
```

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

{% step %}

### Configuration

Go through the `cl_config.lua`  file and configure it to your liking. Do the same with the `sv_config.lua`&#x20;
{% endstep %}

{% step %}

### Restart Server

* Add this script into your main resources directory (usually `../resources`)
* Open `server.cfg`  and add `start` or `ensure l3th-garbagejob`
  {% endstep %}
  {% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://l3th.gitbook.io/l3th-development/paid-assets/garbage-job/setup-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
