Quasar Store Logo

Installation

Installation guide — please follow each step carefully and exactly as described to ensure the script works correctly on your server. Skipping or modifying steps may cause the system to not function properly, so follow it step by step.

Download Script

To download the assets needed for this script, you must access the official Cfx.re portal, where all assets purchased through Tebex are managed.

1

Access the Granted Assets Page

Open the Cfx.re granted assets page: https://portal.cfx.re/assets/granted-assets.

This page contains all assets linked to your Cfx.re purchases.

2

Log In with Your Cfx.re Account

Sign in using the same Cfx.re account you used when purchasing the asset.

If you use a different account, the assets will not appear.

3

Download the Housing Assets

In the granted assets list, locate and download:

Crime Creator

These two packages are required to install the full housing system.

These files include the models, materials, and visual resources required for the proper operation of the housing system.





Download Dependencies

This script requires some mandatory dependencies to function correctly. Make sure to download and extract them inside your server’s main directory, keeping their original folder structure intact.





Database Setup

Avoid using tools like XAMPP or other non-optimized local servers, as they may cause connection errors.

This script includes an essential database required for its operation.You must import it before starting your server, preferably using HeidiSQL or any other manager compatible with MariaDB/MySQL.

ESX

ALTER TABLE `users` ADD IF NOT EXISTS `crime_house_inside` INT(5) NULL; INSERT INTO `datastore` (name, label, shared) VALUES ('crime_house', 'Crime House', 0); CREATE TABLE IF NOT EXISTS `qs_crime_organizations` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `label` VARCHAR(255) NOT NULL, `color` VARCHAR(7) DEFAULT '#000000', `entry_coords` LONGTEXT DEFAULT NULL, `garage_coords` LONGTEXT DEFAULT NULL, `locations_coords` LONGTEXT DEFAULT NULL, `zone_points` LONGTEXT DEFAULT NULL, `interior_type` VARCHAR(10) DEFAULT '', `interior_data` LONGTEXT DEFAULT NULL, `mlo_data` LONGTEXT DEFAULT NULL, `ipl_data` LONGTEXT DEFAULT NULL, `blip_data` LONGTEXT DEFAULT NULL, `vault_codes` LONGTEXT DEFAULT NULL, `creator` VARCHAR(50) DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `creator` (`creator`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_organization_ranks` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `label` VARCHAR(255) NOT NULL, `permissions` LONGTEXT DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `organization_id` (`organization_id`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_organization_members` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `identifier` VARCHAR(50) NOT NULL, `name` VARCHAR(255) NOT NULL, `rank_id` INT(11) DEFAULT NULL, `is_boss` BOOLEAN NOT NULL DEFAULT FALSE, `joined_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `org_identifier` (`organization_id`, `identifier`), INDEX `organization_id` (`organization_id`), INDEX `identifier` (`identifier`), INDEX `rank_id` (`rank_id`), INDEX `is_boss` (`is_boss`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE, FOREIGN KEY (`rank_id`) REFERENCES `qs_crime_organization_ranks`(`id`) ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_organization_finance` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `clean_money` INT(11) NOT NULL DEFAULT 0, `dirty_money` INT(11) NOT NULL DEFAULT 0, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `organization_id` (`organization_id`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_organization_transactions` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `type` ENUM('deposit', 'withdraw', 'sale', 'expense') NOT NULL, `amount` INT(11) NOT NULL, `money_type` VARCHAR(20) NOT NULL DEFAULT 'money', `description` TEXT DEFAULT NULL, `reference` VARCHAR(255) DEFAULT NULL, `identifier` VARCHAR(50) DEFAULT NULL, `name` VARCHAR(255) DEFAULT NULL, `status` ENUM('completed', 'pending', 'failed', 'cancelled') NOT NULL DEFAULT 'completed', `metadata` LONGTEXT DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `organization_id` (`organization_id`), INDEX `type` (`type`), INDEX `status` (`status`), INDEX `created_at` (`created_at`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_territories` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `label` VARCHAR(255) NOT NULL, `organization_id` INT(11) DEFAULT NULL, `zone_data` LONGTEXT NOT NULL, `color` VARCHAR(7) DEFAULT '#eab308', `creator` VARCHAR(50) DEFAULT NULL, `war_protection_until` DATETIME DEFAULT NULL, `last_war_at` DATETIME DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `organization_id` (`organization_id`), INDEX `creator` (`creator`), INDEX `war_protection_until` (`war_protection_until`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_taxing` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `label` VARCHAR(255) NOT NULL, `payment_count_min` INT(11) NOT NULL DEFAULT 1, `payment_count_max` INT(11) NOT NULL DEFAULT 1, `location` LONGTEXT DEFAULT NULL, `territory_id` INT(11) DEFAULT NULL, `time_type` VARCHAR(20) DEFAULT 'daily', `time_value` INT(11) DEFAULT 1, `creator` VARCHAR(50) DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `creator` (`creator`), INDEX `territory_id` (`territory_id`), FOREIGN KEY (`territory_id`) REFERENCES `qs_crime_territories`(`id`) ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_taxing_collections` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `taxing_id` INT(11) NOT NULL, `territory_id` INT(11) DEFAULT NULL, `organization_id` INT(11) NOT NULL, `collector_identifier` VARCHAR(50) NOT NULL, `collector_name` VARCHAR(255) NOT NULL, `amount` INT(11) NOT NULL, `next_collectable_at` DATETIME NOT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `taxing_id` (`taxing_id`), INDEX `territory_id` (`territory_id`), INDEX `organization_id` (`organization_id`), INDEX `next_collectable_at` (`next_collectable_at`), FOREIGN KEY (`taxing_id`) REFERENCES `qs_crime_taxing`(`id`) ON DELETE CASCADE, FOREIGN KEY (`territory_id`) REFERENCES `qs_crime_territories`(`id`) ON DELETE SET NULL, FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_season_pass` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `price` INT(11) NOT NULL DEFAULT 0, `end_date` DATETIME NOT NULL, `rewards` LONGTEXT NOT NULL, `creator` VARCHAR(50) DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `creator` (`creator`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_graffiti` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `label` VARCHAR(255) NOT NULL, `font` VARCHAR(100) NOT NULL DEFAULT 'SignPainter-HouseScript', `coords` LONGTEXT NOT NULL, `rotation` LONGTEXT NOT NULL, `scale` FLOAT NOT NULL DEFAULT 1.0, `color` VARCHAR(9) DEFAULT 'FFFFFFFF', `owner_identifier` VARCHAR(50) DEFAULT NULL, `owner_name` VARCHAR(255) DEFAULT NULL, `organization_id` INT(11) DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `owner_identifier` (`owner_identifier`), INDEX `organization_id` (`organization_id`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_organization_upgrades` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `upgrade_name` VARCHAR(100) NOT NULL, `level` INT(11) NOT NULL DEFAULT 0, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `org_upgrade` (`organization_id`, `upgrade_name`), INDEX `organization_id` (`organization_id`), INDEX `upgrade_name` (`upgrade_name`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_organization_vehicles` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `vehicle_model` VARCHAR(50) NOT NULL, `vehicle_label` VARCHAR(255) NOT NULL, `plate` VARCHAR(10) NOT NULL, `vehicle_props` LONGTEXT DEFAULT NULL, `stored` BOOLEAN NOT NULL DEFAULT TRUE, `state` ENUM('garage', 'out', 'impound') NOT NULL DEFAULT 'garage', `metadata` LONGTEXT DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `plate` (`plate`), INDEX `organization_id` (`organization_id`), INDEX `state` (`state`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_vehicle_activities` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `vehicle_id` INT(11) NOT NULL, `vehicle_label` VARCHAR(255) NOT NULL, `plate` VARCHAR(10) NOT NULL, `action` ENUM('spawn', 'store', 'sell', 'retrieve_impound') NOT NULL, `player_name` VARCHAR(255) NOT NULL, `identifier` VARCHAR(50) DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `organization_id` (`organization_id`), INDEX `vehicle_id` (`vehicle_id`), INDEX `created_at` (`created_at`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE, FOREIGN KEY (`vehicle_id`) REFERENCES `qs_crime_organization_vehicles`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_vehicle_store` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `vehicle_model` VARCHAR(50) NOT NULL, `vehicle_label` VARCHAR(255) NOT NULL, `description` TEXT DEFAULT NULL, `image` VARCHAR(500) DEFAULT NULL, `price` INT(11) NOT NULL DEFAULT 0, `limited` BOOLEAN NOT NULL DEFAULT FALSE, `limited_end_date` DATETIME DEFAULT NULL, `limited_quantity` INT(11) DEFAULT NULL, `creator` VARCHAR(50) DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `vehicle_model` (`vehicle_model`), INDEX `limited` (`limited`), INDEX `creator` (`creator`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_organizations_stats` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `level` INT(11) NOT NULL DEFAULT 1, `xp` INT(11) NOT NULL DEFAULT 0, `total_missions` INT(11) NOT NULL DEFAULT 0, `total_territory_wars_won` INT(11) NOT NULL DEFAULT 0, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `organization_id` (`organization_id`), INDEX `level` (`level`), INDEX `xp` (`xp`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_organization_seasonpass_progress` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `season_pass_id` INT(11) NOT NULL, `level` INT(11) NOT NULL DEFAULT 1, `xp` INT(11) NOT NULL DEFAULT 0, `has_premium` TINYINT(1) NOT NULL DEFAULT 0, `claimed_rewards` LONGTEXT DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `org_seasonpass` (`organization_id`, `season_pass_id`), INDEX `organization_id` (`organization_id`), INDEX `season_pass_id` (`season_pass_id`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE, FOREIGN KEY (`season_pass_id`) REFERENCES `qs_crime_season_pass`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_territory_wars` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `territory_id` INT(11) NOT NULL, `status` ENUM('pending', 'active', 'finished') NOT NULL DEFAULT 'pending', `started_by_org_id` INT(11) NOT NULL, `started_at` DATETIME NOT NULL, `ends_at` DATETIME NOT NULL, `winner_org_id` INT(11) DEFAULT NULL, `start_cost` INT(11) NOT NULL DEFAULT 0, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `territory_id` (`territory_id`), INDEX `status` (`status`), INDEX `started_by_org_id` (`started_by_org_id`), INDEX `winner_org_id` (`winner_org_id`), INDEX `ends_at` (`ends_at`), FOREIGN KEY (`territory_id`) REFERENCES `qs_crime_territories`(`id`) ON DELETE CASCADE, FOREIGN KEY (`started_by_org_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE, FOREIGN KEY (`winner_org_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_territory_war_scores` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `war_id` INT(11) NOT NULL, `organization_id` INT(11) NOT NULL, `score` INT(11) NOT NULL DEFAULT 0, `tax_stolen` INT(11) NOT NULL DEFAULT 0, `drugs_sold` INT(11) NOT NULL DEFAULT 0, `graffiti_sprayed` INT(11) NOT NULL DEFAULT 0, `graffiti_removed` INT(11) NOT NULL DEFAULT 0, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `war_org` (`war_id`, `organization_id`), INDEX `war_id` (`war_id`), INDEX `organization_id` (`organization_id`), INDEX `score` (`score`), FOREIGN KEY (`war_id`) REFERENCES `qs_crime_territory_wars`(`id`) ON DELETE CASCADE, FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_organization_missions` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `mission_id` VARCHAR(100) NOT NULL, `progress` INT(11) NOT NULL DEFAULT 0, `target_value` INT(11) NOT NULL, `completed_at` DATETIME DEFAULT NULL, `pending_rewards` LONGTEXT DEFAULT NULL, `status` ENUM('active', 'completed') NOT NULL DEFAULT 'active', `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `organization_id` (`organization_id`), INDEX `mission_id` (`mission_id`), INDEX `status` (`status`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `qs_crime_organization_missions` ADD COLUMN IF NOT EXISTS `started_by_identifier` VARCHAR(128) NULL DEFAULT NULL; CREATE INDEX IF NOT EXISTS `idx_org_missions_owner` ON `qs_crime_organization_missions` (`organization_id`, `started_by_identifier`, `status`); CREATE TABLE IF NOT EXISTS `qs_crime_mission_history` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `mission_id` VARCHAR(100) NOT NULL, `identifier` VARCHAR(50) NOT NULL, `completed_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `organization_id` (`organization_id`), INDEX `mission_id` (`mission_id`), INDEX `identifier` (`identifier`), INDEX `completed_at` (`completed_at`), INDEX `org_mission_date` (`organization_id`, `mission_id`, `completed_at`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_organization_member_stats` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `identifier` VARCHAR(50) NOT NULL, `total_xp_earned` INT(11) NOT NULL DEFAULT 0, `total_missions_completed` INT(11) NOT NULL DEFAULT 0, `total_territory_wars_participated` INT(11) NOT NULL DEFAULT 0, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `org_identifier` (`organization_id`, `identifier`), INDEX `organization_id` (`organization_id`), INDEX `identifier` (`identifier`), INDEX `total_xp_earned` (`total_xp_earned`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_house_junks` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `house` VARCHAR(255) NOT NULL, `model` VARCHAR(255) NOT NULL, `coords` LONGTEXT NULL DEFAULT NULL, `created_at` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP(), PRIMARY KEY (`id`) USING BTREE, INDEX `idx_house` (`house`) USING BTREE ) COLLATE='utf8mb4_unicode_ci' ENGINE=InnoDB AUTO_INCREMENT=1; CREATE TABLE IF NOT EXISTS `qs_crime_house_decorations` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `house` VARCHAR(50) NULL DEFAULT NULL, `creator` VARCHAR(70) NOT NULL DEFAULT '0', `modelName` VARCHAR(50) NOT NULL DEFAULT '0', `coords` TEXT NULL DEFAULT NULL, `rotation` TEXT NOT NULL DEFAULT '', `inStash` TINYINT(1) NOT NULL DEFAULT '0', `inHouse` TINYINT(1) UNSIGNED NOT NULL DEFAULT '0', `uniq` VARCHAR(50) NULL DEFAULT NULL, `created` TIMESTAMP NULL DEFAULT NULL, `lightData` TEXT NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, INDEX `id` (`id`, `house`) USING BTREE ) COLLATE='utf8mb4_general_ci' ENGINE=InnoDB ; CREATE TABLE IF NOT EXISTS `qs_crime_pvp_battles` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `label` VARCHAR(255) NOT NULL, `start_date` DATETIME NOT NULL, `duration` INT(11) NOT NULL, `zone_points` LONGTEXT DEFAULT NULL, `center_coords` LONGTEXT DEFAULT NULL, `rewards` LONGTEXT DEFAULT NULL, `allowed_organizations` LONGTEXT DEFAULT NULL, `status` ENUM('pending', 'active', 'finished') NOT NULL DEFAULT 'pending', `creator` VARCHAR(50) DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX `status` (`status`), INDEX `start_date` (`start_date`), INDEX `creator` (`creator`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_pvp_participants` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `pvp_battle_id` INT(11) NOT NULL, `organization_id` INT(11) NOT NULL, `status` ENUM('invited', 'accepted', 'cancelled') NOT NULL DEFAULT 'invited', `accepted_by` VARCHAR(50) DEFAULT NULL, `accepted_at` DATETIME DEFAULT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `pvp_org` (`pvp_battle_id`, `organization_id`), INDEX `pvp_battle_id` (`pvp_battle_id`), INDEX `organization_id` (`organization_id`), INDEX `status` (`status`), FOREIGN KEY (`pvp_battle_id`) REFERENCES `qs_crime_pvp_battles`(`id`) ON DELETE CASCADE, FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_pvp_scores` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `pvp_battle_id` INT(11) NOT NULL, `organization_id` INT(11) NOT NULL, `score` INT(11) NOT NULL DEFAULT 0, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `pvp_org_score` (`pvp_battle_id`, `organization_id`), INDEX `pvp_battle_id` (`pvp_battle_id`), INDEX `organization_id` (`organization_id`), INDEX `score` (`score`), FOREIGN KEY (`pvp_battle_id`) REFERENCES `qs_crime_pvp_battles`(`id`) ON DELETE CASCADE, FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `qs_crime_money_laundering_daily` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `organization_id` INT(11) NOT NULL, `identifier` VARCHAR(50) NOT NULL, `completed_count` INT(11) NOT NULL DEFAULT 0, `total_laundered` INT(11) NOT NULL DEFAULT 0, `last_reset_date` DATE NOT NULL, `created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `org_player_date` (`organization_id`, `identifier`, `last_reset_date`), INDEX `organization_id` (`organization_id`), INDEX `identifier` (`identifier`), INDEX `last_reset_date` (`last_reset_date`), FOREIGN KEY (`organization_id`) REFERENCES `qs_crime_organizations`(`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; ALTER TABLE `qs_crime_organization_members` ADD COLUMN IF NOT EXISTS `avatar` LONGTEXT NULL DEFAULT NULL AFTER `joined_at`;



QB





Important — Please Read Before Continuing

Learn how to build dynamic gang systems, territories, missions, and criminal progression for FiveM roleplay servers using Quasar Crime Creator.

Before continuing with this documentation, it is important to understand the concept behind this system and how it is designed to be used on your server.

Quasar Crime Creator is not a simple gang script.

Advanced FiveM gang management dashboard from Quasar Crime Creator showing gang system UI, missions, territories and criminal progression for ESX, QBcore and Qbox roleplay servers
Advanced FiveM gang management dashboard from Quasar Crime Creator showing gang system UI, missions, territories and criminal progression for ESX, QBcore and Qbox roleplay servers


This system is designed to create living criminal organizations that evolve over time through progression, missions, and territorial control.

Instead of spawning gangs that simply sit in a neighborhood doing nothing, the idea is to build a complete criminal ecosystem where gangs start from scratch and grow through activity.

A gang typically begins with a basic organization and an empty base. Administrators can assign them a territory and a headquarters using a housing-style system similar to qs-housing, allowing gangs to decorate their base, organize storage, and create their own criminal headquarters.

FiveM crime gang system interface displaying gang stats, missions, territory control and criminal organization management for ESX QBcore Qbox servers
FiveM crime gang system interface displaying gang stats, missions, territory control and criminal organization management for ESX QBcore Qbox servers


From that point forward, gangs must actively progress. Members will need to complete missions, participate in criminal activities, and advance through the Season Pass system to unlock rewards such as vehicles, upgrades, and new gameplay features.

Quasar Crime Creator gang panel interface for FiveM showing criminal organization management, missions system and gang progression mechanics
Quasar Crime Creator gang panel interface for FiveM showing criminal organization management, missions system and gang progression mechanics


As gangs grow stronger, they will also be able to expand their influence across the city by conquering territories and controlling key illegal operations such as:

Money laundering locations
Illegal doctors
Strategic criminal zones

This system transforms gangs from static groups into progression-driven criminal organizations that compete, expand, and dominate the map through gameplay.

FiveM crime mission system and season pass progression interface from Quasar Crime Creator showing gang rewards, missions and criminal progression mechanics
FiveM crime mission system and season pass progression interface from Quasar Crime Creator showing gang rewards, missions and criminal progression mechanics


Take a moment to understand this philosophy before continuing with the rest of the documentation, as it will help you configure the system in the most immersive and effective way for your server.