Jota Dev Coins System

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

How to start the script for its correct operation:

Put in your server.cfg

# JotaDev Coins System
ensure jc_coins

General script settings:

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

Import the following table in to the database

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;

If you have any questions or problems, do not hesitate to contact us:

Script interfaces to consider

  • Command to open the store, by default /tienda, fully configurable from Setting.lua

  • Interface for mystery boxes

  • Command to open the administration menu, by default /admincoins, fully configurable from Setting.lua

  • 3D interface to view and highlight static vehicles for your dealership

  • Interface to see the coins you have available and your next reward

  • VIP dealer interface to purchase all types of vehicles using the coin system

Last updated