# Installation

Install CODE3RESPONSE with the setup wizard, `c3rsetup.exe`. It downloads the latest release and builds your own `[c3r_core]` folder with the add-ons and settings you pick; you then drop that folder into your server.

> [!NOTE]
> CODE3RESPONSE is in public beta soon. The steps below are how installing works once it's out.

## Before you start

- Your server runs **OneSync** and up-to-date server artifacts.
- **[oxmysql](https://github.com/overextended/oxmysql)** is installed and `mysql_connection_string` is set in `server.cfg`.
- If you'll pick the phone or a radar, install **[ox_lib](https://github.com/overextended/ox_lib)**. For the taser, install **[ox_target](https://github.com/overextended/ox_target)**.
- Remove any other police game mode (ERS, FivePD, a framework police job's traffic stops). Two scripts fighting over the same keys and peds won't end well.

## 1. Run the wizard

Run `c3rsetup.exe` on any Windows PC. It doesn't have to be the server: the wizard never touches your server, it only builds a folder, so Windows and Linux servers are both fine. It needs internet while it runs.

> [!WARNING]
> The wizard isn't code-signed yet, so Windows SmartScreen may show "Windows protected your PC". Click **More info**, then **Run anyway**.

The wizard walks through:

1. **Welcome:** pick **New install**.
2. **Add-ons:** the core is always included. Tick the add-ons you want. The MDT is ticked by default; leaving it out asks you to confirm, because a lot of c3r shows up there.
3. **Settings:** keybinds, who may go on duty, backup vehicles and chances. Everything is filled in with sensible defaults, so you can just press Next.
4. **Where should it go?** Your desktop is fine.
5. **Building:** it downloads the release and writes `[c3r_core]` with your choices.

## 2. Add it to your server

Drag the whole `[c3r_core]` folder into your server's `resources` folder. Keep the folder names as they are: the resources find each other by name.

Then add one line to `server.cfg`, after oxmysql (and after ox_lib and ox_target if you use them):

```cfg
ensure oxmysql
ensure [c3r_core]
```

The resources declare their own dependencies, so they start in the right order inside the folder. The brackets tell FiveM to start everything in it.

## 3. Start the server

Restart the server fully (not just `ensure` the folder). On first start c3r and the MDT create their database tables. Watch the console for red errors.

> [!NOTE]
> The first time each player joins, they download voice dispatch's speech model and voice clips, about 210 MB. That join is slower; later ones aren't. Code updates never make them download it again.

## 4. Check it works

1. In game, press **F11** and pick **Police**. You're on duty.
2. Get in a police car and drive. Press **Left Shift** to put the red circle on the road ahead, steer it under a car, then turn on your lights. The car pulls over.
3. Hold **H** and say "plate check". Dispatch reads the plate back.
4. Press **F7**. The MDT opens with your stop on the calls board.

If any step fails, see [Common errors](/docs/getting-started/common-errors).

## Permissions

Nothing needs a permission to play. These are optional:

```cfg
# Admins: the in-game config editor (/c3rconfig) and callout placement (/c3rplace)
add_ace group.admin command.c3rconfig allow

# MDT supervisors: edit or delete anyone's report, run /mdtexport
add_ace group.admin lwk_mdt.supervisor allow

# Phone admin commands (if you picked the phone)
add_ace group.admin lwk_phone.admin allow
```

To limit who can go on duty, set `Config.DutyAce` in c3r's config (see [Configuration](/docs/c3r/configuration#the-basics)).
