Configuration
The script is fully configurable, allowing complete customization of its behavior and features. Below is a list of configuration files included in the resource.
Last updated
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Dependency Check Helper
-- (Information) βΊ Returns the first matching started resource alias from provided table.
-- (Information) βΊ Used by Fuel/Keys/TextUI/Notify/Target detection below.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
function scriptCheck(data) -- Do not modify unless you know what you're doing.
for k, v in pairs(data) do
if GetResourceState(k):find('started') ~= nil then
return v
end
end
return false
end
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- OTHERPLANET / OP Garages CONFIGURATION
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- This configuration file controls all customizable behaviour of OP Garages.
-- Always make a backup before editing.
-- Wrong edits can break the resource.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config = {}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Locale & Debug
-- (Information) βΊ Locale controls which language file from locales/* will be used.
-- (Information) βΊ Debug enables extra logging to help with issue tracking.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.Locale = "en" -- Supported: EN, PL, EL, FR, HR, IT, SK, SL, CZ, SV, PT, TW, ES, AR, NO, DE, BG
Config.Debug = false -- true = verbose debug output in console.
-- Translations in progress: TR / LT / HU
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Default Locations Helper
-- (Information) βΊ Inserts default garages/impounds into database (server console).
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- IF YOU WANT DO USE OUR DEFAULT GARAGES AND IMPOUND LOCATIONS USE COMMAND USING SERVER CONSOLE
-- /insertDefaultLocations
-- Then restart the server.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Fuel Dependency Detection
-- (Information) βΊ Auto-detects your active fuel resource.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
local fuelScripts = {
['cdn-fuel'] = "cdn-fuel",
['ox_fuel'] = "ox-fuel",
['LegacyFuel'] = "LegacyFuel",
['rcore_fuel'] = "rcore-fuel",
['codem-xfuel'] = "codem-xfuel",
['lc_fuel'] = "lc_fuel",
['stg-fuel'] = "stg-fuel",
}
Config.FuelDependency = scriptCheck(fuelScripts) or 'none'
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Vehicle Keys Dependency Detection
-- (Information) βΊ Auto-detects supported vehicle key systems.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
local keyScripts = {
['brutal_keys'] = "brutal_keys",
['qbx_vehiclekeys'] = "qb-keys",
['qb-vehiclekeys'] = "qb-keys",
['wasabi_carlock'] = "wasabi_carlock",
['sna-vehiclekeys'] = "sna-vehiclekeys",
['dusa_vehiclekeys'] = "dusa_vehiclekeys",
['Renewed-Vehiclekeys'] = "Renewed-Vehiclekeys",
['tgiann-hotwire'] = "tgiann-keys",
['ak47_vehiclekeys'] = "ak47_vehiclekeys",
['ak47_qb_vehiclekeys'] = "ak47_qb_vehiclekeys",
['mVehicle'] = "mVehicle",
['sy_carkeys'] = "sy_carkeys",
['MrNewbVehicleKeys'] = "MrNewbVehicleKeys",
['p_carkeys'] = "p_carkeys",
-- Older / custom QB variants (keep as manual options when needed):
-- old-qb-keys / custom-qb-keys
}
Config.KeysDependency = scriptCheck(keyScripts) or 'none'
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Text UI Dependency Detection
-- (Information) βΊ Auto-detects supported 3D/2D Text UI libraries.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
local textUIScripts = {
['ox_lib'] = "ox_lib",
['jg-textui'] = "jg-textui",
['okokTextUI'] = "okokTextUI",
['brutal_textui'] = "brutal_textui",
['0r-textui'] = "0r-textui",
}
Config.TextUI = scriptCheck(textUIScripts) or 'none'
Config.Addons = {
AdvancedParking = false, -- Set to true if you're using Advanced Parking v4 Script.
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ MISC CONFIGURATION βοΈ
-- (Information) βΊ General behaviour, markers, notifications, target, peds, prices, etc.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.Misc = {
zoneSize = 1.2, -- Marker radius.
zoneColor = { -- Marker color.
r = 52,
g = 116,
b = 235,
},
Icons = { -- OX Target / QB Target icons.
car = "fa-solid fa-square-parking",
sea = "fa-solid fa-sailboat",
air = "fa-solid fa-plane",
impound = "fa-solid fa-money-bill-wave",
showroom = "fa-solid fa-building",
ownedGarage = "fa-solid fa-square-parking",
ownedGarage_purchase = "fa-solid fa-money-bill-wave",
ownedGarage_takeOut = "fa-solid fa-square-parking",
ownedGarageManage = "fa-solid fa-code-fork",
},
TowingPrice = 200, -- Price of towing left or destroyed vehicle.
TowingTime = 5, -- Towing destroyed/left vehicle Time.
TransferPrice = 500, -- Transfer Vehicle from garage to garage price.
Peds = {
-- You can also disable only selected ped. E.X (sea = false)
Toggle = true, -- Disable/Enable peds.
sea = {
model = "player_one",
gender = "male"
},
air = {
model = "ig_floyd",
gender = "male"
},
impound = {
model = "ig_trafficwarden",
gender = "male"
},
car = {
model = "s_m_y_garbage",
gender = "male"
}
},
Markers = {
-- If you don't use ox_target or qb-target you can setup different markers for selected interactions.
-- To disable selected marker drawing set it to false. (example: car = false)
-- If peds are enabled, marker will be drawed in front of ped.
sea = {
type = 35,
size = vec3(2.2, 2.2, 2.2),
color = { -- Marker color.
r = 52,
g = 116,
b = 235,
}
},
air = {
type = 34,
size = vec3(1.2, 1.2, 1.2),
color = { -- Marker color.
r = 52,
g = 116,
b = 235,
}
},
impound = {
type = 39,
size = vec3(1.2, 1.2, 1.2),
color = { -- Marker color.
r = 242,
g = 0,
b = 20,
}
},
car = {
type = 36,
size = vec3(1.2, 1.2, 1.2),
color = { -- Marker color.
r = 52,
g = 116,
b = 235,
}
}
},
WarpPedToVehicle = true, -- If false, player will be not teleported or walked to the vehicle.
DisableVehicleHideAnimation = true, -- Disable take out vehicle animation (Player will be teleported inside vehicle instead of animation)
DisableVehicleSpawnInGarage = false, -- Disable spawning showcase vehicle when open garage
DisableVehicleTransfer = false, -- Vehicles will be availabe to take out from every garage.
VehicleBackToGarage = false, -- using this function, vehicles will back to player's garage once he disconnect from the server.
ReverseGradeCheck = true, -- examples: True = vehicle with minimum grade 3 will be available for grades higher than 3. False = vehicle with minimum grade 3 will be available for grades lower than 3.
DisableVehiclesTransferButKeepUniqueGarages = false, -- If this is true, it will keep vehicles in garages where they were stored but do not allow to transfer between garages.
GiveKeysToSubownerWhenTakenOut = false, -- If true - script will give keys to subowner when vehicle is taken out from garage / remove keys from subowner when vehicle is stored.
GiveKeysInsideShowroom = false, -- Give keys to all vhicles inside showroom.
}
Config.NUI = {
GarageSmallVersion = false, -- Enable / Disable small version of garage. This option changes Garage menu to box on the middle of the screen instead on the left.
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Target / Notify Auto Detection (optional)
-- (Information) βΊ Detects target/notify libraries by started resources.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
local targets = {
['ox_target'] = "ox-target",
['qb-target'] = "qb-target",
}
local notifyScripts = {
['op-hud'] = "op_hud",
['okokNotify'] = "okokNotify",
['vms_notify'] = "vms_notify",
['ox_lib'] = "ox_lib",
['brutal_notify'] = "brutal_notify",
}
Config.Misc.Notify = scriptCheck(notifyScripts) or 'none'
Config.Misc.Target = scriptCheck(targets) or 'none'
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- Markers Configuration (Store / Hide Vehicle)
-- (Information) βΊ These markers are used to store/hide a vehicle back into garage.
-- (Information) βΊ They are usually visible only when sitting in a vehicle on parking slots.
-- (Information) βΊ `enableWhenUsingTarget` keeps markers even if you use target interaction.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.Markers = {
-- Markers for hiding vehicles in garage, visible only when inside car on parking slots!
enable = true,
enableWhenUsingTarget = true,
car = {
type = 36,
size = vec3(1.2, 1.2, 1.2),
color = { -- Marker color.
r = 52,
g = 116,
b = 235,
}
},
air = {
type = 34,
size = vec3(1.2, 1.2, 1.2),
color = { -- Marker color.
r = 52,
g = 116,
b = 235,
}
},
sea = {
type = 35,
size = vec3(2.2, 2.2, 2.2),
color = { -- Marker color.
r = 52,
g = 116,
b = 235,
}
},
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ SUB OWNERS βοΈ
-- (Information) βΊ Allows sharing vehicle access with additional players.
-- (Information) βΊ Configure command, price and maximum subowners per vehicle.
-- (Information) βΊ Custom payment / restrictions: server/editable/payForSubOwner.lua & client/editable/restrictSubOwners.lua
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.SubOwners = {
Allow = true, -- Disable/Enable sub owners feature.
Command = "subowner", -- Command Name
Price = 5000, -- Price of adding subowner
MaxSubOwners = 3, -- Maximum amount of subowners for one vehicle.
-- You can add your custom pay method using server/editable/payForSubOwner.lua
-- You can also set open menu function only for donators or whatever you want using: client/editable/restrictSubOwners.lua
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ Mileage βοΈ
-- (Information) βΊ Displays vehicle mileage in garage UI (reads value from database column).
-- (Information) βΊ Requires mileage to be stored in your vehicles table; set correct column name.
-- (Information) βΊ Recommended display resource: jg-mileage
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.Mileage = {
Enable = true,
DatabaseColumnName = "mileage",
DistanceUnit = "Mi"
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ ADMINISTRATORS βοΈ
-- (Information) βΊ Admin menu command and management commands (delete/add vehicles).
-- (Information) βΊ Configure who can use admin panel via identifiers below.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.AdminMenu = {
Command = "garageadmin", -- Command Name
EnableCommands = true, -- Disable/Enable commands: (/delveh, /addcar)
PlateChangerCommand = "changeplate", -- Plate changer command.
DeleteVehicle = "delveh", -- Permamently Delete car from database.
AddCarCommand = "addcar", -- Add car to database.
AddJobCarCommand = "addjobcar", -- Add job car to database.
AddGangCarCommand = "addgangcar", -- Add gang car to database.
}
-- List of allowed identifiers to use /garageadmin
-- You can use all identifiers from TXADMIN -> `IDs` (No Hardware IDs!)
-- You can also use character identifier to allow only selected character of administrator:
-- E.X: char1:7e0ec7b80d186fd8c29f6631e4377e75812fe8fd
-- OR ON QBOX/QB CITIZENID!!
Config.AdminPanelPlayers = {
['fivem:1550613'] = true,
['discord:571105311251890186'] = true,
['license:94792cad7ae764305aae8f1372d3cd287848ae7c'] = true
}
-- List of allowed Ranks to use Admin Commands and Admin Panel.
Config.RanksPermissions = {
['esx'] = {'superadmin', 'admin', 'mod', },
['qbcore'] = {'god', 'admin', },
['qbox'] = {'god', 'admin', },
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ Impound Menu Config βοΈ
-- (Information) βΊ Controls impound menu access, allowed jobs/grades and release fee limits.
-- (Information) βΊ Locations are configured via garage admin (per job, if needed).
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.IV = {
jobsList = {
['mechanic'] = 2, -- Job name & grade.
['police'] = 1, -- Job name & grade.
},
commandName = "impoundmenu", -- Command Name
allowPriceBeforeImpoundDate = true, -- Allows setting the vehicle release price *before* the impound date. (The player who impounded the vehicle can also set it to 0 to disable the fee.)
allowPriceAfterImpoundDate = true, -- Allows setting the vehicle release price *after* the impound date. (The player who impounded the vehicle can also set it to 0 to disable the fee.)
maxPriceAfterImpoundDate = 6500, -- Maximum fee for releasing a vehicle after the impound date.
maxPriceBeforeImpoundDate = 14500, -- Maximum fee for releasing a vehicle before the impound date.
timeOptions = {
-- Value = hours, or "never"
{label = "Available Instantly", value = "0"},
{label = "1 Day", value = "24"},
{label = "3 Days", value = "72"},
{label = "7 Days", value = "168"},
{label = "Only By fraction member.", value = "never"},
}
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ Owned Garages Settings βοΈ
-- (Information) βΊ Settings for owned garages (Purchasable places where player can invite friend etc.)
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.OwnedGarages = {
sellToCityPercentage = 80, -- If garage costs 100k$ player will be available to isntantly sell this garage for 80k$
blips = {
ownedGarage = {
blipId = 524,
blipColor = 3
},
toPurchaseGarage = {
blipId = 375,
blipColor = 2
}
},
Markers = {
-- If you don't use ox_target or qb-target you can setup different markers for selected interactions.
-- To disable selected marker drawing set it to false. (example: car = false)
entrance = { -- entrance / leave door
type = 6,
size = vec3(1.2, 1.2, 1.2),
color = { -- Marker color.
r = 52,
g = 116,
b = 235,
}
},
manageGarage = { -- manage garage marker
type = 6,
size = vec3(1.2, 1.2, 1.2),
color = { -- Marker color.
r = 52,
g = 116,
b = 235,
}
},
takeOut = { -- car take out marker
type = 36,
size = vec3(1.2, 1.2, 1.2),
color = { -- Marker color.
r = 52,
g = 116,
b = 235,
}
},
purchase = { -- garage purchase marker
type = 29,
size = vec3(1.2, 1.2, 1.2),
color = { -- Marker color.
r = 12,
g = 209,
b = 8,
}
},
},
availableInteriors = {
-- Index must be unique number!!!
[1] = {
label = "Small Garage",
image = "https://forum-cfx-re.akamaized.net/original/3X/d/9/d9cd4b3a97dd0ff36b1874db8f34849f986ee48d.jpeg",
entranceCoords = vec4(206.7799, -998.9412, -99.0000, 86.8923),
manageGarageCoords = vec4(205.4705, -995.3528, -99.0000, 134.4235),
parkingSlots = {
vec4(194.4693, -1001.2854, -99.5944, 181.5290),
vec4(202.2279, -1000.8835, -99.5956, 179.7534),
},
},
[2] = {
label = "Large Garage",
image = "https://forum-cfx-re.akamaized.net/original/3X/d/9/d9cd4b3a97dd0ff36b1874db8f34849f986ee48d.jpeg",
entranceCoords = vec4(237.7881, -1004.9349, -99.0000, 97.2883),
manageGarageCoords = vec4(234.6618, -976.7750, -99.0000, 143.9041),
parkingSlots = {
vec4(224.5825, -1001.2023, -99.5936, 303.7140),
vec4(224.5841, -996.5183, -99.5940, 308.2179),
vec4(223.7261, -991.9572, -99.5950, 310.6811),
vec4(223.5744, -986.9030, -99.5940, 309.8272),
vec4(223.8099, -981.5557, -99.5934, 311.7174)
},
},
}
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ CarContract Settings βοΈ
-- (Information) βΊ Enables vehicle selling/transfer via car contract (command and/or item).
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.CarContract = {
command = {
enable = true,
name = "sellcar"
},
item = {
enable = true,
name = "car_contract",
removeOnUse = true,
}
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ Fake Plate Settings βοΈ
-- (Information) βΊ Controls required items and duration for applying/removing fake plates.
-- (Information) βΊ To disable: simply don't create required items (or remove them from inventory).
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.FakePlates = {
fakePlateItemName = "fakeplate",
fakePlateRemoveItemName = "fakeplate_remover",
animationDuration = 15, -- Time in seconds
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ Currency Settings βοΈ
-- (Information) βΊ Visual formatting of money values in the UI (JS Intl.NumberFormat).
-- (Information) βΊ This does not change economy logic, only display formatting.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.CurrencySettings = {
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
currency = "USD",
style = "currency",
format = "en-US"
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ Blips Settings βοΈ
-- (Information) βΊ Map blips for garages/impound types.
-- (Information) βΊ Configure scale, sprite (blipId) and color per category.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.Blips = {
size = 0.8,
car = {
blipId = 357,
blipColor = 3
},
sea = {
blipId = 356,
blipColor = 3
},
air = {
blipId = 569,
blipColor = 3
},
impound = {
blipId = 67,
blipColor = 1
}
}
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βοΈ Showrooms locations βοΈ
-- (Information) βΊ Defines showroom interiors and parking slots for previewing vehicles.
-- (Information) βΊ Use `AllowOnlyInPrivateGarages` to restrict showroom access.
-- ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Config.Showrooms = {
Config = {
Enable = true,
AllowOnlyInPrivateGarages = false,
},
car = {
EntranceCoords = vec4(1295.2756, 261.7921, -50.0573, 174.5392),
ParkingSlots = {
{
Coords = vec4(1281.2789, 240.9465, -49.4692, 243.5022),
},
{
Coords = vec4(1281.3644, 250.2220, -49.4689, 242.7067),
},
{
Coords = vec4(1280.8601, 258.3342, -49.4696, 239.6884),
},
{
Coords = vec4(1295.1112, 249.0047, -49.4691, 177.1261),
},
{
Coords = vec4(1295.1277, 241.2695, -49.4692, 180.6348),
},
{
Coords = vec4(1295.1410, 231.9178, -49.4692, 178.8318),
},
{
Coords = vec4(1309.6279, 230.9311, -49.4691, 52.8349),
},
{
Coords = vec4(1309.7224, 241.4225, -49.4700, 54.4629),
},
{
Coords = vec4(1309.9415, 249.3070, -49.4696, 62.1490),
},
{
Coords = vec4(1309.5300, 258.2726, -49.4688, 63.7715),
},
}
},
air = {
EntranceCoords = vec4(-1264.9331, -3044.3931, -49.4903, 4.1420),
ParkingSlots = {
{
Coords = vec4(-1276.7047, -2973.7190, -48.4897, 195.8378)
},
{
Coords = vec4(-1259.4069, -2973.9412, -48.4897, 145.3174)
},
{
Coords = vec4(-1256.5042, -2994.2913, -48.4899, 148.5025)
},
{
Coords = vec4(-1275.6095, -2997.0205, -48.4898, 199.9497)
},
{
Coords = vec4(-1280.2980, -3018.5117, -48.4901, 238.2952)
},
{
Coords = vec4(-1258.7426, -3021.3916, -48.4903, 138.1917)
},
}
},
-- You can add here sea type if you want as well!
}ServerConfig = {}
ServerConfig.SteamApiKey = "" -- For Administrator avatars.
ServerConfig.WebHook = "" -- Discord WebHook for admin commands logs.
ServerConfig.AutoMysql = true -- Disable/Enable mysql. True = enabled