# Configuration

***

#### <mark style="color:blue;">3 in 1 Shop - Supermarket, Weapon Shop, and Black Market for FiveM</mark>

The **3 in 1 Shop** script is the ultimate all-in-one shopping solution for your FiveM server. This script combines a supermarket, a weapon shop, and a black market into a single, easy-to-use system, allowing players to purchase a wide variety of items, weapons, and more. Whether you're running a roleplay server or just looking to enhance the player experience, this script is a perfect addition.

<mark style="color:blue;">**Configuration Options:**</mark>

* <mark style="color:green;">**Framework Selection:**</mark> Automatically detects the available framework (ESX or QBCore) or allows manual selection.

  ```lua
  STG.Framework = "auto" -- Options: 'auto', 'esx', 'qb'
  ```
* <mark style="color:green;">**Language Setting:**</mark> Choose between English and German for in-game text and notifications.

  ```lua
  STG.Language = "en" -- Options: 'en', 'de'
  ```
* <mark style="color:green;">**Weapon Licensing:**</mark> Enable or disable license checks for weapon purchases.

  ```lua
  STG.license = false -- Set to true to require licenses for weapon purchases
  ```
* <mark style="color:green;">**Robbery Configuration:**</mark> Customize robbery mechanics, including minimum cop requirements, robbery duration, and reward settings.

  ```lua
  STG.robAble = true -- Enable or disable robberies
  STG.minCop = 0 -- Minimum cops required to start a robbery
  STG.robTime = 60 -- Robbery duration in seconds
  STG.robReward = { minMoney = 1000, maxMoney = 3000 } -- Money reward range for successful robberies
  ```
* <mark style="color:green;">**NPC and Shop Locations:**</mark> Customize the locations and NPCs for each shop type (supermarket, weapon shop, black market).

  ```lua
  STG.Positions = {
      { coords = vector3(373.875, 325.896, 103.566), type = "supermarket", npcCoord = vector4(372.507, 326.479, 102.566, 252.06) },
      { coords = vector3(810.2, -2157.3, 29.6), type = "weaponshop", npcCoord = vector4(809.8747, -2159.09, 28.619, 0) },
      { coords = vector3(711.7885, 590.2888, 129.0507), type = "blackmarket", npcCoord = vector4(711.7885, 590.2888, 129.0507, 342.3813) },
  }
  ```

<mark style="color:green;">**Localization:**</mark>

The script includes localized text for English and German, ensuring that your players can easily interact with the shops in their preferred language.

```lua
STG.Locale = {
    ["en"] = {
        open_shop = "Press ~INPUT_CONTEXT~ to open shop",
        get_reward = "You claimed money bag",
        starting_rob = "~r~ROB WILL START IN",
        busy = "This shop was recently robbed.",
        need_license = "You need weapon license!",
        item_buy = "You have successfully bought the items!",
        robbery = "Robbery in progress!",
        cop_msg = "We have sent a photo of the robber taken by the CCTV camera!",
        set_waypoint = "Set waypoint to the store",
        hide_box = "Close this box",
        police = "There are not enough cops online!",
        blacklist = "Your job in blacklist!",
        buy = "Successful bought!",
        no_money = "You don't have enough money!"
    },
    ["de"] = {
        open_shop = "Drücken Sie ~INPUT_CONTEXT~ um den Shop zu öffnen",
        get_reward = "Du hast Geldbeutel beansprucht",
        starting_rob = "~r~ROB STARTET IN",
        busy = "Dieser Laden wurde kürzlich ausgeraubt.",
        need_license = "Sie brauchen einen Waffenschein!",
        item_buy = "Sie haben die Artikel erfolgreich gekauft!",
        robbery = "Raub im Gange!",
        cop_msg = "Wir haben ein Foto des Räubers geschickt, das von der Überwachungskamera aufgenommen wurde!",
        set_waypoint = "Wegpunkt zum Laden setzen",
        hide_box = "Schließen Sie dieses Feld",
        police = "Es sind nicht genug Cops online!",
        blacklist = "Ihr Job auf der schwarzen Liste!",
        buy = "Erfolgreich gekauft!",
        no_money = "Du hast nicht genug Geld!"
    }
}
```

<mark style="color:green;">**Visuals:**</mark>

Each shop has its own unique blip on the map, with customizable labels, icons, and visibility settings. The included NPCs enhance the realism of the shopping experience, making each store feel like a real part of the game world.

*Example Blips Configuration:*

```lua
STG.Blips = {
    weaponshop = { label = "Weapon Shop", sprite = 110, scale = 0.7, color = 5, visible = true },
    supermarket = { label = "Super Market", sprite = 59, scale = 0.7, color = 3, visible = true },
    blackmarket = { label = "BlackMarket", sprite = 59, scale = 0.7, color = 3, visible = false }
}
```

This script is a must-have for any server looking to offer players a comprehensive and immersive shopping experience, complete with a range of features that cater to various gameplay styles.

***


---

# 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://stg-store.gitbook.io/documentation/scripts/3-in-1-shop/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.
