# Cornerselling

<figure><img src="/files/nN3u4gl7CBZqp1OFDYo8" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/glHlJk90X2sKIam1PObg" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
Dependencies:

Renewed Lib: <https://github.com/Renewed-Scripts/Renewed-Lib/releases/tag/v2.0.7>

Ox Lib: <https://github.com/overextended/ox_lib/releases>

Bl Dialog: <https://github.com/Byte-Labs-Studio/bl_dialog>
{% endhint %}

{% hint style="success" %}
Supports:

* QBox, QBCore, Esx (using ox inventory)
* Qb-target, ox target
  {% endhint %}

{% hint style="info" %}
Features:

* Zones based selling
* Each zone can have any item set to be sold within
* Maximum number of sellers allowed to sell within a zone
* Price cuts for items if maximum number or sellers are over
* Prices for the items are very dynamic and wont ever be the same
* Counter offers
* Percentage increase of items price if counter offer is met
* Police alert chance based on the item being sold
* Customer intervals based on item being sold
* Any item can be added to be sold
  {% endhint %}

### Zone Example

```lua
['Grove Street'] = {
    zone = {
        points = {
            vec3(-155.5, -1783.0, 30.0),
            vec3(94.0, -2030.5, 30.0),
            vec3(381.0, -2162.0, 30.0),
            vec3(467.0, -2063.0, 30.0),
            vec3(52.5, -1679.5, 30.0),
        },
        thickness = 53.5,
    },
    sellables = {
        weed_amnesia = {
            policeAlertChance = 0.1,                       -- chance to alert police per item sold
            customerInverval = { min = 2000, max = 4000 }, -- time in ms between customers
            price = 150,                                   -- price per item
            amount = { min = 1, max = 3 },                 -- amount of items per customer
            minSellAmount = 5,                             -- minimum amount allowed to start the selling
        },
    },
    sellers = {
        max = 5,        -- maximum number of sellers allowed in this zone before it becomes too crowded and price drops
        priceCut = 0.1, -- percentage of the selling price the server takes
    },
    counterOffer = {
        successChance = 0.1,
        percentageIncrease = 0.2, -- percentage increase in the counter offer
    },
},
```

### Zone Creation

{% hint style="danger" %}
Zone creation is done through ox lib by using the zone creator\
<https://coxdocs.dev/ox_lib/Modules/Zones/Shared#zone-creation-script>
{% endhint %}


---

# 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://kevingirardx.gitbook.io/kevin-scripts/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.
