> For the complete documentation index, see [llms.txt](https://docs.tworst.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tworst.com/getting-started-installation/scripts/gardener-job/installation.md).

# Installation

Step-by-step guide to install the Multiplayer Gardener Job 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 |
| **PolyZone**          | Required for all Tworst Scripts                     |
| **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-gardenerv2** 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 **two folders**:
   * `tw-gardenerv2` - Main script
   * `tw_gardener_stream` - Stream assets (maps, props, vehicles, mower)
3. Place **both folders** in your server's `resources` directory

```
resources/
├── [standalone]/
├── [qb]/
├── tw-gardenerv2/             ← Main script
│   ├── config/
│   │   ├── config.lua
│   │   ├── coordinate.lua
│   │   └── GetCore.lua
│   ├── client/
│   ├── server/
│   ├── locales/
│   ├── html/
│   └── fxmanifest.lua
└── tw_gardener_stream/        ← Stream assets (REQUIRED)
    ├── stream/
    │   ├── *.ydr
    │   ├── *.yft
    │   ├── *.ytd
    │   └── ...
    └── fxmanifest.lua
```

{% hint style="danger" %}
**Important:** The stream folder contains custom maps, props, the mower vehicle, and landscaping equipment models. Without it, the job won't 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 %}

***

## Step 4: Configure the Script

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

```lua
-- Framework Selection
Config.Framework = 'qb'  -- Options: 'qb', 'oldqb', 'esx', 'oldesx', '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'

-- Interaction System
Config.InteractionHandler = 'drawtext'  -- Options: 'drawtext', 'ox-target'
```

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

See the [Configuration](/getting-started-installation/scripts/gardener-job/configuration.md) page for all available options.

***

## Step 5: Add to server.cfg

Add the following to your `server.cfg`:

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

# Tworst Scripts - Stream files must be loaded!
ensure tw_gardener_stream
ensure tw-gardenerv2
```

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

* Dependencies must start **before** the script
* Stream resource (`tw_gardener_stream`) must be started **before or with** the main script
  {% endhint %}

***

## Step 6: 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-gardenerv2

### In-Game Test

1. Go to the gardener job location
2. Look for the job blip on the map
3. Interact with the NPC to open the job menu
4. Rent a vehicle and mower
5. Start mowing and complete tasks

***

## 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 / Mower Not Spawning

1. Make sure the stream folder is in your resources folder
2. Verify it's started in your `server.cfg`
3. Check the server console for streaming errors

### 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

### Framework Not Detected

1. Make sure `Config.Framework` matches your framework
2. Verify framework resource is starting before tw-gardenerv2
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 %}
