Private Garages

CS-Garages provides a system for configuring private garages that players can purchase. This guide covers private garage configuration.

Configuration

Configure private garage properties in config.lua:

Config.PrivateGarages = {
    {
        ["garagePrice"] = 1000000,           -- Purchase price
        ["garageArea"] = "Garage Name",      -- Display name
        ["garageType"] = "car",              -- Vehicle type
        ["interiorSettings"] = {
            ["EntitySets"] = {
                ["garage_decor_01"] = {
                    ["label"] = "Style Name",
                    ["price"] = 1000
                }
                -- Add more styles as needed
            }
        },
        ["locations"] = {
            ["buyLocation"] = vector3(x, y, z),        -- Purchase point
            ["driveInLocation"] = vector3(x, y, z),    -- Vehicle entrance
            ["driveOutLocation"] = vector4(x, y, z, h),-- Vehicle exit with heading
            ["exitLocation"] = vector3(x, y, z),       -- Interior exit
            ["manageLocation"] = vector3(x, y, z),     -- Management point
            ["vehiclesInside"] = {                     -- Parking spots
                {
                    ["Coords"] = vector3(x, y, z),
                    ["Heading"] = heading
                }
            },
            ["garageImages"] = {              -- UI images
                ["building"] = {
                    "url1",
                    "url2"
                },
                ["interiors"] = {
                    ["style_id"] = "image_url"
                }
            }
        }
    }
}

Blip Configuration

Configure private garage blips:

Config.PrivateGarageBlips = {
    ["sprite"] = 357,
    ["scale"] = 0.8,
    ["display"] = 4,
    ["colour"] = 0,
    ["shortRange"] = true,
    ["name"] = "Garage Private"
}

Payment Configuration

Configure payment settings:

Config.Utils = {
    ["priceConfig"] = {
        ["returnAmount"] = 0.5,    -- Refund percentage for selling private garage
        ["privateGaragePaymentType"] = "bank",     -- "money" or "bank"
        ["interiorPaymentType"] = "bank"           -- "money" or "bank"
    }
}

Troubleshooting

If private garage purchase fails:

  1. Verify database table exists

  2. Check player has sufficient funds

  3. Confirm payment type configuration

For support, please include:

  • Server console output

  • Configuration settings

  • List of installed dependencies

  • Steps to reproduce the issue