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

# Jota Dev Coins System



<figure><img src="https://3421265329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzDRYxKNrQL10LsRlXjcj%2Fuploads%2Fe1ZTopFB6v1PO3uFyfHf%2Fcoins_docs.jpg?alt=media&#x26;token=ca78be51-e6c3-478a-b45b-495b87d6d12f" alt=""><figcaption></figcaption></figure>

How to start the script for its correct operation:

**Put in your server.cfg**

```markdown
# JotaDev Coins System
ensure jc_coins
```

**General script settings:**

{% tabs %}
{% tab title="Setting" %}
```lua
Config = Config or {}
Config.Framework = "" -- qb, esx 
Config.Locales = 'es' -- es | en

Config.HourlyCoins = 1 -- Amount of coins per normal hour (Config.TimeToEarn)

Config.CommnadNameConsultarCoins = 'coins' -- Command to check how many coins you have and how much time you have left to obtain the next benefit
Config.TeclaOpenMenuCoins = 'K'

Config.CommandOpenUIAdmin = 'admincoins' -- Command for administrator to open the administrator panel
Config.CommandOpenUIShop = 'tienda' -- Command for administrator to open the administrator panel

Config.Inventory = ''  -- esx | esx inventory / qb | qb-inventory / ox | ox_inventory / If your inventory is not here, you can add it in the following path jc_coins/Editable/Server/SMain.lua

Config.ClientOption = true
Config.UseTimer = true -- Change to false if you don't want to use the time system and only the coins you have will be displayed in the interface.
Config.TimeToEarn = 3600 -- Time in seconds to receive coins (1 hour)

Config.DiscordWebhookPurchase = 'YOUR_WEBHOOKS' -- Purchase Logs in the general purchasing panel
Config.DiscordWebhookReceive = 'YOUR_WEBHOOKS' --Logs of players receiving coins from an administrator
Config.DiscordWebhookRemove = 'YOUR_WEBHOOKS' --Logs of when an administrator removes coins from a player or resets their coins to 0

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

Config.Debug = false


```
{% endtab %}

{% tab title="SettingConce" %}
```lua
Config.VIPBlip = {
    enabled = true, -- true to show the blip, false to hide it
    sprite = 326,
    scale = 0.8,
    color = 38,
    name = "Concesionario VIP"
}

Config.MatriculaVIP = true -- License plates with 'VIP' prefix, in case of false normal random license plate

Config.StaticVehicles = { -- Exhibition cars
    {
        model = "italirsx",
        label = "Italirsx",
        price = 100,
        specs = {
            velocidad = 280,
            aceleracion = 6.5,
            manejo = 6.2
        },
        coords = vector3(120.4028, -155.991, 53.860),
        heading = 27.98
    },
    {
        model = "coquette4",
        label = "Coquette 4",
        price = 40,
        specs = {
            velocidad = 230,
            aceleracion = 9.0,
            manejo = 8.0
        },
        coords = vector3(126.1227, -158.064, 53.860),
        heading = 27.04
    },
    {
        model = "zeno",
        label = "Zeno",
        price = 30,
        specs = {
            velocidad = 310,
            aceleracion = 7.8,
            manejo = 8.8
        },
        coords = vector3(137.3558, -162.500, 53.560),
        heading = 26.44
    },
    {
        model = "tenf",
        label = "Tenf",
        price = 80,
        specs = {
            velocidad = 320,
            aceleracion = 8.3,
            manejo = 9.2
        },
        coords = vector3(131.6864, -160.241, 53.860),
        heading = 26.44
    },
    {
        model = "emerus",
        label = "Emerus",
        price = 70,
        specs = {
            velocidad = 290,
            aceleracion = 9.6,
            manejo = 7.5
        },
        coords = vector3(143.1104, -164.505, 53.860),
        heading = 25.31
    }
}

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

### Import the following table in to the database

```sql
CREATE TABLE IF NOT EXISTS player_coins (
    citizenid VARCHAR(50) NOT NULL PRIMARY KEY,
    coins INT DEFAULT 0
);

CREATE TABLE IF NOT EXISTS `coins_concesionarios` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `label` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `npc_model` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `pos_x` float NOT NULL,
  `pos_y` float NOT NULL,
  `pos_z` float NOT NULL,
  `heading` float DEFAULT 0,
  `preview_x` float NOT NULL,
  `preview_y` float NOT NULL,
  `preview_z` float NOT NULL,
  `preview_heading` float DEFAULT 0,
  `spawn_x` float NOT NULL DEFAULT 0,
  `spawn_y` float NOT NULL DEFAULT 0,
  `spawn_z` float NOT NULL DEFAULT 0,
  `spawn_heading` float NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `coins_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `identifier` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `coins` int(11) NOT NULL,
  `date` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `coins_vehicles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `model` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL,
  `label` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `price` int(11) NOT NULL,
  `velocidad` int(11) DEFAULT 200,
  `aceleracion` float DEFAULT 1,
  `manejo` float DEFAULT 1,
  `localizacion` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `tienda_vip` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` enum('ITEM','DINERO','ARMA','CAJAMISTERIOSA') COLLATE utf8mb4_unicode_ci NOT NULL,
  `item` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `ammount` int(11) DEFAULT 1,
  `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price` int(11) NOT NULL,
  `stock` int(11) DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4616 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

```

***

<details>

<summary>If you have any questions or problems, do not hesitate to contact us:</summary>

Discord: [`https://discord.gg/EDuZKM7Zuv`](https://discord.gg/EDuZKM7Zuv)

</details>

_**Script interfaces to consider**_

* _Command to open the store, by default /tienda, fully configurable from Setting.lua_

<figure><img src="https://3421265329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzDRYxKNrQL10LsRlXjcj%2Fuploads%2F6k3giaVPaqr9h58O75S7%2F1.jpg?alt=media&#x26;token=fabb1097-ff72-467a-8352-9ae1cc528a3b" alt=""><figcaption></figcaption></figure>

* _Interface for mystery boxes_

<figure><img src="https://3421265329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzDRYxKNrQL10LsRlXjcj%2Fuploads%2FVLJvqQmZNXZaQCAzVjKc%2F5.jpg?alt=media&#x26;token=46695c36-4b16-4e46-a2ca-edf61062f954" alt=""><figcaption></figcaption></figure>

* _Command to open the administration menu, by default /admincoins, fully configurable from Setting.lua_

<figure><img src="https://3421265329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzDRYxKNrQL10LsRlXjcj%2Fuploads%2F6ur0rZ0M17U4NR3n8xRZ%2F2.jpg?alt=media&#x26;token=a46d3e1f-b150-4071-903f-a4d3e7b49739" alt=""><figcaption></figcaption></figure>

* _3D interface to view and highlight static vehicles for your dealership_

<figure><img src="https://3421265329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzDRYxKNrQL10LsRlXjcj%2Fuploads%2FcFEeqxsD9Qiq46URxlTh%2F3.jpg?alt=media&#x26;token=aac6aacb-1c15-4ef2-a177-2f6417a6d0af" alt=""><figcaption></figcaption></figure>

* _Interface to see the coins you have available and your next reward_

<figure><img src="https://3421265329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzDRYxKNrQL10LsRlXjcj%2Fuploads%2FWA8PaBM6c8JMOzP36YOL%2F4.jpg?alt=media&#x26;token=638e270c-4f9c-4414-bed2-ded289d29d69" alt=""><figcaption></figcaption></figure>

* _VIP dealer interface to purchase all types of vehicles using the coin system_

<figure><img src="https://3421265329-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzDRYxKNrQL10LsRlXjcj%2Fuploads%2F1Fy7EuHADpvDb51pSeGU%2Fimage.png?alt=media&#x26;token=48d8d438-53c6-437c-ae7c-be6323e0d700" alt=""><figcaption></figcaption></figure>
