# Dealer

## Overview

* Our Prison Dealer system allows inmates to exchange items within the prison using a currency called `"cigarette."`
* This creates an internal economy that can be managed and utilized by the inmates. The configuration path for this system is located at: `data/presets/yourMap.lua/`.

### Config file structure for Dealer

* Each dealer position is uniquely configured for each map preset and is part of the interaction system.
* Below is an example of the configuration structure:

```lua
{
    coords = vec3(1631.953, 2527.754, 45.564),
    type = INTERACT_TYPES.DEALER,
    zone = {
        size = vec3(1, 1, 1),
        icon = "fa-solid fa-paper-plane",
        label = _U('TARGET_ZONE.DEALER_LABEL'),
        distance = 1.0
    },
    npc = {
        coords = vec3(1631.953, 2527.754, 45.564),
        heading = 51.067,
        model = 's_m_y_prismuscl_01'
    },
    blip = {
        state = Config.RenderNPCBlips,
        name = _U('BLIPS.DEALER'),
        sprite = 155,
        scale = 1.0,
        color = 0,
    },
    items = {
        {
            name = "WEAPON_KNIFE",
            label = _U('ITEM_LABELS.KNIFE'),
            price = 40,
        },
        {
            name = "ecola",
            price = 8,
        },
        {
            name = "donut",
            price = 5,
        },
        {
            name = "wire_cutter",
            label = _U('ITEM_LABELS.WIRE_CUTTER'),
            price = 30,
        }
    },
    access = INTERACT_ACCESS_TYPES.PRISONER_ONLY
},
```

## Gallery

<figure><img src="/files/lT1xMzzFpC0RxRP6rWwj" alt=""><figcaption><p>Interaction with Dealer</p></figcaption></figure>

<figure><img src="/files/b3GSAEjO9PKyxPGgUcnW" alt=""><figcaption><p>Dealer offer</p></figcaption></figure>

## Features

* Provide items for Prisoner that can be exchanged through economy item `cigarette` \[can be adjusted in: Config.EconomyItem (config.lua)]

## Location

* By default can be found under blip named `Prison dealer` with icon/symbol (WEAPON)
* The location can be different for each map preset and can be adjusted in `rcore_prison/data/presets/yourPrisonMap.lua`.

<figure><img src="/files/xIZDzrFYpSyzn6bsQTA0" alt=""><figcaption><p>Location of Dealer</p></figcaption></figure>


---

# Agent Instructions: 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://documentation.rcore.cz/paid-resources/rcore_prison/features/dealer.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.
