> ## 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.

# Configuration

> Full reference for configuration options in the Sellshop resource

## config/config.lua

### Global Settings

<ParamField path="debug" type="boolean" default="false">
  Shows polyzones created in-game. Useful when testing shop interaction zones.
</ParamField>

<ParamField path="Lan" type="string" default="en">
  Locale file to use (e.g. `'en'`). Matching locale files live under `locales/`.
</ParamField>

<ParamField path="Framework" type="string" default="auto">
  Framework adapter. Options: `'auto'`, `'qb'`, `'qbox'`, `'esx'`, or `'custom'`. Custom requires editing stubs in `opensource/client` and `opensource/server`.
</ParamField>

<ParamField path="ESX" type="string" default="new">
  ESX version when using ESX. Options: `"new"` or `"old"`.
</ParamField>

<ParamField path="Inventory" type="string" default="auto">
  Inventory adapter. Options: `"auto"`, `"ox"`, `"qb"`, `"origen"`, `"tgiann"`, `"esx"`, `"lj"`, `"ps"`, `"codem"`, or `"custom"`.
</ParamField>

<ParamField path="Notification" type="string" default="ox">
  Notification system. Options: `"ox"`, `"qb"`, `"esx"`, or `"custom"`.
</ParamField>

<ParamField path="Progressbar" type="string" default="ox">
  Progress bar system. Options: `"ox"`, `"qb"`, or `"custom"`.
</ParamField>

<ParamField path="ProgressbarType" type="string" default="circle">
  Ox progress bar style only. Options: `"circle"` or `"bar"`.
</ParamField>

<ParamField path="Dispatch" type="table">
  Dispatch settings for suspicious sales. `Resource` can be `'auto'` or a supported dispatch name; set to `"other"` / custom and edit opensource if unsupported.

  ```lua theme={null}
  Dispatch = {
      Resource = 'auto',
      Title = 'Suspicious Sale',
      Message = 'A Suspicious sale was made',
      Code = '10-69',
      Blip = {
          Text = 'Suspicious Sale',
          Color = 1,
          Sprite = 69,
          Scale = 0.8
      }
  }
  ```
</ParamField>

<ParamField path="Interaction" type="string" default="auto">
  Interaction system. Options: `'auto'`, `'ox_target'`, `'qb-target'`, `'drawtext'`, or `'worldinteract'` ([interact](https://github.com/darktrovx/interact)).
</ParamField>

<ParamField path="DrawtextButton" type="number" default="38">
  Key code for drawtext interactions. `38` is `[E]` by default.
</ParamField>

<ParamField path="Drawtext" type="string" default="OX">
  Drawtext UI style. Options: `"OLDQB"`, `"QB"`, or `"OX"`.
</ParamField>

<ParamField path="CurrencySymbol" type="string" default="$">
  Currency symbol shown in the sell menu UI.
</ParamField>

<ParamField path="InventoryPath" type="string" default="auto">
  Path to inventory item images. `"auto"` detects common inventory image folders.
</ParamField>

<ParamField path="PoliceJobs" type="table" default="{[&#x22;police&#x22;] = true}">
  Jobs counted for `PoliceCount` checks and dispatch alerts.

  ```lua theme={null}
  PoliceJobs = {["police"] = true, ["fbi"] = true}
  ```
</ParamField>

<ParamField path="UseXP" type="boolean" default="false">
  Enable XP awards on sell when items define an `Exp` field.
</ParamField>

<ParamField path="ClientSideXP" type="boolean" default="false">
  When `true`, XP is granted via the client `AddExp` event. When `false`, the server `AddExp` opensource hook runs (default pickle\_xp).
</ParamField>

<ParamField path="ProgressbarConfig" type="table">
  Optional sell progress bar and animation.

  ```lua theme={null}
  ProgressbarConfig = {
      Enable = false,
      Duration = 2000,
      Text = 'Selling...',
      Animation = {
          Enable = true,
          NPCSync = true,
          Dict = 'mp_common',
          Anim = 'givetake1_b',
      }
  }
  ```
</ParamField>

<ParamField path="ServerCoords" type="boolean" default="false">
  When `true`, shop coordinates are read from `config/sv_config.lua` (`Locations`) instead of client config — useful to protect coords from dumpers.
</ParamField>

<ParamField path="Shops" type="table">
  Table of shop definitions keyed by shop id (e.g. `'pawnshop'`, `'suspiciousbuyer'`). See structure below.
</ParamField>

***

## Shop Structure

Each entry in `Config.Shops` is a full shop. Concise example:

```lua theme={null}
['myshop'] = {
    ["MenuTitle"] = 'My Shop',
    ["TargetIcon"] = 'fas fa-dollar-sign',
    ["TargetText"] = 'Sell Products',
    ["TargetSize"] = 1.5,
    ["TargetDistance"] = 1.0,
    ["OnlyShowItemsInInventory"] = false,

    ["Coords"] = vec4(412.15, 315.22, 102.13, 210.65),
    -- Or an array of vec4 for a random spawn location:
    -- ["Coords"] = { vec4(...), vec4(...) },

    ["Ped"] = {
        Enable = false,
        Model = `a_m_m_business_01`,
        -- IdleAnimation, SuccessfulAnimation, PedSuccessfulAnimation...
    },

    ["TimeFrame"] = {
        Enable = true,
        Time = {open = 9, close = 22},
    },

    ["PoliceCount"] = 0,

    ["Blip"] = {
        Enable = true,
        Text = "My Shop",
        Sprite = 605,
        Color = 0,
        Scale = 0.8,
    },

    ["Items"] = {
        ['goldbar'] = {
            Label = "Gold Bar",
            Price = 100,
            -- DispatchChance = 60,
            -- ["DisableMoney"] = false,
            -- ["DirtyMoney"] = { Enable = true, Item = "black_money", MetaData = false },
            -- ["ItemReward"] = { Enable = true, Item = "pawnshopcoin", Amount = 1 },
            -- ["Volume"] = { Enable = true, AmountUntilDropInPrice = 10, DropInPrice = 10 },
            -- ["Exp"] = 5,
        },
    },

    ["BulkSale"] = {
        Enable = false,
        BulkAmount = 10,
        ExtraCash = 10, -- % bonus cash when selling BulkAmount or more
    },
}
```

| Field                       | Purpose                                                                                                    |
| --------------------------- | ---------------------------------------------------------------------------------------------------------- |
| `MenuTitle` / target fields | Menu title, icon, text, size, distance; `OnlyShowItemsInInventory` filters the menu                        |
| `Coords`                    | Single `vec4` or array of `vec4` (one random location)                                                     |
| `Ped`                       | Optional NPC: model, idle/success animations (`AdvancedAnimation` uses a fixed give/take when enabled)     |
| `TimeFrame`                 | Open/close hours; closed shops notify on interact                                                          |
| `PoliceCount`               | Minimum police online to use the shop                                                                      |
| `Blip`                      | Map blip settings                                                                                          |
| `Items`                     | Sellables: `Price`, optional `DirtyMoney`, `ItemReward`, `Volume`, `Exp`, `DispatchChance`, `DisableMoney` |
| `BulkSale`                  | Extra cash % when selling at least `BulkAmount` of an item                                                 |

***

## presets/

Use `LoadPreset(name, data)` in files under `presets/` to add or overwrite shops in `Config.Shops`. The built-in `"example"` preset name is skipped by design — rename your preset when copying it.

***

## config/sv\_config.lua

When `ServerCoords = true`, define locations here:

```lua theme={null}
Locations = {
    ['pawnshop'] = vec4(412.15, 315.22, 102.13, 210.65),
    ['suspiciousbuyer'] = {
        vec4(259.51, 2584.91, 43.95, 9.83),
        vec4(1915.52, 3735.22, 31.64, 206.85),
    },
}
```

***

## config/logs.lua

Optional sale logging:

<ParamField path="Enable" type="boolean" default="false">
  Enable or disable logging.
</ParamField>

<ParamField path="Service" type="string" default="discord">
  Logging service: `"discord"`, `"fivemerr"`, `"fivemanage"`, or `"custom"` (edit opensource server hooks).
</ParamField>

<ParamField path="APIKey" type="string" default="">
  Discord webhook URL or Fivemerr/Fivemanage API key.
</ParamField>
