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

# Introduction

> A heist contract marketplace, dashboard, and progression system for FiveM.

`cc_heistcontracts` is the central hub other heist resources plug into. It contains:

* The **player profile** (level, XP, VICE balance, contract slots, completion stats, alias).
* The **dashboard NUI** — opened by using the `heist_tablet` (Contracts Tablet) inventory item — where players see available contracts, manage slots, shop the marketplace, and practice in the training sandbox.
* The **marketplace listings** — new contract listings drip into the marketplace one at a time, weighted by each contract's rarity. Old listings get culled after a configurable expiry.
* The **slot economy** — players hold up to 3 (configurable) purchased contracts. Starting one marks the slot active; finishing or giving up consumes it.
* The **active-heist tracking** — one heist per player at a time. The dashboard shows live state for the active slot and exposes a Give Up button that asks the heist resource to tear the run down.
* A **VICE economy** with a server-authoritative ledger.
* A **marketplace** for heist-prep items with timed pickup locations.
* A **training sandbox** that gates [cc\_minigames](/cc_minigames/index) games behind level + VICE unlocks.
* A **crew (group) layer** wrapping `cc_lib.Groups`.

## Capabilities at a glance

<Columns cols={2}>
  <Card title="Register contracts" icon="plug" href="/cc_heistcontracts/registering-contracts">
    One `RegisterContract` call with optional `cancel` + `reset` callbacks in `opts`. Plus `FinishHeist`/`FinishContract` to signal completion, and `ApplyCooldown` for server-wide locks.
  </Card>

  <Card title="Configure listings, slots, XP" icon="sliders" href="/cc_heistcontracts/configuration">
    Three config files: `shared/config.lua`, `shared/marketplace_config.lua`, `shared/training_config.lua`. All hot-editable; restart the resource to apply.
  </Card>

  <Card title="Dashboard NUI" icon="window" href="/cc_heistcontracts/dashboard">
    Opened by using the `heist_tablet` inventory item. Sync, alias gating, contracts, marketplace, active-heist panel, ledger, training. React/Vite app served from `web/`.
  </Card>

  <Card title="Marketplace + pickups" icon="cart-shopping" href="/cc_heistcontracts/marketplace">
    VICE checkout, server-rolled pickup locations with time windows, ox\_target zone with a "Knock" interaction.
  </Card>

  <Card title="Training sandbox" icon="dumbbell" href="/cc_heistcontracts/training">
    Practice cc\_minigames games for free (no rewards, no penalty). Access fee + per-minigame unlocks behind level requirements.
  </Card>

  <Card title="Admin tools" icon="shield" href="/cc_heistcontracts/admin">
    `/heist:grantxp` (ACE-gated), debug logging, SQL recipes for profile resets and stuck slots.
  </Card>
</Columns>

## Dependencies

* [`ox_lib`](https://github.com/overextended/ox_lib)
* [`oxmysql`](https://github.com/overextended/oxmysql)
* `cc_lib` (Core, Groups, Inventory, Target, TaskUI wrappers)
* [`cc_minigames`](/cc_minigames/index) — only required if you wire training entries to them (the default config does)
