OpsLab Books
Realplay Scripts /RPS Crafting Manual SQL Installation
Help Sign in Sign up
Installation

📋 Manual SQL Installation

If you prefer not to import the SQL file, you can manually create the required database tables.

  1. Open phpMyAdmin, HeidiSQL, or another SQL management tool.
  2. Select your FiveM database.
  3. Open the SQL tab.
  4. Copy all of the SQL below.
  5. Paste it into the SQL editor.
  6. Click Execute or Run.

📄 SQL Code

CREATE TABLE IF NOT EXISTS `kat_benches` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `label` VARCHAR(50) NOT NULL,
    `template_id` INT NOT NULL,
    `coords` LONGTEXT NOT NULL,
    `jobs` LONGTEXT DEFAULT NULL,
    `gangs` LONGTEXT DEFAULT NULL,
    `model` VARCHAR(100) DEFAULT 'xm3_prop_xm3_bench_04b',
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

-- If upgrading an existing install, run these ALTER statements:
-- ALTER TABLE `kat_benches` ADD COLUMN `model` VARCHAR(100) DEFAULT 'xm3_prop_xm3_bench_04b';
-- ALTER TABLE `kat_players` ADD COLUMN `blueprints` LONGTEXT DEFAULT '[]';

CREATE TABLE IF NOT EXISTS `kat_templates` (
    `id` INT AUTO_INCREMENT PRIMARY KEY,
    `name` VARCHAR(50) NOT NULL,
    `items_data` LONGTEXT NOT NULL,
    `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE IF NOT EXISTS `kat_players` (
    `citizenid` VARCHAR(50) PRIMARY KEY,
    `xp` INT DEFAULT 0,
    `cp` INT DEFAULT 0,
    `upgrades` LONGTEXT DEFAULT '{"fast_hands": 0, "genius": 0, "millionaire": 0, "triple_r": 0}',
    `blueprints` LONGTEXT DEFAULT '[]',
    `last_updated` TIMESTAMP DEFAULT CURRENT_TIMESTAMP
        ON UPDATE CURRENT_TIMESTAMP
);

Note: If you're updating from an older version, uncomment and execute the relevant ALTER TABLE statements after backing up your database.

✅ Verify Installation

After executing the SQL:

  • Refresh your database.
  • Confirm that the kat_benches, kat_templates, and kat_players tables have been created.
  • Start or restart the resource:
refresh
ensure rps_crafting