> For the complete documentation index, see [llms.txt](https://code-after-sex.gitbook.io/script-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://code-after-sex.gitbook.io/script-documentation/cas-advanced-taxi-job/installation.md).

# Installation

Install CAS Advanced Taxi Job on a VORP or RSG Core RedM server with CAS RedM Cars, start order, the cab model and the first check.

The script runs on **VORP Core** and on **RSG Core**. The framework is found when the resource starts; `Config.Framework = 'auto'` needs no change.

## Requirements

| Resource                                                   | Purpose                                                                                                                                                                                                                           |
| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `oxmysql`                                                  | The three taxi tables (drivers, shifts, ledger). They are created on the first start.                                                                                                                                             |
| `vorp_core` or `rsg-core`                                  | Character, name, job and cash.                                                                                                                                                                                                    |
| `ox_lib`                                                   | RSG Core only: notifications. RSG Core already depends on it.                                                                                                                                                                     |
| [CAS RedM Cars](https://codeaftersex.com/script/redm-cars) | **Required.** The 1907 Tremont Taxicab (`c10p_tremont`) the drivers work in, run by its `cas-car1910` resource: yellow cab paint, `T 418` plates, the roof flag, fuel, engine health and rear doors that open for NPC passengers. |

{% hint style="warning" %}
CAS RedM Cars is a separate product. The taxi package contains no car: the Tremont Taxicab comes from [CAS RedM Cars](https://codeaftersex.com/script/redm-cars). Install it first by its own [installation guide](https://code-after-sex.gitbook.io/script-documentation/cas-redm-cars/installation).
{% endhint %}

### Optional

| Resource                                                | What it adds                                                                      |
| ------------------------------------------------------- | --------------------------------------------------------------------------------- |
| `cas-dealership` + `cas-garage` (part of CAS RedM Cars) | Drivers who bought a Tremont can work in their own cab.                           |
| `weathersync`                                           | The night tariff follows the synced game clock instead of the driver's own clock. |

## Steps

1. Copy the `cas-taxi` folder into your server's `resources` directory.
2. Start it in `server.cfg` after its dependencies:

```cfg
ensure oxmysql
# VORP
ensure vorp_core
# or RSG Core
# ensure ox_lib
# ensure rsg-core

# CAS RedM Cars (required), in its own start order
ensure cas-carplates
ensure cas-car1910
ensure cas-carpack
ensure cas-fuel
ensure cas-vehiclehud
ensure cas-dealership
ensure cas-garage
ensure cas-carrepair

ensure cas-taxi
```

3. Check the cab model (see below).
4. Look at the office coordinates in `config.lua`. The default office is the Tremont counter at Saint Denis Station; see [Offices and towns](/script-documentation/cas-advanced-taxi-job/offices-and-towns.md) to move it or add more.
5. Optional: set a Discord webhook in `config_server.lua` ([Server settings](/script-documentation/cas-advanced-taxi-job/server-config.md)).
6. Restart the server.

{% hint style="warning" %}
Keep the folder name `cas-taxi`. The NUI talks to the resource by its name.
{% endhint %}

## The cab model

With CAS RedM Cars started, nothing needs changing: rented cabs are the `c10p_tremont` Tremont Taxicab, painted cab yellow, with numbered plates and a working roof flag.

`Config.Vehicles` lists every model that counts as a cab, with the rear seats passengers use. You can add more models there, for example for own cabs with `Config.Own.Source = 'any'`:

```lua
Config.Cab = { Model = 'c10p_tremont', Label = 'Tremont Taxicab', ... }

Config.Vehicles = {
    { Model = 'c10p_tremont', RearSeats = { 1, 2 }, RearDoors = { [1] = 'door_lr', [2] = 'door_rr' }, ... },
}
```

On a model that is not a CAS RedM Cars car, the driver puts the flag up and down with **J** (`Config.Keys.Flag`), the doors are the game's own, and the paint, plate and fuel settings are not used.

## First check

* A **Cab Office** blip shows at Saint Denis Station.
* At the counter, the **Talk to the clerk** prompt opens the office. A new driver sees the rank *Cabbie, third class* and three cabs in at the stand.
* **Rent a cab** takes the $5.00 deposit and the cab appears at the stand with the flag up.
* Within a minute a telegram arrives at the top of the screen. **Y** takes the call.
* At the telegraph counter beside the office, **Wire for a cab** opens the passenger form.
* The server console shows no `No framework found` line.

{% hint style="info" %}
The clerk himself stands behind the counter only after staff place him with `/taxiclerk` (see [Offices and towns](/script-documentation/cas-advanced-taxi-job/offices-and-towns.md)). The prompt works without him.
{% endhint %}
