Groot Development
Store
  • 👋Welcome
  • Coding Information
    • Register Key Mapping
  • ASSETS
    • 🕙g-duty
      • Why?
      • Installation
      • Config.lua
    • 📋g-scoreboard-V1
      • Installation
      • Config.lua
    • 📋g-scoreboardV2
      • Installation
      • Config.lua
      • Exports & Events
    • 🎁g-giftcard
      • Installation
      • Config.lua
      • Export
    • 🏡g-job-vehicle-shop
      • Installation
      • ⚙️Configuration
        • Exports
        • Create Vehicle Management Panel
        • Create Vehicle Shops
    • 💯g-redeem-code
      • 🗒️Features
      • Installation
      • ⛔Note
      • ⚙️Configuration
        • Create New item
    • 📖g-pausemenu
      • 🗒️Features
      • Installation
      • ⚙️Features Guide
        • Info Buttons
        • socials Buttons
        • Rules
        • Organization Avatar
    • 🛠️g-crafting
      • 🗒️Features
      • 📦Patch Details
      • Installation
      • ❔Why
      • ⚔️Exports
      • Configuration
        • How to Create New Station
        • How to Create crafting time for an item.
    • 🛒g-shopsV2
      • 🗒️Features
      • 📦Patch Details
      • Installation
      • ⚔️Exports
      • Configuration
        • How to Create New Shop
        • How to create new item
    • 🔧g-adv-modern-repairkit
      • 🗒️Features
      • 📦Patch Details
      • Installation
      • ⚙️Configuration
  • 📖g-pausemenu-simplified
    • 📦Patch Details
    • Installation
    • ❔Why
    • Configuration
      • Git Dev Patchs
  • FREE RELEASE
    • 🎁g-starterpack-gift
      • Installation
      • Config.lua
    • 👨‍🔬g-employee-chat-list
      • Installation
    • g-notifications
      • Installation
      • Notification
      • Framework Integration
      • Remove Notification By ID
Powered by GitBook
On this page
  • Arrangement
  • Database Sql
  1. ASSETS
  2. g-redeem-code

Installation

Last updated 9 months ago

  1. Download the purchased resource from - the official site of fivem with purchased resources.

  2. Unzip the g-redeem-code

  3. Create a Folder - In your resources directory, create a new folder and name it [g-scripts]if it has not already been created.

  4. Drag g-redeem-code in to [g-scripts]

Arrangement

Add this line in your server.cfg file

ensure [g-scripts]

Add this line into your server.cfg

This line determines who can access the main panel to manage, create, or send redeem codes.

add_ace group.admin createredeem.openmenu allow

Database Sql

CREATE TABLE `g_redeem_code` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`redeem_code` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`createdBy` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`createdAt` DATETIME NOT NULL DEFAULT current_timestamp(),
	`updatedAt` DATETIME NULL DEFAULT NULL ON UPDATE current_timestamp(),
	`expiryDate` DATETIME NULL DEFAULT NULL,
	`creatorIdentifier` VARCHAR(255) NOT NULL COLLATE 'utf8mb4_general_ci',
	`usage_limit` INT(11) NULL DEFAULT NULL,
	`remainingUses` INT(11) NULL DEFAULT '0',
	`expired` TINYINT(1) NULL DEFAULT '0',
	`enable` TINYINT(1) NULL DEFAULT '1',
	`claimed_redeem` TINYINT(1) NULL DEFAULT '0',
	`items` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8mb4_bin',
	`type` VARCHAR(50) NULL DEFAULT 'redeem' COLLATE 'utf8mb4_general_ci',
	`receiver_identifier` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`receiver_name` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`id`) USING BTREE,
	UNIQUE INDEX `redeem_code` (`redeem_code`) USING BTREE,
	CONSTRAINT `items` CHECK (json_valid(`items`))
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1
;
CREATE TABLE `g_redeem_log` (
	`id` INT(11) NOT NULL AUTO_INCREMENT,
	`identifier` VARCHAR(46) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`redeem_code` VARCHAR(255) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`name` CHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`id`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1
;

💯
keymaster