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.
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.
This script may cause conflicts or errors if you use other dealership systems on your server. Common examples include qb-apartments, qbx_property or other similar dealership scripts. It’s strongly recommended to remove them completely before installation to prevent compatibility or functionality issues.
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/QB
sql
DROPTABLE IF EXISTS `player_apartments`;
CREATE TABLE `player_apartments` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NULLDEFAULTNULLCOLLATE'latin1_swedish_ci',
`type` VARCHAR(255) NULLDEFAULTNULLCOLLATE'latin1_swedish_ci',
`label` VARCHAR(255) NULLDEFAULTNULLCOLLATE'latin1_swedish_ci',
`citizenid` VARCHAR(255) NULLDEFAULTNULLCOLLATE'latin1_swedish_ci',
`stash` TEXT NULLDEFAULTNULLCOLLATE'latin1_swedish_ci',
`wardrobe` TEXT NULLDEFAULTNULLCOLLATE'latin1_swedish_ci',
`charge` TEXT NULLDEFAULTNULLCOLLATE'latin1_swedish_ci',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `name` (`name`) USING BTREE,
INDEX `citizenid` (`citizenid`) USING BTREE
)
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=4148
;
ALTER TABLE player_apartments ADDCOLUMN IF NOTEXISTS `vaultCodes` LONGTEXT NULLDEFAULTNULL;
CREATE TABLE `apartment_decorations` (
`id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`apartmentId` VARCHAR(50) NULLDEFAULTNULLCOLLATE'utf8mb3_general_ci',
`creator` VARCHAR(70) NOT NULLDEFAULT'0'COLLATE'utf8mb3_general_ci',
`modelName` VARCHAR(50) NOT NULLDEFAULT'0'COLLATE'utf8mb3_general_ci',
`coords` TEXT NULLDEFAULTNULLCOLLATE'utf8mb3_general_ci',
`rotation` TEXT NOT NULLDEFAULT''COLLATE'utf8mb3_general_ci',
`inStash` TINYINT(1) NOT NULLDEFAULT'0',
`created` TIMESTAMPNULLDEFAULTNULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `id` (`id`, `apartmentId`) USING BTREE
)
COLLATE='utf8mb3_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=7
;
CREATE TABLE IF NOTEXISTS `qs_apartment_furnitures` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`creator` VARCHAR(80) NULLDEFAULTNULL,
`category_key` VARCHAR(100) NOT NULL,
`object` VARCHAR(200) NOT NULL,
`label` VARCHAR(255) NOT NULL,
`description` TEXT NULLDEFAULTNULL,
`price` INT(11) NOT NULLDEFAULT'0',
`img` TEXT NULLDEFAULTNULL,
`colorlabel` VARCHAR(255) NULLDEFAULTNULL,
`type` VARCHAR(50) NULLDEFAULTNULL,
`stash` LONGTEXT NULLDEFAULTNULL,
`offset` LONGTEXT NULLDEFAULTNULL,
`colors` LONGTEXT NULLDEFAULTNULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `creator` (`creator`) USING BTREE,
INDEX `category_key` (`category_key`) USING BTREE
)COLLATE='utf8mb4_unicode_ci' ENGINE=InnoDB;
CREATE TABLE IF NOTEXISTS `qs_apartment_junk` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`house` VARCHAR(255) NOT NULL,
`model` VARCHAR(255) NOT NULL,
`coords` LONGTEXT NULLDEFAULTNULL,
`created_at` TIMESTAMPNULLDEFAULTCURRENT_TIMESTAMP(),
PRIMARY KEY (`id`) USING BTREE,
INDEX `idx_house` (`house`) USING BTREE
)
COLLATE='utf8mb4_unicode_ci'
ENGINE=InnoDB
AUTO_INCREMENT=1;
Quasar Apartments can automatically assign a starter apartment to players when they join the server. This feature works through the integration with qs-multicharacter, which handles the character spawn and initial setup process.
Open the Chat
Press T to open the in-game chat.
Run the Command
Type the following command: /apartment.
Select Your Apartment
The apartment selection menu will open, allowing the player to choose their preferred apartment.
Running the Command via Code
If you want to trigger the apartment selection automatically from a script or custom event, use the following:
lua
ExecuteCommand("apartment")
This command enables automated apartment selection and allows developers to integrate apartment spawning or selection into other systems, events, or custom gameplay flows.