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

# Market Stall

### ⚡ Getting Started

**Read the README file for complete setup instructions!**

***

### ➕ Creating a Market Stall

You can create a market stall using any of these methods:

1. **With an Inventory Item**
   * Use the item `"marketstall"` or any item set in `Config.ItemMarketStall`.
2. **Client-side Event**

   ```lua
   TriggerEvent("bt_stall:startPlaceObject")
   ```
3. **Server-side Event**

   ```lua
   TriggerClientEvent("bt_stall:startPlaceObject", source)
   ```
4. **Via Inventory Integration (Example with VORP):**

   ```lua
   local VORPInv = exports.vorp_inventory:vorp_inventoryApi()
   VORPInv.RegisterUsableItem("market_stall", function(data)
       TriggerClientEvent("bt_stall:startPlaceObject", data.source)
       VORPInv.CloseInv(data.source)
   end)
   ```

***

### ⚙️ Configuration Example (`config.lua`)

```lua
Config = {}

-- Enable DEBUG mode (true = open stall creator UI automatically)
Config.DEBUG = false

-- Item name to trigger stall placement (leave blank to disable)
Config.ItemMarketStall = "marketstall"

-- KEYS CONFIGURATION
Config.OpenMarket       = keys["U"]        -- Key to open stall
Config.CraftObject      = keys["U"]        -- Confirm placement
Config.ChangeDistance   = keys["DOWN"]     -- Move stall while placing
Config.RotateLeft       = keys["LEFT"]     -- Rotate left
Config.RotateRight      = keys["RIGHT"]    -- Rotate right
Config.Cancel           = keys["R"]        -- Cancel placement

-- JOB/ITEM RESTRICTIONS
Config.WhitelistJobs       = {}    -- Only these jobs can manage stalls
Config.BlacklistJobs       = {}    -- These jobs are forbidden
Config.WhitelistSellItems  = {}    -- Only these items can be sold (empty = all)
Config.WhitelistBuyItems   = {}    -- Only these items can be bought (empty = all)
Config.BlacklistItems      = {}    -- These items cannot be bought/sold

-- ADMIN / MODERATION SETTINGS
Config.AdminRole = { "mod", "admin", "superadmin" }
Config.OnlyStaffCanDeleteStalls = false
Config.SpamSeconds = 1           -- Min seconds between actions

-- DISCORD LOGGING
Config.DiscordWebhook = ""       -- Insert Discord webhook
Config.DiscordName = "BT_MARKETSTALL"

-- UI LANGUAGE
Config.NUILangage = "en"         -- fr, en, es, pt, de, it supported

Config.Txt = {
    Title = "Stall",
    -- ...other UI texts
}

-- SERVER-SIDE NOTIFICATION WRAPPER
function SendNotification(source, type, message)
    TriggerClientEvent("bt_stall:showNotification", source, type, message)
end
```

***

### 📌 Notes

* **Flexible creation:** You can trigger stall placement from inventory, client event, or server event.
* **Fully configurable**: Jobs, items, and admin permissions are easily managed in `config.lua`.
* **Anti-spam**: Minimum action interval prevents abuse.
* **Multilingual UI**: Easily switch interface language.
* **Discord logs**: Optional webhook for staff/moderation tracking.


---

# 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://botiv.gitbook.io/rdr2/market-stall.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.
