> 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/scripts/food-stand/installation.md).

# Installation

Install the Multiplayer Food Stands Job on your FiveM server.

***

## Prerequisites

| Requirement      | Description                                                    |
| ---------------- | -------------------------------------------------------------- |
| **tw-lib**       | Free Tworst library, version 1.3.0 or newer                    |
| **oxmysql**      | Database                                                       |
| **FiveM Server** | A recent server build (OneSync on, as txAdmin sets by default) |

***

## Step 1: Download

1. Go to [portal.cfx.re](https://portal.cfx.re) → **Granted Assets**
2. Download **tw-foodstandjob** and **tw-lib**

{% hint style="info" %}
**tw-lib** is free. You can also download it from [GitHub Releases](https://github.com/Tworst-Shop/tw-lib/releases/latest). Download the `tw-lib-x.x.x.zip` file there, not "Code → Download ZIP".
{% endhint %}

***

## Step 2: Extract Files

Put the `[tw-foodstand]` folder into your `resources` directory:

```
resources/
├── tw-lib/                        ← Tworst library (REQUIRED)
└── [tw-foodstand]/
    ├── tw-foodstandjob/           ← The job
    │   ├── config_job.lua         # Lobby, XP, daily tasks, economy, keys, outfit
    │   ├── config_station.lua     # Job point, trailer, stations, stock, orders, menu
    │   ├── config.lua             # Counter / grill hand feel
    │   ├── config_sound.lua       # Sounds and stand music
    │   ├── locales/               # Texts (14 languages)
    │   ├── items/                 # Item definitions & images
    │   └── ...
    ├── tw-foodstandjob_trailers/  ← The 9 trailer vehicles
    └── tw-foodstandjob_depot/     ← Depot map (optional)
```

{% hint style="danger" %}
Keep the folder names exactly as they are. The job looks for `tw-foodstandjob_trailers` and `tw-foodstandjob_depot` by name, and the ox\_inventory item definitions call `tw-foodstandjob.useFood`.
{% endhint %}

***

## Step 3: Database

{% hint style="success" %}
**Nothing to import.** tw-lib creates its tables on first start (`tw_lib_players`, `tw_lib_job_history`, `tw_lib_settings` and others). The job keeps levels, daily tasks and history there.
{% endhint %}

***

## Step 4: server.cfg

```cfg
ensure oxmysql
ensure qb-core                 # your framework, if any
# ... your inventory, keys, fuel, clothing, target scripts

ensure tw-lib                  # before every Tworst job
ensure tw-foodstandjob_trailers
ensure tw-foodstandjob_depot   # optional: remove this line to run without the depot
ensure tw-foodstandjob
```

{% hint style="warning" %}
**Start order matters.** `tw-lib`, `tw-foodstandjob_trailers` and `tw-foodstandjob_depot` must start **before** `tw-foodstandjob`. The job checks for the trailers and the depot two seconds after it starts.
{% endhint %}

***

## Step 5: Add Items

The job has 55 food and drink items plus the food bag. The easiest way:

1. Start the server and join as an admin.
2. Open `/twlib` → **Settings** → **Food Stands** → **Tools** → **Install items**.
3. Restart your inventory if the card says so.

The button finds your inventory, adds only the items that are missing and copies the images. Press it again after an update to add new items. See [Items](/scripts/food-stand/items.md) for what it does per inventory and for manual install.

***

## Step 6: Start & Check

Look at the server console:

* `[tw-lib] ...` status line: what tw-lib detected.
* `[stand] ... Install items` means some items are still missing. See Step 5.

Then in game: go to the job NPC (default: the depot near Vespucci), open a lobby and start a shift.

***

## About the Depot Map

`tw-foodstandjob_depot` replaces the shop block `sm_21_build03` near Vespucci with the STREETWORTH depot. The depot has:

* the job NPC and the finish marker,
* a live board,
* a showroom with a trailer of every type parked outside.

{% hint style="warning" %}
If another map or MLO of yours uses the same block, the two will clash. Run without the depot (remove its `ensure` line), or move the job point to another place in `config_station.lua`.
{% endhint %}

### Running without the depot

When `tw-foodstandjob_depot` is not started:

* the job NPC moves to a fallback point (`Config.Job.noMap`),
* the trailer spawns **already hitched** to the tow vehicle,
* the shift ends at the NPC,
* the showroom is off.

The console says so on start: `[stand] tw-foodstandjob_depot is not started: job NPC at the fallback point ...`

***

## Admin Menu Permission

`/twlib` opens the Tworst admin menu. Who may open it is set in `tw-lib/config.lua`. See [tw-lib → Installation](/tw-lib/tw-lib/installation.md#admin-menu-permission).

***

## Troubleshooting

### `Could not find dependency tw-lib / oxmysql`

That resource is not installed or not started. Start it before `tw-foodstandjob`.

### `tw-foodstandjob needs tw-lib 1.3.0 or newer`

Your tw-lib is older than the job needs. Download the latest from [GitHub](https://github.com/Tworst-Shop/tw-lib/releases/latest) and replace the `tw-lib` folder.

### `[stand] tw-foodstandjob_trailers is not started: the shift cannot start`

The trailer resource is missing, not started, or renamed. Ensure `tw-foodstandjob_trailers` before `tw-foodstandjob`.

### Food items are not given / cannot be eaten

The items are missing. Use **Install items** (Step 5). On ox\_inventory, restart ox\_inventory after the button.

### The stand does not open

The ground is too steep for the legs to level the trailer, the trailer is still moving, or another open stand is closer than 9 m. Move a little and try again.

### I upgraded from a `tw-foodstand` folder

Delete the old `tw-foodstand`, `tw-foodstand_trailers` and `tw-foodstand_depot` folders, put the 3 new folders in their place and change the 3 `ensure` lines. On ox\_inventory, change `tw-foodstand.useFood` to `tw-foodstandjob.useFood` in your item lines (or press **Install items** again).

***

## Need Help?

{% hint style="info" %}
Open a ticket on our [Discord](https://discord.gg/tworst) with the `[tw-lib] ...` status line from your console and any red error lines.
{% endhint %}
