# Installation

Step-by-step guide to install the Lite Jobs Pack on your FiveM server.

***

## Prerequisites

Before installing, make sure you have:

| Requirement           | Description                                         |
| --------------------- | --------------------------------------------------- |
| **Framework**         | QBCore, QBox, ESX, vRP, or Standalone               |
| **Database Resource** | oxmysql (recommended), mysql-async, or ghmattimysql |
| **FiveM Server**      | Build 2802 or higher recommended                    |

***

## Step 1: Download the Script

### From Cfx.re Portal (Recommended)

1. Go to [portal.cfx.re](https://portal.cfx.re)
2. Navigate to **Granted Assets**
3. Find **tw-litejobpack** in your purchased scripts
4. Click **Download** to get the latest version

### From Tebex

1. Log in to your Tebex account
2. Go to your purchases
3. Download the script package

***

## Step 2: Extract Files

1. Extract the downloaded archive
2. You will find **three folders**:
   * `tw-litejobpack` - Main script (23 jobs, UI, configs)
   * `tw-litejobpack-stream` - Stream assets (custom props, tools, weapons, vehicles)
   * `tw-litejobpack-map` - Map assets (warehouse interior and crate models)
3. Place **all three folders** in your server's `resources` directory

```
resources/
├── [standalone]/
├── [qb]/
├── tw-litejobpack/                ← Main script
│   ├── shared/
│   │   ├── config.lua             ← Main configuration
│   │   └── jobs/                  ← 23 job definition files
│   ├── client/
│   ├── server/
│   ├── locales/
│   ├── html/
│   ├── img/
│   └── fxmanifest.lua
├── tw-litejobpack-stream/         ← Stream assets (REQUIRED)
│   ├── metas/
│   │   ├── powerwash/             ← Pressure washer weapon meta
│   │   └── utillitruck/           ← Utility truck vehicle meta
│   ├── stream/
│   │   ├── baskul/                ← Processing scale props
│   │   ├── cuttree/               ← Tree cutting props
│   │   ├── plumber/               ← Plumber pipes & toilet props
│   │   ├── powerwash/             ← Pressure washer weapon model
│   │   ├── tool/                  ← Pickaxes, axes, ores, crops (29 props)
│   │   └── utillitruck/           ← Utility truck model
│   └── fxmanifest.lua
└── tw-litejobpack-map/            ← Map assets (REQUIRED)
    ├── stream/
    │   ├── yusufwarehouse.ymap    ← Warehouse interior map
    │   └── *.ydr, *.yft, *.ytd   ← Warehouse & crate models
    └── fxmanifest.lua
```

{% hint style="danger" %}
**Important:** Both asset folders are required! The **stream** folder contains custom props (ores, tools, crops, vehicles, weapons) and the **map** folder contains the warehouse interior used by the Warehouse and Forklift jobs. Without them, many jobs will not function correctly!
{% endhint %}

***

## Step 3: Database Setup

{% hint style="success" %}
**Automatic Setup:** The script automatically creates the required database tables when it starts for the first time. No manual SQL import needed!
{% endhint %}

The following tables are created automatically:

* Player job progress & XP/levels
* Statistics & leaderboard data
* Achievement tracking
* Session management

***

## Step 4: Configure the Script

Open `shared/config.lua` and set your framework:

```lua
-- Framework Selection
Config.Framework = "qb"  -- Options: 'qb', 'esx', 'vrp', 'vrp2', 'standalone'

-- Database Resource
Config.SQL = "oxmysql"  -- Options: 'oxmysql', 'mysql-async', 'ghmattimysql'

-- Inventory System
Config.Inventory = "qb_inventory"  -- Options: 'qb_inventory', 'esx_inventory', 'ox_inventory', 'qs_inventory'

-- Language
Config.Locale = "en"  -- Options: 'en', 'tr', 'de', 'fr', 'pt', 'ru', 'es', 'nl'
```

{% hint style="info" %}
**QBox Users:** Set `Config.Framework = 'qb'` - QBox is fully compatible with the 'qb' setting.
{% endhint %}

See the [Configuration](https://docs.tworst.com/scripts/lite-jobs-pack/configuration) page for all available options.

***

## Step 5: Add Items & Weapons

Several jobs require inventory items or weapon definitions to be added to your framework.

### Newspaper Job — WEAPON\_ACIDPACKAGE (Required)

{% hint style="danger" %}
**Critical:** The Newspaper Delivery job uses `WEAPON_ACIDPACKAGE` to throw newspapers. This weapon is **not** included in GTA V by default. You **must** define it in your framework, or the Newspaper job will not work!
{% endhint %}

**QB-Core** — Add to `qb-core/shared/weapons.lua`:

```lua
['weapon_acidpackage'] = {
    ['name'] = 'weapon_acidpackage',
    ['label'] = 'News Paper',
    ['weight'] = 1000,
    ['type'] = 'weapon',
    ['ammotype'] = 'ammo-acid',
    ['image'] = 'weapon_acidpackage.png',
    ['unique'] = true,
    ['useable'] = true,
    ['description'] = 'News paper'
},
```

**ox\_inventory** — Add to `ox_inventory/data/weapons.lua`:

```lua
['WEAPON_ACIDPACKAGE'] = {
    label = 'Newspaper',
    weight = 0,
    throwable = true
},
```

**ESX** — Add the weapon definition to your ESX weapons configuration.

{% hint style="info" %}
This weapon is given via native `GiveWeaponToPed`, not through inventory. However, your framework still needs to recognize it.
{% endhint %}

### Pressure Washer & Car Detailer — WEAPON\_PRESSURE1 (ox\_inventory Users)

If you are using **ox\_inventory**, the Pressure Washer and Car Detailer jobs use `WEAPON_PRESSURE1` as a work tool. This weapon is given natively (not through inventory), but ox\_inventory's weapon mismatch system will detect it as unauthorized and remove it from the player.

To prevent this, you need to add `WEAPON_PRESSURE1` to the ignore list.

**Step 1** — Add to `ox_inventory/data/weapons.lua`:

```lua
['WEAPON_PRESSURE1'] = {
    label = 'Pressure Washer',
    weight = 0,
},
```

**Step 2** — Add to ignoreweapons in `ox.cfg`:

File: Your server's `ox.cfg` (usually located in your server root or txData base folder)

Find the line:

```
setr inventory:ignoreweapons []
```

Change it to:

```
setr inventory:ignoreweapons ["WEAPON_PRESSURE1"]
```

If you already have other weapons in the list, add it with a comma:

```
setr inventory:ignoreweapons ["WEAPON_HANDCUFFS", "WEAPON_PRESSURE1"]
```

{% hint style="info" %}
This setting tells ox\_inventory to skip the weapon mismatch check for `WEAPON_PRESSURE1`. Without this, ox\_inventory will repeatedly strip the pressure washer from the player's hands during the job.
{% endhint %}

{% hint style="info" %}
**Why is this different from the Newspaper job?**

The Newspaper job (`WEAPON_ACIDPACKAGE`) is a throwable weapon — each throw consumes one item from inventory, so it must be managed through ox\_inventory's item system with `throwable = true`.

The Pressure Washer (`WEAPON_PRESSURE1`) is a held tool — it stays in the player's hands during work and is removed when the tool is returned to the trunk. It does not need to exist in the inventory, only to be ignored by the mismatch system.
{% endhint %}

### Fishing Items (18 items)

**Fish (9 types):**

| Item Name        | Label     |
| ---------------- | --------- |
| `fish_anchovy`   | Anchovy   |
| `fish_trout`     | Trout     |
| `fish_mackerel`  | Mackerel  |
| `fish_salmon`    | Salmon    |
| `fish_snapper`   | Snapper   |
| `fish_tuna`      | Tuna      |
| `fish_grouper`   | Grouper   |
| `fish_swordfish` | Swordfish |
| `fish_shark`     | Shark     |

**Fishing Rods (3 types):**

| Item Name     | Label        |
| ------------- | ------------ |
| `standartrod` | Standard Rod |
| `carbonrod`   | Carbon Rod   |
| `prorod`      | Pro Rod      |

**Baits (6 types):**

| Item Name    | Label            |
| ------------ | ---------------- |
| `basicbait`  | Basic Bait       |
| `spoonlure`  | Spoon Lure       |
| `threesided` | Three-Sided Lure |
| `tailfish`   | Tail Fish Lure   |
| `doublehook` | Double Hook      |
| `triplehook` | Triple Hook      |

### Diving Items (2 items)

| Item Name            | Label        |
| -------------------- | ------------ |
| `dendrogyra_coral`   | Pillar Coral |
| `antipatharia_coral` | Black Coral  |

{% hint style="warning" %}
**Note:** Refer to the `ITEMS.md` file included with the script for ready-to-copy item definitions for your framework.
{% endhint %}

***

## Step 6: Add to server.cfg

Add the following to your `server.cfg`:

```cfg
# Dependencies (must start before tw-litejobpack)
ensure oxmysql          # or mysql-async
ensure es_extended      # or qb-core (your framework)
# ensure ox_lib           # optional

# Tworst Scripts - Asset files must be loaded first!
ensure tw-litejobpack-map
ensure tw-litejobpack-stream
ensure tw-litejobpack
```

{% hint style="warning" %}
**Load Order:**

* Dependencies must start **before** the script
* Map resource (`tw-litejobpack-map`) and stream resource (`tw-litejobpack-stream`) must be started **before** the main script
  {% endhint %}

***

## Step 7: Restart Server

1. Save all configuration changes
2. Restart your server completely
3. Check the server console for any errors

***

## Verification

After starting the server, verify the installation:

### Check Console

Look for these messages in your server console:

* Database tables created successfully (first run only)
* No error messages related to tw-litejobpack

### In-Game Test

1. Open the map and look for job blips
2. Go to any job NPC location
3. Interact with the NPC to open the job menu
4. Select a job, create a lobby, and test the gameplay
5. Verify XP and payment are working correctly

***

## Troubleshooting

### Script Won't Start

1. Check resource name matches exactly (case-sensitive on Linux)
2. Verify all dependencies are started before the script
3. Check for syntax errors in config files

### Missing Props / Custom Models Not Loading

1. Make sure both `tw-litejobpack-stream` and `tw-litejobpack-map` are in your resources folder
2. Verify they are started in your `server.cfg` before the main script
3. Check the server console for streaming errors

### Warehouse / Forklift Jobs Not Working

1. Make sure `tw-litejobpack-map` resource is started — it contains the warehouse interior
2. Verify the map resource loads without errors in the server console
3. The warehouse map includes custom crate models required for the Forklift and Warehouse jobs

### Items Not Found (Fishing/Diving)

1. Ensure you've added all required items to your framework
2. Check item names match exactly (case-sensitive)
3. Refer to the `ITEMS.md` file for correct item definitions

### Database Errors

1. Verify database connection string in `server.cfg`
2. Check that your database resource is starting properly
3. Ensure `Config.SQL` matches your database resource

### Changing Station Door Not Visible

If the door at the changing station is invisible, add the following to your `server.cfg`:

```
setr game_enableDynamicDoorCreation true
```

This enables dynamic door creation in FiveM, which is required for the changing station door to render properly.

### Framework Not Detected

1. Make sure `Config.Framework` matches your framework
2. Verify framework resource is starting before tw-litejobpack
3. Check framework resource name matches expected names

***

## Need Help?

{% hint style="info" %}
Having installation issues? Join our [Discord server](https://discord.gg/tworst) and open a support ticket with:

* Server console errors
* Your `Config.Framework` and `Config.SQL` settings
* Screenshots of any issues
  {% endhint %}
