---
description: >-
  Here you can see the documentation to learn how to install our store's VIP
  weapons system.
---

# JotaDev Auction & Raffle System



<figure><img src="https://3421265329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzDRYxKNrQL10LsRlXjcj%2Fuploads%2Fqz2KgfVi3PC4l4erPm2U%2Fdocumentacion_auction.jpg?alt=media&#x26;token=ce06d8f5-02d0-4eb2-a7d9-42ab1d0c878c" alt=""><figcaption></figcaption></figure>

**Put in your server.cfg**

```markdown
# Jota Dev Auction and Raffle system
ensure jc_subastas
```

**Insert SQL into your database:**

{% tabs %}
{% tab title="SQL" %}
```sql
CREATE TABLE IF NOT EXISTS `subastas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `precio_inicial` int(11) NOT NULL,
  `incremento_minimo` int(11) NOT NULL,
  `duracion` int(11) NOT NULL,
  `estado` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'activa',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `tipo` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'item',
  `imagen` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `puja` int(11) DEFAULT NULL,
  `modelo` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT 'NONE',
  `cantidad` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT 'NONE',
  `last_bid_license` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `sorteos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tipo` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `modelo` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `cantidad` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT 'NONE',
  `duracion` int(11) NOT NULL,
  `imagen` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `estado` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT 'activo',
  `precio` int(11) DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;


CREATE TABLE IF NOT EXISTS sorteos_papeletas (
    id INT AUTO_INCREMENT PRIMARY KEY,
    sorteo_id INT NOT NULL,
    identifier VARCHAR(50) NOT NULL,
    fecha DATETIME DEFAULT CURRENT_TIMESTAMP
);

```
{% endtab %}
{% endtabs %}

**This is the script configuration, configure it to your liking**

{% tabs %}
{% tab title="Config" %}
```lua
Config = Config or {}
Config.Framework = "" -- qb, esx 

Config.AdminGroups = { 'admin', 'superadmin' }

Config.Language = '' -- es | en

Config.CommandOpenUIAdmin = 'adminsubastas'
Config.CommandOpenUISubastasSorteos = 'pujas'

Config.Debug = false

Config.CuentaSorteo = 'bank' -- Opciones: 'money' o'cash', 'bank', 'black_money'

Config.NPC = {
    model = "a_m_y_business_01",
    coords = vector3(-364.319, -249.206, 36.080),
    heading = 48.0,
    blip = {
        enabled = true,
        sprite = 605,
        color = 2,
        scale = 0.8,
        label = "Subastas y Sorteos"
    },
    command = "pujas"
}

Config.WebhookSubastas = ''
Config.WebhookSorteos = ''
Config.WebhookGanadores = ''

if Config.Framework == 'qb' then
    QBCore = exports['qb-core']:GetCoreObject()
elseif Config.Framework == 'esx' then
    ESX = exports["es_extended"]:getSharedObject()
else
    print '^1[^6jc_subastas^1] ^2Framework No encontrada, ingrese esx o qb^0'
    return
end

```
{% endtab %}
{% endtabs %}
