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

# Configuration

> Configure bridges, gameplay rules, stores, rewards, and private logging settings.

FA Shop Robbery separates shared gameplay settings, reward tables, and server-only secrets.

| File                       | Purpose                                             | Sent to clients |
| -------------------------- | --------------------------------------------------- | --------------- |
| `config/config.lua`        | Bridges, gameplay, stores, minigames, and cooldowns | Yes             |
| `config/rewards.lua`       | Register, shelf, and safe reward tiers              | Yes             |
| `config/server_config.lua` | Webhooks, API keys, and standalone currency items   | No              |

<Warning>
  Keep webhook URLs and API keys in `config/server_config.lua`. Never move secrets into `config/config.lua` or client files.
</Warning>

## Bridge settings

```lua config/config.lua theme={null}
Config.Locale = 'pl'
Config.Framework = 'auto' -- auto, qbox, qb, esx, standalone
Config.Inventory = 'auto' -- auto, supported inventory, custom
Config.Target = 'auto'    -- auto, ox_target, qb-target, qtarget, none
Config.Dispatch = 'auto'  -- auto, supported dispatch, qb, none, custom
```

Use `none` for the `ox_lib` TextUI target fallback or to disable dispatch. Use `custom` only after implementing the relevant adapter.

## Clerk and robbery rules

<AccordionGroup>
  <Accordion title="Clerk behavior" icon="person">
    `Config.Clerk.Enabled` controls all clerks. `IntimidationMode` accepts `target`, `aim_weapon`, or `both`. You can also configure code disclosure, idle scenarios, silent alarms, and clerk combat.

    Disable one clerk with `store.clerk = false` or `store.clerk.enabled = false`.
  </Accordion>

  <Accordion title="Police and robbery order" icon="shield-halved">
    `Config.MinimumPolice` sets the required online officer count. `Config.PoliceJobs` defines which jobs count.

    Use `Config.Flow.RequireClerkBeforeLoot` and `Config.Flow.RequireRegisterBeforeSafe` to enforce a stricter sequence.
  </Accordion>

  <Accordion title="Cooldowns" icon="clock">
    `Config.Cooldown.StoreSeconds` and `PlayerSeconds` control repeat attempts. `Global` can be `false`, `true`, or a duration in seconds.

    Cooldowns and robbery state are runtime-only. Restarting the resource clears them.
  </Accordion>

  <Accordion title="Security" icon="shield-check">
    `Config.Security.AllowedWeapons = true` accepts every weapon. Replace it with a hash table to allow only selected weapons.

    Distance, reward, duplicate-claim, cooldown, required-item, and keypad checks remain server-authoritative.
  </Accordion>
</AccordionGroup>

## Safe access

A store can offer one or more safe methods.

```lua config/config.lua theme={null}
safe = {
    coords = vector3(0.0, 0.0, 0.0),
    heading = 0.0,
    methods = { 'keypad', 'drill' },
    keypad = { MaxAttempts = 3, Timeout = 30000 },
    drill = { Difficulty = 2, Timeout = 45000, MinCompletionMs = 6000 },
    prop = true
}
```

The keypad code is generated and validated on the server. Wrong keypad entries lock only the keypad after the configured attempt limit. Another configured method can remain available.

<Tip>Set `Config.Minigames.Safe = 'fa_minigames'` to route keypad and drill methods to the bundled resource.</Tip>

## Reusable profiles

Put reusable progress, police, safe, and clerk settings in `Config.Profiles`, then select a profile with `store.profile`.

```lua config/config.lua theme={null}
Config.Profiles = {
    standard = {
        MinimumPolice = 2,
        Clerk = {
            Fight = { Chance = 15 },
            SilentAlarm = { Enabled = true, Chance = 35 }
        }
    }
}
```

Values resolve in this order:

`direct store override` → `selected profile` → `global configuration`

Reward tiers and cooldowns stay independent from profiles.

## Reward tiers

`tier` or `rewardTier` on a store selects the matching table index in `config/rewards.lua`.

```lua config/rewards.lua theme={null}
Rewards.Register = {
    [1] = {
        { type = 'money', account = 'dirty', min = 250, max = 850, chance = 100 }
    }
}
```

Reward entries support `money` or `item`, a chance from `0` to `100`, and minimum and maximum amounts. Item names must exist in your inventory. `Rewards.PoliceMultiplier` can increase reward values for each online officer up to a configured cap.

## Server-only logging

```lua config/server_config.lua theme={null}
ServerConfig.Logs = 'discord' -- console, discord, ox_lib, fivemanage, fivemerr, custom, none
ServerConfig.DiscordWebhook = 'YOUR_WEBHOOK_URL'
```

Standalone mode gives cash and dirty-money rewards as inventory items. Configure their names through `ServerConfig.StandaloneMoneyItems`.

Next: [add a store or tune rewards](/scripts/shop-robbery/guides).
