> ## Documentation Index
> Fetch the complete documentation index at: https://rust-co.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Put RCO Motorworks on the server in a few minutes.

## What you need

* A RedM server with **RSG Core** or **VORP Core**.
* **oxmysql** (the database connection both frameworks already use).
* **RCO Vehicles** version 0.1.128 or newer, with the vehicles that have accessories.

## Step by step

**1. Copy the folder**

Put the `rco-motorworks` folder inside your server's `resources` folder.

**2. Add it to server.cfg**

Start it **after** your database, your framework and RCO Vehicles:

```cfg theme={"dark"}
ensure oxmysql
ensure rsg-core        # or vorp_core
ensure rco-vehicles

ensure rco-motorworks
```

**3. Let your admins set owners**

Only for owned workshops. The command that gives a workshop an owner is for admins:

```cfg theme={"dark"}
add_ace group.admin command.motorworks allow
```

**4. Start the server**

The database tables (`rco_motorworks`, `rco_motorworks_staff`, `rco_motorworks_orders` and `rco_motorworks_credit`) are created by themselves on the first start. You don't need to import anything, there are no items to add and no jobs to create.

**5. Test it**

Take a vehicle out of an RCO Vehicles garage and drive it into the Saint Denis workshop. Press **R**: the workshop opens on your vehicle.

## Giving a workshop an owner

Type, in the game or in the server console:

```text theme={"dark"}
/motorworks owner saint_denis 12
```

`saint_denis` is the workshop's name in the config and `12` the player's id. `none` instead of the id leaves the workshop without an owner. The owner then goes to the counter and presses **G**.

To take the owner away: `/motorworks remove saint_denis`. The admin and the new owner see the result on screen.

The owner's office is at the workshop's `counter`, the mechanics' panel at its `staffCounter`.

## Changing things later

Every change in `config/config.lua` needs a restart to show up.

> [!WARNING]
>
> Close your game before restarting RCO Motorworks or RCO Vehicles, or restart the whole server. Restarting a resource while you are in the game can crash your game.

## Updating

Replace the folder with the new version. Your `config/config.lua` is yours: keep a copy before replacing and put your values back if the new version brings a new config. Owners, mechanics, tills and orders are kept in the database and are not touched by an update.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.