Getting Started

This guide will walk you through installing CS-Garages on your FiveM server.

Prerequisites

Before installing CS-Garages, ensure you have:

  • FiveM server artifacts 5848 or newer

  • oxmysql

  • ox_lib

  • bob74_ipl

Installation Steps

1. Database Setup

Import the following SQL queries:

CREATE TABLE IF NOT EXISTS owned_garages (
    id INT AUTO_INCREMENT PRIMARY KEY,
    owner VARCHAR(50) NOT NULL,
    garageId INT NOT NULL,
    currentInterior JSON NOT NULL,
    purchasedInteriors JSON NOT NULL DEFAULT ('[]'),
    vehicles JSON NOT NULL DEFAULT ('[]'),
    visitors JSON NOT NULL DEFAULT ('[]'),
    lastAccessed TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    UNIQUE KEY unique_owner_garage (owner, garageId)
);

For ESX Framework:

ALTER TABLE owned_vehicles
    ADD COLUMN IF NOT EXISTS mileage INT(11) NOT NULL DEFAULT 0;

For QBCore Framework:

ALTER TABLE player_vehicles
    ADD COLUMN IF NOT EXISTS drivingdistance INT(11) NOT NULL DEFAULT 0;

2. Resource Setup

  1. Ensure resource name is exactly "cs-garages"

  2. Place in resources folder

  3. Add to server.cfg: ensure cs-garages

Basic Configuration

Open shared/config.lua and set your framework:

Config.Utils = {
    ["framework"] = "ESX", -- Choose "ESX" or "QBcore"
}

Verification

After installation:

  1. Check server console for errors

  2. Verify all dependencies are installed

  3. Ensure resource name is exactly "cs-garages"

Support

If you encounter issues, please provide:

  • Server console output

  • Configuration settings

  • List of installed dependencies

  • Steps to reproduce the issue

Last updated