> For the complete documentation index, see [llms.txt](https://patriot-studios.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://patriot-studios.gitbook.io/docs/scripts/money-wash/installation-guide.md).

# Installation Guide

Welcome to Patriot Studios installation guide for patriot\_money\_wash!&#x20;

As there are 2 different versions of this script (Lite & Advanced), you will either be working with patriot\_money\_wash\_free or patriot\_money\_wash. This guide will walk your through the complete installation process to ensure a problem-free setup.

{% hint style="warning" %}

#### DEPENDENCY ALERT

This script requires that you have the resources ox\_lib & oxmysql installed on your server. ox\_lib & oxmysql are installed by default on Qbox frameworks, however other frameworks may not have it installed by default. If your server does not have ox\_lib installed, then you can install it [**HERE**](https://overextended.dev/ox_lib)**.** If your server does not have oxmysql installed, then you can install it [**HERE**](https://overextended.dev/docs/oxmysql)**.**

It is also recommended to have either ox\_target or qb-target installed for full interaction support (do not run both). You can install ox\_target [**HERE**](https://github.com/overextended/ox_target)**.**
{% endhint %}

#### Asset Download

{% hint style="info" %}
To find the asset, you must have made the purchase using your own CFX account. Otherwise, you can use the transfer system to move the asset to a different keymaster account.
{% endhint %}

Once the **purchase** has been made on **our official website**, you will receive your asset directly in your [**Cfx Portal**](https://portal.cfx.re/assets/granted). Through the Cfx Portal Asset Panel you can download the asset and install it following the below documentation.

#### Starting The Script On Your Server

1. Once inside the Assets section of your Cfx Portal, under the Granted Assets category your will see an asset created by Auslo with the name "Patriot Studios | Money Wash". Click download.
2. Once downloaded, unzip the file & you will now find inside the unzipped file, the folder patriot\_money\_wash\_free or patriot\_money\_wash.&#x20;
3. Copy the folder & place it inside your server's resources folder (You can place patriot\_money\_wash under any folder inside the resources folder, however it is recommended you place patriot\_money\_wash under the \[standalone] folder)
4. Once patriot\_money\_wash has been placed inside the server's resources folder, you should now access your server's server.cfg file.&#x20;
5. Inside server.cfg add "ensure patriot\_money\_wash\_free" or "ensure patriot\_money\_wash" after "ensure ox\_lib" & "ensure oxmysql".
6. Now you need to add the washing machine item to your server's inventory system. Follow the next section below to do so.

#### Adding The Washing Machine To Your Server's Inventory System

**If using ox\_inventory**&#x20;

1. Add to `data/items.lua`:&#x20;

```
['washing_machine'] = {
        label = 'Washing Machine',
        weight = 20000,
        stack = false,
        client = {
            image = 'washing_machine.png',
        },
    },
```

2. Find the washing machine's icon inside patriot\_money\_wash (`washing_machine.png`) & copy the image into ox\_inventory's image folder (`ox_inventory/web/images/`)

Congrats! You have now successfully added the item to your inventory system. Now restart your server & the installation is fully complete!

**If using esx\_inventory (ESX's default inventory system) or qb-inventory (QBCore's default inventory system)**

You have to add the item manually to your sql database. To do this, use a database management tool (such as `HeidiSQL`) to `access your database`.

Once inside your database

1. Find your `items table` & click on it
2. Now find the `data section inside your items table` & click on it
3. Now right click anywhere in the data section & click `Insert row`
4. In your newly created row, fill out the values:

name: `washing_machine` label: `Washing Machine` weight: `20`

Congrats! You have now successfully added the item to your inventory system. Now restart your server & the installation is fully complete!

#### Implementing Discord Logs

If you want to implement discord logs (allows for full monitoring of player interactions with the script), follow these steps:

1. Create a channel inside your discord server
2. Go to your newly created channel's settings & under integrations, click `Webhooks`
3. Once in `Webhooks`, create a `New Webhook` & name it whatever
4. Click `Copy Webhook URL`
5. Paste inside this script's `config.lua` where the variable `webhook` is

Now all the `events` listed under the `Config.Logs events` table inside `config.lua` will be logged inside that discord channel. You can enable / disable specific event by setting them `true / false` in that table!

#### Implementing Admin Commands

This script comes with 2 commands admins can use in-game:

Remove washing machine (`add_ace group.admin command.removewashmachine allow`) - Allows admins to remove a specific washing machine by looking at it & then typing `/removewashmachine` in chat

Noise complaint zone preview (`add_ace group.admin command.previewnoisezones allow`) - Allows admins to see all the different noise complaint zones (created inside the script's config) that are currently in the server for a preset amount of time (configurable) by typing `/previewnoisezones` in chat

To implement these commands, place their ace\_admin permissions (shown above) inside your server.cfg. Once done, they are fully implemented & ready to go!

#### Enhancing The Sound

If you want to enhance the sound of the washing machine, you can download xsound [**HERE**](https://github.com/Xogy/xsound)**.**

Once xsound has been installed, restart your server & the audio will automatically enhance!

#### Editing The Config

To make changes to key features of the script, you can do this through editing the script's config file. For a full explanation of the config file & what you can change, please refer to the [**Config**](/docs/scripts/money-wash/advanced-config.md) pag&#x65;**.**

#### Adding Your Own Systems / Editing The Util Files

If you want to add your own systems to interact with the script (Such as a custom dispatch system), you can do so by editing the server & client util files. More information on how to do this will be released soon, but in the mean time you can make a support ticket on our [**Discord**](https://discord.gg/V5KuJPDkw6) & The Patriot will implement the changes for you!&#x20;
