📋 Manual SQL Installation¶
If you prefer not to import the SQL file, you can manually create the required database tables.
- Open phpMyAdmin, HeidiSQL, or another SQL management tool.
- Select your FiveM database.
- Open the SQL tab.
- Copy all of the SQL below.
- Paste it into the SQL editor.
- 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 TABLEstatements after backing up your database.
✅ Verify Installation¶
After executing the SQL:
- Refresh your database.
- Confirm that the
kat_benches,kat_templates, andkat_playerstables have been created. - Start or restart the resource:
refresh
ensure rps_crafting