> ## Documentation Index
> Fetch the complete documentation index at: https://docs.projectx.gg/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Step by step instructions to install and configure the Project X Bridge

## Installation Steps

<Steps>
  <Step title="Install required dependencies">
    <Warning>
      Verify all dependencies below are started **before** this script in your `server.cfg`.
    </Warning>

    <Card title="ox_lib" icon="book" href="https://github.com/CommunityOx/ox_lib/releases/latest">
      Download ox\_lib
    </Card>
  </Step>

  <Step title="Download the bridge">
    The bridge is provided **free with the purchase** of any script that requires it.

    1. Go to your [CFX Portal - Granted Assets](https://portal.cfx.re/assets/granted-assets?page=1\&sort=asset.updated_at\&direction=asc\&search=projectx-bridge)
    2. Search for `projectx-bridge`
    3. Download and extract the resource

    <Info>
      If you don't see the bridge in your portal, make sure you have purchased a script that includes it. The asset is granted automatically with those purchases.
    </Info>
  </Step>

  <Step title="Extract and place the resource">
    Extract the bridge from the zip file and place it into your standalone folder or a folder that is started **before** your Project X scripts.
  </Step>

  <Step title="Configure the resource">
    Open `config/config.lua` and adjust the settings to match your server setup. See the [configuration](#configuration) section below.

    Most settings support `'auto'` which will automatically detect your resources at startup.
  </Step>

  <Step title="Add to server.cfg">
    Add the bridge **before** any script that depends on it:

    ```cfg theme={null}
    ensure ox_lib
    ensure projectx-bridge

    ensure projectx-sandybankrobbery-prompt
    ensure projectx-ammunationrobbery-tstudio
    ```
  </Step>
</Steps>

<Warning>
  The bridge must be started **before** any script that depends on it in your `server.cfg`. Scripts will fail to load if the bridge is not running.
</Warning>

## Configuration

Below is the full configuration with explanations for every option.

```lua theme={null}
Config = {
    Lan = 'en',
    Framework = 'auto',
    ESX = "new",
    Inventory = "auto",
    Notification = "ox",
    Progressbar = "ox",
    XPSystem = "auto",
    Interaction = "auto",
    Drawtext = "ox",
    Evidence = "auto",
    LogsService = "discord",
    Dispatch = "auto",

    GlobalCooldownDuration = 15,

    EnableGlobalCooldown = {
        ["projectx-sandybankrobbery-prompt"] = false,
        ["projectx-ammunationrobbery-tstudio"] = false,
        ["projectx-ammunationrobbery-fm"] = false,
        -- ... all other scripts
    }
}
```

### Core Settings

<ParamField path="Lan" type="string" default="en">
  The language for all scripts using the bridge. Supported values: `en`, `pl`, `de`, `da`, `fr`, `in`, `am`, `ph`, `no`, `nl`, `ja`, `ru`, `gr`, `se`, `lt`, `ar`, `bg`, `bs`, `cn`, `cs`, `ee`, `es`, `et`, `fa`, `fi`, `ge`, `he`, `hu`, `id`, `is`, `it`, `lv`, `pt`, `pt-br`, `ro`, `rs`, `sl`, `sv`, `th`, `tr`, `vn`
</ParamField>

<ParamField path="Framework" type="string" default="auto">
  Your server framework. Use `'auto'` to detect automatically, or set manually:

  * `'qbox'` - Qbox
  * `'qb-core'` - QBCore
  * `'esx'` - ESX
  * `'custom'` - Custom (requires editing the open source functions)
</ParamField>

<ParamField path="ESX" type="string" default="new">
  ESX version, only relevant if you are using ESX as your framework:

  * `'new'` - ESX 1.5+
  * `'old'` - ESX 1.4 and below
</ParamField>

<ParamField path="Inventory" type="string" default="auto">
  Your inventory system. Use `'auto'` to detect automatically, or set manually:

  * `'ox'` - ox\_inventory
  * `'qb'` - qb-inventory
  * `'ps'` / `'lj'` - ps-inventory / lj-inventory
  * `'codem'` - codem-inventory
  * `'origen'` - origen\_inventory
  * `'tgiann'` - tgiann-inventory
  * `'ak47'` - ak47\_inventory (Menan AK 47 Inventory)
  * `'jpr'` - jpr-inventory (JP Resources Inventory)
  * `'one'` - one\_inventory (One Inventory)
  * `'esx'` - ESX default inventory
  * `'other'` - Custom (requires editing the open source inventory export)

  See the [FAQs](/faqs) for links to each inventory resource.
</ParamField>

<ParamField path="Notification" type="string" default="ox">
  Notification system to use:

  * `'ox'` - ox\_lib notifications
  * `'qb'` - QBCore notifications
  * `'esx'` - ESX notifications
</ParamField>

<ParamField path="Progressbar" type="string" default="ox">
  Progress bar system to use:

  * `'ox'` - ox\_lib progress circle
  * `'qb'` - QBCore progressbar
</ParamField>

<ParamField path="XPSystem" type="string" default="auto">
  XP/skills system. Use `'auto'` to detect automatically, or set manually:

  * `'projectx'` - projectx-xp
  * `'pickle'` - pickle\_xp
  * `'sd-levels'` - sd-levels
  * `'cw-rep'` - cw-rep
  * `'ot_skills'` - OT\_skills
  * `'none'` - No XP system
</ParamField>

<ParamField path="Interaction" type="string" default="auto">
  Interaction/target system. Use `'auto'` to detect automatically, or set manually:

  * `'ox_target'` - ox\_target
  * `'qb-target'` - qb-target
  * `'interact'` - World Interact (darktrovx/interact)
  * `'drawtext'` - Drawtext fallback (no target system)
</ParamField>

<ParamField path="Drawtext" type="string" default="ox">
  Drawtext system used when Interaction is set to `'drawtext'`:

  * `'ox'` - ox\_lib TextUI
  * `'qb'` - QBCore DrawText
  * `'OLDQB'` - qb-drawtext (legacy)
</ParamField>

<ParamField path="Evidence" type="string" default="auto">
  Evidence system for fingerprint drops. Use `'auto'` to detect automatically, or set manually:

  * `'qbx_police'` / `'qb-police'`
  * `'wasabi'` - wasabi\_evidence
  * `'snipe'` - snipe-evidence
  * `'dlab'` - d\_labs\_evidence
  * `'tk'` - tk\_evidence
  * `'dusa'` - dusa\_evidence
  * `'r14'` - r14-evidence
  * `'kartik'` - kartik-evidence
  * `'none'` - Disabled
</ParamField>

<ParamField path="LogsService" type="string" default="discord">
  Logging service for script activity:

  * `'discord'` - Discord webhooks
  * `'fivemerr'` - Fivemerr
  * `'fivemanage'` - Fivemanage
  * `'custom'` - Custom (requires editing the open source logs function)
</ParamField>

<ParamField path="Dispatch" type="string" default="auto">
  Dispatch system. Use `'auto'` to detect automatically, or set manually using one of the config values below. See the [FAQs](/faqs) for the full list with resource links.

  Supported config values: `cd`, `cd3d`, `ps`, `fd`, `outlaw`, `codem`, `five-dispatch`, `qf`, `aty`, `zat-mdt`, `opto`, `kartik`, `brutal`, `origen`, `tk`, `rcore`, `lb`, `redutzu`, `lg`, `vx`, `l2s`, `sonoran`, `piotreqv1`, `piotreqv2`, `pp-mdt`, `core`, `oxide`, `emergencydispatch`, `wasabimdt`, `nextscripts`, `kibra`, `imperial`

  For unsupported dispatch systems:

  * Set to `'customsv'` and edit `opensource/server.lua` for server-side dispatch
  * Set to `'customcl'` and edit `opensource/client.lua` for client-side dispatch
</ParamField>

### Global Cooldown

<ParamField path="GlobalCooldownDuration" type="number" default="15">
  How long the global cooldown lasts in minutes. When a robbery is completed on a script that has the cooldown enabled, all other scripts with cooldowns enabled will be locked for this duration.
</ParamField>

<ParamField path="EnableGlobalCooldown" type="table">
  A table of resource names and whether the global cooldown applies to them. Set a script to `true` to include it in the global cooldown system, or `false` to exclude it.

  ```lua theme={null}
  EnableGlobalCooldown = {
      ["projectx-sandybankrobbery-prompt"] = true,
      ["projectx-storerobbery-fmv2"] = true,
      ["projectx-ammunationrobbery-tstudio"] = true,
      ["projectx-bobcatheist-k4mb1"] = false,
      ["projectx-cashexchangerobbery-k4mb1"] = false,
      -- See config.lua in projectx-bridge for the full list of script names
  }
  ```
</ParamField>
