> 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.2.4 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
    │   ├── branding/              # Your own trailer textures (optional)
    │   └── ...
    ├── 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 %}

***

## Optional: 3D Chinese Letters

The stand sign spells Latin names with 3D letters. A Chinese name shows on a flat name card. The free **tw-foodstandjob\_cjk** resource gives the sign 3D letters for 3755 common Chinese characters. It is a separate download on GitHub (like tw-lib), because every player downloads it (about 30 MB).

1. Download `tw-foodstandjob_cjk-1.0.1.zip` from [GitHub Releases](https://github.com/Tworst-Shop/tw-foodstandjob_cjk/releases/latest).
2. Extract it into `resources/[tw-foodstand]/`.
3. In `server.cfg`, add the line **before** `ensure tw-foodstandjob`:

```cfg
ensure tw-foodstandjob_cjk
ensure tw-foodstandjob
```

4. Restart the server.

{% hint style="info" %}
Install it only if your players use Chinese names. Without it, Chinese names show on the name card. Nothing breaks.

A name with a letter outside the set (Japanese kana, Korean, a rare character) uses the name card, also with this resource.

With `Config.StandProps.sign.dui = false` there is no name card: then Chinese names need this resource.
{% endhint %}

***

## Anti-Cheat Whitelist

Your anti-cheat can block props it does not know. Most Food Stands props are **local** (only the player's own game spawns them), so a server-side anti-cheat never sees them. The server sees only the models below.

### Networked models

| Kind                          | Models                                                                                                                                               |
| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| Job vehicles                  | `sadler`, `rebel2` (your own if you changed `Config.Job.vehicle.models`)                                                                             |
| Trailers                      | `bowltrailer`, `burgertrailer`, `donertrailer`, `hotdogtrailer`, `icecreamtrailer`, `pizzatrailer`, `sandwichtrailer`, `sushitrailer`, `tacotrailer` |
| Eating and drinking (vanilla) | `prop_cs_burger_01`, `prop_cs_fork`, `prop_ecola_can`, `prop_food_bs_juice01`, `prop_ld_flow_bottle`, `vw_prop_casino_water_bottle_01a`              |
| Eating, ice cream scoops      | Our own `tw_` models                                                                                                                                 |

All our own models start with `tw_`. If your anti-cheat accepts a prefix or a wildcard, add `tw_*` and the models in the table.

The full list (every model, also local props and peds) is in this file:

{% file src="/files/IYWbcAY8wfJvtVwaJDht" %}
Food Stands 1.0.1 model list
{% endfile %}

{% hint style="info" %}
`tw-foodstandjob_cjk` (3D Chinese letters) props are local. Their names are `tw_cjk_letter_<code>`, so `tw_*` covers them too.
{% 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](https://docs.tworst.com/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" %}
The depot works with the **RTX Theme Park** map. 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](https://docs.tworst.com/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.2.4 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 %}
