# 5E-CornerSelling

## Installation

After you buy our **Corner Selling script** download it from your keymaster and put it inside your resources folder.

{% hint style="info" %}
After uploading the script to your server you have to restart the server to make the script work.
{% endhint %}

## Configure

Open `config.lua` first, select the framework of your server (esx/qb-core).\
After you select your code you can change the settings of the script in the way you want.\
Here you can see the preview of the Settings.

<pre class="language-lua"><code class="lang-lua"><strong>Config.Settings = {
</strong>    ["drugsZones"] = false, -- Do you use 5e-drugszones?
    ["debugZones"] = false, -- Show a green circle to display the zones soon
    ["inventory"] = "qb-inventory", -- Currently support Currently support qb-inventory / ox_inventory / ps-inventory / qs-inventory
    ["currencySymbol"] = "$", -- Change it to whatever you need
    ["cooldown"] = 30, -- Cooldown time in seconds
    ["madchance"] = 15, -- Chance of NPC getting mad (percentage)
    ["policechance"] = 7, -- Chance of NPC calling the police (percentage)
    ["maxstalls"] = 2, -- Maximum number of stalls allowed per deal
    ["openDealKey"] = 38, -- 38 is the default key for "E"
    ["previewItem"] = true, -- If the player hovers over the deal in the menu it will show the item image?
    ["inventoryPath"] = "nui://qb-inventory/html/images/", -- Get the path of the images folder in your inventory
    ["spawnNPCS"] = false,  -- Enable or disable spawned NPCs (Still in beta)
    ["cancelProgress"] = false, -- Can the player cancel the progress bar of the order?
    ["payoutMethod"] = "cash", -- cash/bank choose your method
    ["itemName"] = false, -- You want the reward to be an item? check it to the item name, disable it by false instead of the name
    ["successAnimDict"] = "misscarsteal4@actor",
    ["successAnimClip"] = "actor_berating_loop",
    ["playerInteract"] = "DrawTextUI", -- How the player will see the order on this screen, you can easly change it in the open_client.lua (Help/DrawTextUI)
    ["sellInVeh"] = false, -- If the player is in a vehicle will he be able to make the order?
    ["scriptAlert"] = true, -- Want to use our police alert? true or false
    ["jobAlert"] = {"police", "ambulance"}, -- the names of the jobs that will get the alert
    ["sellingProgressbarLength"] = 7500, -- each 1000 equals 1 second
    ["onlyHaveDrugs"] = true, -- If this setting is true then the player will receive deals only for drugs that he have on him
}
</code></pre>

## Discord Logs

Your script comes with a logging system so you can set it to make sure that everything works well with your players, you can find the settings code inside `server/open_server.lua`

```lua
DiscordWebhookURL = "YOURWEBHOOK"
DiscordAvatarURL = "https://cdn.discordapp.com/attachments/1152307810781106287/1273569980625190992/5E-Devs_Logo.png"
DiscordFooterImageURL = "https://cdn.discordapp.com/attachments/1152307810781106287/1273569980625190992/5E-Devs_Logo.png"
DiscordProfileImageURL = "https://cdn.discordapp.com/attachments/1152307810781106287/1273569980625190992/5E-Devs_Logo.png"
```


---

# 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://5e-devs.gitbook.io/5e-devs/latest-resources/cornerselling.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.
