🧊
Yetti Development
Tebex StoreSupport Discord
  • Introduction
  • 💲Paid Scripts
    • Yetti Tokens ( WIP)
      • Showcase
      • Installation/Configuration
  • 🆓Free Scripts
    • Yetti Life(s)
      • Showcase
      • Commands List
      • Installation
    • Yetti Evidenceboxes
      • Showcase
      • Installation/Configuration
    • Yetti Rob Containers
      • Showcase
      • Installation/Configuration
Powered by GitBook
On this page
  • Installing dependencies
  • Inserting the SQL ( any framework/standalone )
  • Config
  • Webhooks
  • Tebex Integration
  • Changing the language
  1. Paid Scripts
  2. Yetti Tokens ( WIP)

Installation/Configuration

Steps how to setup our Tokens script, if the script has any issues and you did the installation correctly please create a modmail on our discord.

PreviousShowcaseNextYetti Life(s)

Last updated 1 year ago

Installing dependencies

Make sure you install the latest versions!

  1. ( default on esx/qb )

Inserting the SQL ( any framework/standalone )

Open your desired SQL manager for example HeidiSQL or PhpMyAdmin and insert the following SQL into your server database

tokens.sql
CREATE TABLE IF NOT EXISTS `tokens_balance` (
  `license` varchar(100) DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  PRIMARY KEY (`license`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  
CREATE TABLE IF NOT EXISTS `tokens_codes` (
  `code` varchar(100) DEFAULT NULL,
  `amount` int(11) DEFAULT NULL,
  `used` varchar(25) DEFAULT NULL,
  `usedBy` varchar(100) DEFAULT NULL,
  `purchaser` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Config

Default config file, in case you want to reset it back to the default

config.lua
Config = {}

Config.Debug = true -- Debug Prints

Config.Notify = function (title, description, type, duration, id) -- notifications used in the whole script
    lib.notify({
        title = title,
        description = description,
        type = type,
        duration = duration,
        id = id
    })
end


Config.CheckTokensCommand = 'tokeny' -- Command which is used by the player to check his balance

Config.RedeemCommand = 'redeem' -- Command to reedem using the tebex id

Config.GenerateCodeCommand = 'generateCode' -- Command for admins to generate codes

--
--- Permissions 
--
Config.AddTebexIdPerm = 'group.god' -- permission for the command /addTebexId
Config.GenerateCodePerm = 'group.god' -- permission for the command Config.GenerateCodeCommand

Webhooks

--
--- Webhook Configuration
--

Webhook = {}

Webhook.AddTebexIdCommand = ''
Webhook.RedeemCommand = ''
Webhook.GenerateCodeCommand = ''

Tebex Integration

Create a project on tebex, make sure its a fivem one, change the pages to your liking and configure it how you like it.

Creating Packages

Create a package and put it in a category where you want, you can name it however you want, fill out the needed things from tebex like the price, name, description etc.

When you get to the Game Server commands create a new command on purchase

The command is:

addTebexId {transaction} 100 {purchaserName} {ip} {price}

The 100 in the command is the amount the player recievies, for example if you change the 100 to 500 the code will have a value of 500.

Your players can redeem the tokens using the tebex order id which they get when they finish the order.

Example Image

Changing the language

You can change the language of the script in the locales, the script uses ox lib locales so whatever you have set in the ox lib config as your locale, will be used automatically in our script.

You can find them in the location server/webhooks.lua , here you simply create webhooks on your desired discord server where admin logs get posted, all commands are logged. You can find the showcase

💲
oxmysql
ox_lib
here