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

# Configuration

## Configuration

Main configuration file:

```txt
config.lua
```

This file controls framework detection, inventory support, target support, police requirements, heist cooldown, access permissions, required items, skill checks, thermite placement, minigames, rewards, and open customization options.

### Basic Settings

```lua
Config = {}

-- Recommended runtime setting.
-- Enable only while troubleshooting.
Config.Debug = false

-- Resource language.
Config.Locale = 'en'
```

### Framework

```lua
-- 'auto' detects the framework automatically when possible.
-- Available: 'auto', 'qb', 'esx'
Config.Framework = 'auto'
```

Supported frameworks:

```txt
QBCore
Qbox / QBX
ESX
```

For QBCore, Qbox, or QBX servers:

```lua
Config.Framework = 'qb'
```

For ESX servers:

```lua
Config.Framework = 'esx'
```

Automatic detection:

```lua
Config.Framework = 'auto'
```

Framework resource names:

```lua
Config.QBCore = {
    -- QBCore default:
    -- resource = 'qb-core'

    -- Qbox / QBX default:
    -- resource = 'qbx_core'

    resource = 'qb-core'
}

Config.ESX = {
    resource = 'es_extended'
}
```

For Qbox / QBX servers, use:

```lua
Config.QBCore = {
    resource = 'qbx_core'
}
```

### Inventory

```lua
-- 'auto' uses ox_inventory first when available, then framework inventory.
-- Available: 'auto', 'ox', 'qb', 'esx', 'custom'
Config.Inventory = 'auto'
```

Supported inventory systems:

```txt
ox_inventory
QBCore inventory
Qbox / QBX inventory setups
ESX inventory
Custom inventory through open/server.lua
```

Black money settings:

```lua
Config.BlackMoney = {
    -- ESX uses account money by default.
    esxAccount = true,

    -- QBCore / Qbox / QBX can use black money as an item.
    qbAsItem = true,

    -- Account or item name.
    accountName = 'black_money'
}
```

Custom inventory support is available in:

```txt
open/server.lua
```

### Target System

```lua
Config.Target = {
    -- Built-in target support.
    -- Custom target systems can be added in open/client.lua.
    system = 'ox_target',

    distance = 2.0
}
```

Custom target support is available in:

```txt
open/client.lua
```

### Police Settings

```lua
Config.Police = {
    -- Required police amount.
    required = 2,

    -- Police jobs counted by the built-in check.
    jobs = {
        'police',
        'sheriff'
    }
}
```

Custom police count logic is available in:

```txt
open/server.lua
```

### Heist Cooldown

```lua
Config.HeistCooldown = {
    enabled = true,

    -- Cooldown duration in seconds.
    duration = 45 * 60,

    -- Starts cooldown after this step is completed.
    -- Available: 'pc', 'fuse', 'keypad', 'thermite'
    startOn = 'fuse',

    -- Actions blocked while cooldown is active.
    blockStartActions = {
        pc = true,
        fuse = true
    }
}
```

When the configured step is completed successfully, the server starts the cooldown.

The active robbery can continue, but a new robbery cannot start from blocked actions until the cooldown ends.

### Job / Gang Access

```lua
Config.Access = {
    enabled = false,

    jobs = {
        -- 'police',
        -- 'mechanic'
    },

    gangs = {
        -- 'ballas',
        -- 'vagos'
    },

    actions = {
        pc = true,
        fuse = true,
        keypad = true,
        safeDoor = true,
        middleDoor = true,
        thermite = true,
        trolley = true,
        drill = true,
        looseGold = true,
        depositBoxOpen = true,
        depositBoxLoot = true
    },

    message = 'not_allowed'
}
```

Custom job, gang, whitelist, or permission checks are available in:

```txt
open/server.lua
```

### Flow Bypass

Flow bypass controls which steps can be skipped.

For standard robbery progression, keep all values `false`.

```lua
Config.FlowBypass = {
    keypad = {
        -- true = keypad can be used without completing PC.
        pc = false,

        -- true = keypad can be used without completing fuse box.
        fuse = false
    },

    door = {
        -- true = safe door can open without keypad completion.
        safeKeypad = false,

        -- true = middle door can open without safe door.
        middleNeedsSafe = false,

        -- true = cell / thermite door can open without middle door.
        cellNeedsMiddle = false
    },

    loot = {
        -- true = loot can be accessed without safe door.
        safeDoor = false,

        -- true = loot can be accessed without middle door.
        middleDoor = false,

        -- true = loot can be accessed without cell door.
        cellDoor = false,

        -- true = deposit box loot can be taken without opening the box first.
        depositBoxNeedsOpen = false
    },

    -- true = thermite can be used without normal previous-door requirements.
    thermite = false
}
```

### Required Items

Each robbery step can require an item.

`remove = true` removes the item after a successful action.

```lua
Config.RequiredItems = {
    pc = {
        enabled = false,
        item = 'hack_usb',
        amount = 1,
        remove = false
    },

    fuse = {
        enabled = false,
        item = 'electronickit',
        amount = 1,
        remove = false
    },

    keypad = {
        enabled = false,
        item = 'security_card_01',
        amount = 1,
        remove = false
    },

    safeDoor = {
        enabled = false,
        item = 'security_card_01',
        amount = 1,
        remove = false
    },

    middleDoor = {
        enabled = false,
        item = 'advancedlockpick',
        amount = 1,
        remove = false
    },

    thermite = {
        enabled = false,
        item = 'thermite',
        amount = 1,
        remove = true
    },

    trolley = {
        enabled = false,
        item = 'empty_bag',
        amount = 1,
        remove = false
    },

    drill = {
        enabled = false,
        item = 'laserdrill',
        amount = 1,
        remove = false
    },

    looseGold = {
        enabled = false,
        item = 'empty_bag',
        amount = 1,
        remove = false
    },

    depositBoxOpen = {
        enabled = false,
        item = 'crowbar',
        amount = 1,
        remove = false
    },

    depositBoxLoot = {
        enabled = false,
        item = 'empty_bag',
        amount = 1,
        remove = false
    }
}
```

### Skill Checks

Skill checks can be connected to external skill or level systems.

```lua
Config.SkillChecks = {
    enabled = false,

    pc = {
        enabled = false,
        skill = 'hacking',
        level = 1
    },

    fuse = {
        enabled = false,
        skill = 'electronics',
        level = 1
    },

    keypad = {
        enabled = false,
        skill = 'hacking',
        level = 1
    },

    thermite = {
        enabled = false,
        skill = 'thermite',
        level = 1
    },

    drill = {
        enabled = false,
        skill = 'drilling',
        level = 1
    },

    depositBoxOpen = {
        enabled = false,
        skill = 'lockpicking',
        level = 1
    }
}
```

Custom skill or level logic is available in:

```txt
open/server.lua
```

### Thermite Placement

```lua
Config.ThermitePlacement = {
    -- alpha = alpha placement only
    -- minigame_alpha = minigame first, then alpha placement after success
    mode = 'alpha'
}
```

Available modes:

```txt
alpha
```

Uses the built-in alpha placement system.

```txt
minigame_alpha
```

Runs the thermite placement minigame first. If successful, the alpha placement system starts.

Custom thermite minigame logic is available in:

```txt
open/minigames.lua
```

### Minigames

```lua
Config.Minigames = {
    pc = {
        enabled = true
    },

    fuse = {
        enabled = true
    },

    keypad = {
        enabled = true
    },

    drill = {
        enabled = true
    },

    thermitePlacement = {
        enabled = true
    }
}
```

Custom minigame logic is available in:

```txt
open/minigames.lua
```

Supported open minigame hooks:

```txt
PC hack
Fuse box hack
Keypad hack
Drill hack
Thermite placement minigame
```

### Rewards

```lua
Config.Rewards = {
    trolley = {
        cash = {
            item = 'black_money',
            min = 2500,
            max = 5000
        },

        gold = {
            item = 'goldbar',
            min = 1,
            max = 3
        },

        diamond = {
            item = 'diamond',
            min = 1,
            max = 2
        }
    },

    drill = {
        items = {
            { item = 'diamond', min = 1, max = 2, chance = 40 },
            { item = 'rolex', min = 1, max = 3, chance = 60 }
        }
    },

    looseGold = {
        item = 'goldbar',
        min = 1,
        max = 2
    },

    depositBox = {
        byProp = {
            ['h4_prop_h4_bracelet_01a'] = {
                item = 'rolex',
                amount = 1
            },

            ['h4_prop_h4_necklace_01a'] = {
                item = 'rolex',
                amount = 1
            },

            ['ch_prop_vault_dimaondbox_01a'] = {
                item = 'diamond',
                amount = 1
            },

            ['sf_prop_sf_jewel_01a'] = {
                item = 'rolex',
                amount = 1
            },

            ['p_cs_cam_phone'] = {
                item = 'phone',
                amount = 1
            }
        }
    }
}
```

Reward metadata can be customized in:

```txt
open/server.lua
```

### Open Customization Files

Editable customization files:

```txt
open/client.lua
open/server.lua
open/minigames.lua
locals/
config.lua
```

Open files include support for:

```txt
Minigames
Inventory functions
Money functions
Dispatch functions
Notifications
Progress bars
Target spawning
Translations
Evidence system
Stress system
Police checks
EXP functions
Skill checks
Job and gang permissions
Reward metadata
Custom framework compatibility
```

### Admin Commands

```txt
/paletoreset
```

Resets the active heist state.

```txt
/paletocooldown
```

Clears the active heist cooldown.

```txt
/paletostate
```

Prints the current heist state.

Required ACE permission:

```cfg
add_ace group.admin mi-paletoheist.admin allow
```

### Recommended Runtime Values

```lua
Config.Debug = false
Config.Framework = 'auto'
Config.Inventory = 'auto'
Config.HeistCooldown.enabled = true
```

### Qbox / QBX Notes

For Qbox / QBX servers, use the QB framework mode:

```lua
Config.Framework = 'qb'
```

Set the core resource name to Qbox / QBX:

```lua
Config.QBCore = {
    resource = 'qbx_core'
}
```

When using ox\_inventory with Qbox / QBX, keep:

```lua
Config.Inventory = 'auto'
```

or set:

```lua
Config.Inventory = 'ox'
```

Custom Qbox / QBX compatibility adjustments can be made in:

```txt
open/server.lua
open/client.lua
```


---

# 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://mi-store.gitbook.io/mistore-docs/resources/mi-paleto-heist/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.
