> For the complete documentation index, see [llms.txt](https://stalk.gitbook.io/documentation-stalk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stalk.gitbook.io/documentation-stalk/247market/installation-guide.md).

# Installation Guide

The installation process for STALK Market has been designed to be quick and easy to set up on your server.

`stalk_market` is an immersive supermarket and robbery system designed for GTA V roleplay servers. The resource includes configurable markets, NPC cashiers, safe robberies, merchandise theft, promo codes, modern UI integration, and advanced robbery mechanics.

The script has been optimized to provide immersive gameplay while remaining lightweight and highly configurable.

Most of the configuration can be modified directly through the `config.lua` file.

***

## Step 1 : Resource Installation

Start by dragging the `stalk_market` folder into your server’s `resources` directory.

Once the folder has been added, open your `server.cfg` file and add the following line:

```
ensure stalk_market
```

After saving the changes, restart your server.

***

## Step 2 : Required Dependencies

Before starting the resource, make sure the following dependencies are correctly installed on your server:

* `ox_inventory`
* `ox_target`
* `ox_lib`
* `oxmysql`

The script relies on these resources for:

* item management,
* target interactions,
* notifications,
* and database synchronization.

Without these dependencies, the resource will not function correctly.

***

## Step 3 : Main Configuration

All major configuration settings are located inside:

```
stalk_market/config.lua
```

From this file, you can customize:

* shop locations,
* robbery settings,
* NPC behavior,
* UI colors,
* payment systems,
* reward pools,
* promo codes,
* and interaction settings.

The default configuration already includes a fully working setup.

***

## Step 4 : Theme & UI Configuration

The script includes a fully customizable STALK supermarket interface.

The UI colors can be modified here:

```
Config.Theme = {    primary = '#22c55e',    primaryDark = '#15803d',    background = 'rgba(7, 15, 11, 0.96)',    card = 'rgba(18, 32, 24, 0.92)',    text = '#f4fff7',    muted = '#9ab5a2'}
```

You can fully customize the interface colors to match your server branding.

***

## Step 5 : Inventory Images

The script uses `ox_inventory` item images by default.

Default image path:

```
Config.ImagePath = 'nui://ox_inventory/web/images/%s.png'
```

If you are using another inventory system or custom image folder, simply replace the path with your own.

***

## Step 6 : Interaction Configuration

All player interactions are configurable through the `Config.Target` section.

Example:

```
Config.Target = {    openShopLabel = 'Open Market',    safeLabel = 'Lockpick Safe',    distance = 2.0}
```

This allows you to customize:

* target labels,
* interaction distance,
* and robbery interaction text.

***

## Step 7 : Payment Configuration

The market system supports both cash and bank payments.

Default configuration:

```
Config.Payment = {    cashItem = 'money',    bankAccount = 'bank'}
```

You can freely modify the item name or bank account depending on your framework setup.

***

## Step 8 : Promo Codes

The script includes a built-in promo code system allowing discounts inside the market UI.

Example:

```
Config.PromoCodes = {    STALK10 = { label = 'STALK10', percent = 10 },    GREEN20 = { label = 'GREEN20', percent = 20 }}
```

Each promo code automatically applies a percentage discount during checkout.

You can add or remove promo codes at any time.

***

## Step 9 : Robbery System

The script includes a complete supermarket robbery system with:

* cashier intimidation,
* safe lockpicking,
* merchandise stealing,
* alarms,
* cooldowns,
* and robbery rewards.

Main robbery settings:

```
Config.Robbery = {    cooldownMinutes = 60,    durationSeconds = 13 * 60,    lockpickItem = 'lockpick',    maxSafeAttempts = 3}
```

This configuration controls:

* robbery cooldowns,
* robbery duration,
* required items,
* and safe hacking attempts.

***

## Step 10 : Merchandise Theft

Players can steal merchandise during active robberies.

Default configuration:

```
merchandise = {    requiredItems = { 'duffelpack', 'backpack' },    durationSeconds = 10,    targetLabel = 'Steal Merchandise',}
```

The system supports:

* required robbery bags,
* theft animations,
* reward pools,
* and maximum robbery points per store.

Example rewards:

```
rewards = {    { item = 'money', amount = 35 },    { item = 'water', amount = 1 }}
```

You can fully customize all robbery rewards.

***

## Step 11 : Safe Robbery Configuration

Each store can contain a configurable safe with randomized rewards.

Example:

```
safe = {    enabled = true,    model = 'prop_cabinet_02b',    coords = vec3(-1220.938, -917.009, 10.226),}
```

Reward example:

```
rewards = {    { item = 'money', min = 250, max = 1200, chance = 100 },    { item = 'water', min = 1, max = 3, chance = 35 }}
```

Each reward includes:

* minimum amount,
* maximum amount,
* and drop chance.

The script automatically randomizes loot rewards after successful robberies.

***

## Step 12 : Alarm System

The robbery system includes immersive alarm sounds for:

* stores,
* safes,
* and active robberies.

Example:

```
alarm = {    enabled = true,    volume = 0.045,    intervalMs = 1000,    frequency = 820}
```

You can customize:

* alarm volume,
* beep speed,
* sound frequency,
* and maximum hearing distance.

***

## Step 13 : NPC Configuration

Each supermarket includes a configurable cashier NPC.

Example:

```
ped = {    model = 'mp_m_shopkeep_01',    coords = vec4(-1221.4060, -908.0392, 11.3263, 35.6352),}
```

The NPC system also supports:

* surrender animations,
* robbery reactions,
* protected states,
* and custom scenarios.

You can create as many shops as you want by duplicating existing configurations inside `Config.Shops`.

***

## Step 14 : Weapon Restrictions

The script supports configurable robbery weapons.

Example melee weapons:

```
meleeWeapons = {    'WEAPON_KNIFE'}
```

Example firearms:

```
firearms = {    'WEAPON_PISTOL'}
```

Only configured weapons will be able to start robberies.

***

## Important

Before updating the resource or modifying important settings, we strongly recommend creating a complete backup of your server and existing resources.

Even though the script is optimized and tested before release, backups remain essential to avoid issues caused by incorrect configuration or external conflicts.

***

## AI / Documentation Queries

If some information is not directly available on this page, you can dynamically query the documentation using the `ask` parameter.

Example:

```
GET https://docs.stalk.dev/stalk-market/installation-guide.md?ask=<your-question>
```

You can ask questions such as:

* how to add a new market,
* how to configure robbery rewards,
* how to edit promo codes,
* how to modify NPC positions,
* or how to customize the alarm system.

The system will automatically return a direct answer along with the most relevant documentation sections.
