> For the complete documentation index, see [llms.txt](https://docs.otherplanet.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otherplanet.dev/scripts/op-ambulance-job/installation.md).

# Installation

Before you start, make sure you're logged into the CFX portal. This ensures you can download the asset and receive future updates.

#### Downloading Dependencies

Dependencies are required before you start `op-ambulancejob`.

{% stepper %}
{% step %}
**ox\_lib**

{% embed url="<https://github.com/overextended/ox_lib>" %}
{% endstep %}

{% step %}
**oxmysql**

{% embed url="<https://github.com/overextended/oxmysql>" %}
{% endstep %}

{% step %}
**fivem-freecam**

Used by Hospital Admin prop placer.

{% embed url="<https://github.com/Deltanic/fivem-freecam>" %}
{% endstep %}

{% step %}
**op-ambulancejob-props**

Shipped with the package. Streams stretcher, wheelchair and CK skeleton models. Start it before `op-ambulancejob`.
{% endstep %}

{% step %}

### op-ambulancemdt

Shipped with the package
{% endstep %}
{% endstepper %}

***

#### Server.cfg

Start dependencies before our script. Framework and inventory must also be running.

```
ensure oxmysql
ensure ox_lib
ensure fivem-freecam
ensure op-ambulancejob-props
ensure op-ambulancejob
ensure op-ambulancemdt
```

***

#### Database

On first start the script creates its own tables automatically.

| Table                   | Purpose                               |
| ----------------------- | ------------------------------------- |
| `opa_hospitals`         | Hospitals created in `/hospitaladmin` |
| `opa_hospital_clothing` | Saved wardrobe outfits                |
| `opa_medical`           | Persisted medical state               |
| `opa_ck_permits`        | CK permits                            |
| `opa_ck_characters`     | CK character records                  |
| `opa_ck_corpses`        | World corpses / body bags             |

It also adds `insuranceDate` on `users` / `players` when missing, and optional `job` / `configName` columns on owned vehicle tables for job garage.

***

#### First Setup

{% stepper %}
{% step %}
**Create items**

{% content-ref url="/pages/GOmLXUl6V2wO4gEFQ8cC" %}
[Create Items](/scripts/op-ambulance-job/create-items.md)
{% endcontent-ref %}
{% endstep %}

{% step %}
**Grant Hospital Admin**

Follow How to add player to Hospital Admin, then open `/hospitaladmin`.
{% endstep %}

{% step %}
**Create a hospital**

Follow How to setup the first hospital. Link real framework job names (for example `ambulance`).
{% endstep %}

{% step %}
**Configure locale / currency**

Edit `config/MainConfig.lua` (`Config.Locale`, `Config.Currency`) and check other files listed in Config Files.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
EMS jobs come from hospitals you create in Hospital Admin - there is no static job name list to maintain for medic access.
{% endhint %}
