# Installation

## Installation

🧠 **Installation Guide**

***

1. **Deployment:** Drag and drop the `frkn-cleanjob`, `frkn-cleanlib`, and `frkn-cleanlib2` folders into your server's `resources` directory.

```
frkn-cleanjob
frkn-cleanlib
frkn-cleanlib2
```

```
resources
```

2. **Configuration:** Add ensure commands for the scripts to your `server.cfg`. **Important: Ensure the libraries before the main job script.**

```
ensure frkn-cleanlib
ensure frkn-cleanlib2
ensure frkn-cleanjob
```

```
server.cfg
```

3. **Database:** Import the provided SQL files ([window.sql](file:///c:/FrknEsx/txData/ESXLegacy_E7A565.base/resources/\[frkn]/frkn-cleanjob/window.sql)) to enable necessary database tables for the scripts, if not already configured via your framework.

***

**Required Dependencies**

To ensure the script functions correctly, make sure the following resources are installed and started in your `server.cfg`:

* **ox\_lib**
* **qb-core** / **es\_extended** / **qbx\_core**
* **ox\_target** / **qb-target** (optional, based on your config)
* **frkn-cleanlib**
* **frkn-cleanlib2**

> \[!IMPORTANT] **Resource Restart Required:** For the script and its internal mechanics (like NativeUI menus, target zones, and props) to initialize properly after the first installation or after making configuration changes, you must restart the server or manually restart the resources listed above. Use the command `ensure [resource-name]` in your server console to refresh them.

***

*This script relies heavily on `frkn-cleanlib` and `frkn-cleanlib2` for its core mechanics (like raycasting, syncing dirt meshes, and prop management). These libraries must be started before `frkn-cleanjob`!*

## ⚠️ Dispatch Notification — WEAPON\_SPRAYGUN <a href="#user-content-dispatch-notification-weapon_spraygun" id="user-content-dispatch-notification-weapon_spraygun"></a>

This script uses `WEAPON_SPRAYGUN` for cleaning missions. Most dispatch systems detect this as a **"shots fired"** event and send false alerts to players.

To prevent this, you need to **whitelist/ignore** `WEAPON_SPRAYGUN` in your dispatch script's config.

***

### Weapon Info <a href="#user-content-weapon-info" id="user-content-weapon-info"></a>

| Key  | Value             |
| ---- | ----------------- |
| Name | `WEAPON_SPRAYGUN` |
| Hash | `-1168940174`     |

***

### Examples <a href="#user-content-examples" id="user-content-examples"></a>

> **Note:** Every dispatch script has a different config structure. Find the example that matches yours below.

#### cd\_dispatch / cd\_dispatch2 <a href="#user-content-cd_dispatch--cd_dispatch2" id="user-content-cd_dispatch--cd_dispatch2"></a>

📁 `config.lua` → Look for `Config.WeaponBlacklist`

```
lua`WEAPON_SPRAYGUN`, -- Cleaning spray gun
```

#### ps-dispatch <a href="#user-content-ps-dispatch" id="user-content-ps-dispatch"></a>

📁 shared/config.lua → Look for `Config.BlacklistedWeapons`

```
lua[`WEAPON_SPRAYGUN`] = true, -- Cleaning spray gun
```

#### qs-dispatch <a href="#user-content-qs-dispatch" id="user-content-qs-dispatch"></a>

📁 `config.lua` → Look for `Config.IgnoreWeapons`

```
lua`WEAPON_SPRAYGUN`, -- Cleaning spray gun
```

#### core\_dispatch / rcore\_dispatch <a href="#user-content-core_dispatch--rcore_dispatch" id="user-content-core_dispatch--rcore_dispatch"></a>

📁 `config.lua` → Look for `Config.IgnoredWeapons`

```
lua"WEAPON_SPRAYGUN", -- Cleaning spray gun
```

***

> If your dispatch is not listed above, search your config for keywords like **Blacklist**, **Whitelist**, **Ignore**, or **Filter** and add `WEAPON_SPRAYGUN` to that list.

<br>
