Framework Settings
CS-Garages supports both ESX and QBCore frameworks. This guide will help you configure your chosen framework.
Basic Configuration
Set your framework in config.lua
:
Config.Utils = {
["framework"] = "ESX", -- Choose "ESX" or "QBcore"
}
Database Requirements
ESX Framework
If using ESX, add the mileage column:
ALTER TABLE owned_vehicles
ADD COLUMN IF NOT EXISTS mileage INT(11) NOT NULL DEFAULT 0;
QBCore Framework
If using QBCore, add the driving distance column:
ALTER TABLE player_vehicles
ADD COLUMN IF NOT EXISTS drivingdistance INT(11) NOT NULL DEFAULT 0;
Required Tables
The system requires the following table for both frameworks:
CREATE TABLE IF NOT EXISTS owned_garages (
id INT AUTO_INCREMENT PRIMARY KEY,
owner VARCHAR(50) NOT NULL,
garageId INT NOT NULL,
currentInterior VARCHAR(50) NOT NULL,
purchasedInteriors TEXT DEFAULT '[]',
vehicles TEXT DEFAULT '[]',
visitors TEXT DEFAULT '[]',
lastAccessed TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
UNIQUE KEY unique_owner_garage (owner, garageId)
);
Dependencies
The following dependencies are required regardless of framework:
oxmysql
ox_lib
FiveM server artifacts 5848 or newer
Troubleshooting
If you encounter framework-related issues:
Check server console for errors
Verify all dependencies are installed
Ensure resource name is exactly "cs-garages"
Verify database tables exist and are properly configured