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

# Configuration

***

## <mark style="color:blue;">Money Wash Script Configuration Guide</mark>

This guide provides detailed instructions for configuring the **STG Money Wash** Script for FiveM. The script allows players to launder their black money at designated locations, with flexible options for framework detection, police requirements, and interaction types.

***

#### <mark style="color:blue;">Main Configuration</mark>

<mark style="color:green;">**`Config.Framework`**</mark>

* **Description**: This setting determines which framework the script will use. You can choose between `"esx"`, `"qb"`, or `"auto"`. If set to `"auto"`, the script will automatically detect the active framework on your server, providing flexibility for different setups.
* **Example**:

  ```lua
  Config.Framework = "auto" -- auto, esx, or qb
  ```

<mark style="color:green;">**`Config.Locales`**</mark>

* **Description**: This option allows you to choose the language for the script. The available options are `'EN'` (English), `'DE'` (German), `'FR'` (French), and `'SP'` (Spanish).
* **Example**:

  ```lua
  Config.Locales = 'EN' -- EN, DE, FR, SP
  ```

<mark style="color:green;">**`Config.InteractType`**</mark>

* **Description**: Choose the interaction method players will use for interacting with the money wash locations. Options include text UI, draw text, and target interactions. You can enable or disable each type as per your preference.
* **Example**:

  ```lua
  Config.InteractType = {
      ["textui"]   = { useThis = true },
      ["drawtext"] = { useThis = false },
      ["target"]   = { useThis = false }
  }
  ```

***

#### <mark style="color:blue;">Money Laundering Settings</mark>

<mark style="color:green;">**`Config.BlackMoneyItem`**</mark>

* **Description**: Defines the item used as black money in your server. Players will need this item to launder money.
* **Example**:

  ```lua
  Config.BlackMoneyItem = "black_money"
  ```

<mark style="color:green;">**`Config.MinPolice`**</mark>

* **Description**: Set the minimum number of police officers required to be online for the laundering process to be available. If fewer police are online, players won't be able to use the laundering locations.
* **Example**:

  ```lua
  Config.MinPolice = 0
  ```

<mark style="color:green;">**`Config.TimePerAmount`**</mark>

* **Description**: Defines the amount of time (in seconds) it takes to launder a specific amount of black money.
* **Example**:

  ```lua
  Config.TimePerAmount = 0.1 -- Time in seconds per amount
  ```

***

#### <mark style="color:blue;">Locations</mark>

<mark style="color:green;">**`Config.EnterLocations`**</mark>

* **Description**: This section defines the entrance locations for laundering black money. You can configure NPC (ped) settings, blip settings, and more for each location.
* **Example**:

  ```lua
  Config.EnterLocations = {
      [1] = {
          pedSettings = { coords = vector4(-481.3524, -63.7307, 38.9942, 357.0594), model = "a_m_o_ktown_01" },
          blipSettings = { enabled = true, id = 500, scale = 0.65, colour = 12, displayName = "Money Wash" }
      }
  }
  ```

<mark style="color:green;">**`Config.Locations`**</mark>

* **Description**: These are the actual money laundering locations where players can go to clean their black money. You can add or modify these coordinates to match the locations on your server.
* **Example**:

  ```lua
  Config.Locations = {
      [1] = vector4(1126.9615, -3194.2407, -40.3970, 0.1551),
      [2] = vector4(1125.5397, -3194.2898, -40.3974, 359.3980),
      [3] = vector4(1123.7719, -3194.2781, -40.3973, 351.9370)
  }
  ```

***

#### <mark style="color:blue;">Police Jobs</mark>

<mark style="color:green;">**`Config.PoliceJobs`**</mark>

* **Description**: This table defines the police jobs that will be counted towards the police minimum requirement. You can add additional police job titles if needed.
* **Example**:

  ```lua
  Config.PoliceJobs = {
      ["police"] = true
  }
  ```

***

#### <mark style="color:blue;">Notifications</mark>

<mark style="color:green;">**`Config.Notification`**</mark>

* **Description**: This function handles how notifications are displayed to players. It is compatible with both ESX and QBCore notifications, and you can customize how these notifications are triggered.
* **Example**:

  ```lua
  function Config.Notification(text, server, source)
      if server then
          TriggerClientEvent('esx:showNotification', source, text)
          TriggerClientEvent('QBCore:Notify', source, text)
      else
          TriggerEvent('esx:showNotification', text)
          TriggerEvent('QBCore:Notify', text)
      end
  end
  ```

***

#### <mark style="color:blue;">Framework Detection</mark>

<mark style="color:green;">**`getFramework()`**</mark>

* **Description**: This function detects and returns the active framework (ESX or QBCore). If `Config.Framework` is set to "auto", the script will automatically check which framework is running and return the corresponding framework object.
* **Example**:

  ```lua
  function getFramework()
      if Config.Framework == "esx" then
          return exports['es_extended']:getSharedObject(), "esx"
      elseif Config.Framework == "qb" then
          return exports["qb-core"]:GetCoreObject(), "qb"
      elseif Config.Framework == "auto" then
          if GetResourceState('qb-core') == 'started' then
              return exports["qb-core"]:GetCoreObject(), "qb"
          elseif GetResourceState('es_extended') == 'started' then
              return exports['es_extended']:getSharedObject(), "esx"
          end
      end
  end
  ```

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://stg-store.gitbook.io/documentation/scripts/money-wash/configuration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
