Configuration
This section includes all configurable files for the selected script. Most settings are configured automatically, but each config.lua file contains a header comment explaining the purpose and usage of every configuration type. Be sure to read the header of each file carefully to fully understand how to customize and adapt the system for QBCORE, ESX, or standalone environments, ensuring seamless integration with your server.
qs-mechanic-creator/shared/config.lua
function checkDependencies(resourceTable)
for resourceName, frameworkId in pairs(resourceTable) do
local state = GetResourceState(resourceName)
if state:find('started') ~= nil then
if Config.Debug then
print('^2[DEBUG]^0: ' .. resourceName .. ' is started')
end
return frameworkId
end
end
return false
end
local frameworks = {
['es_extended'] = 'esx',
['qb-core'] = 'qbcore',
['qbx_core'] = 'qbox'
}
local vehicleShops = {
['qs-vehicleshop'] = 'qs-vehicleshop',
['esx_vehicleshop'] = 'esx_vehicleshop',
['qb-vehicleshop'] = 'qb-vehicleshop',
['qbx_vehicleshop'] = 'qbx_vehicleshop'
}
local interacts = {
['qs-textui'] = 'qs-textui',
['ox_target'] = 'ox_target',
['qb-target'] = 'qb-target'
}
local societySystems = {
['esx_society'] = 'esx_addonaccount',
['esx_addonaccount'] = 'esx_addonaccount',
['qb-core'] = 'qb-core',
['qb-management'] = 'qb-management',
['qb-banking'] = 'qb-banking',
['qs-banking'] = 'qs-banking',
['okokBanking'] = 'okokbanking',
['Renewed-Banking'] = 'Renewed-Banking',
['qbx_management'] = 'qbx_management'
}
local skillChecks = {
['ox_lib'] = 'ox_lib'
}
Config = {}
-- Enable debug mode for development (shows additional console logs)
Config.Debug = false
-- Automatically detect and set the framework being used
Config.Framework = checkDependencies(frameworks) or 'standalone'
-- Automatically detect and set the vehicle shop system being used
Config.VehicleDatabase = checkDependencies(vehicleShops) or 'standalone'
-- Automatically detect and set the interaction system (target/textui)
Config.Interact = checkDependencies(interacts) or 'standalone'
--[[
SOCIETY SYSTEM CONFIGURATION
Supported Systems:
• ESX: esx_addonaccount, qs-banking, Renewed-Banking
• QB-Core: qb-core, qb-management, qb-banking, qs-banking, okokbanking, Renewed-Banking
• Qbox: Renewed-Banking (recommended), qs-banking
⚠️ IMPORTANT FOR QBOX USERS:
Do NOT use 'qbx_management' as your society system!
qbx_management only handles employee management, NOT money storage.
Use 'Renewed-Banking' or 'qs-banking' instead.
Config.SocietyFeePercentage:
Percentage of each transaction going to society (only for job-restricted shops)
Examples: 0.1 = 10% society / 90% employee, 1.0 = 100% society / 0% employee
]]
-- Enable society system integration
Config.UseSociety = true
-- Automatically detect and set the society system being used
Config.SocietySystem = checkDependencies(societySystems) or 'standalone'
-- Society fee percentage for job-restricted mechanics (0.1 = 10%)
Config.SocietyFeePercentage = 0.1
-- Automatically detect and set the skillcheck system being used
Config.SkillCheck = checkDependencies(skillChecks) or 'standalone'
Locales = Locales or {}
--[[
Choose your preferred language!
In this section, you can select the main language for your asset. We have a wide
selection of default languages available, located in the locales/* folder.
If your language is not listed, don't worry! You can easily create a new one
by adding a new file in the locales folder and customizing it to your needs.
🌐 Available languages:
'de' -- German
'en' -- English
'es' -- Spanish
'fr' -- French
'hi' -- Hindi
'it' -- Italian
'ja' -- Japanese
'nl' -- Dutch
'pt' -- Portuguese
'zh-CN' -- Chinese (Simplified)
'zh-TW' -- Chinese (Traditional)
After selecting your preferred language, be sure to save your changes and test
the asset to ensure everything works as expected!
]]
-- Select your preferred language (see available languages in comment block above)
Config.Language = 'en'
-- Vehicles with rear-mounted engines (affects carlift animations and engine positioning)
-- These vehicles require special handling when lifting or accessing the engine
Config.BackEngines = {
[GetHashKey('ninef')] = true,
[GetHashKey('adder')] = true,
[GetHashKey('vagner')] = true,
[GetHashKey('t20')] = true,
[GetHashKey('infernus')] = true,
[GetHashKey('zentorno')] = true,
[GetHashKey('reaper')] = true,
[GetHashKey('comet2')] = true,
[GetHashKey('jester')] = true,
[GetHashKey('jester2')] = true,
[GetHashKey('cheetah')] = true,
[GetHashKey('cheetah2')] = true,
[GetHashKey('prototipo')] = true,
[GetHashKey('turismor')] = true,
[GetHashKey('pfister811')] = true,
[GetHashKey('ardent')] = true,
[GetHashKey('nero')] = true,
[GetHashKey('nero2')] = true,
[GetHashKey('tempesta')] = true,
[GetHashKey('vacca')] = true,
[GetHashKey('bullet')] = true,
[GetHashKey('osiris')] = true,
[GetHashKey('entityxf')] = true,
[GetHashKey('turismo2')] = true,
[GetHashKey('fmj')] = true,
[GetHashKey('re7b')] = true,
[GetHashKey('tyrus')] = true,
[GetHashKey('italigtb')] = true,
[GetHashKey('penetrator')] = true,
[GetHashKey('monroe')] = true,
[GetHashKey('ninef2')] = true,
[GetHashKey('stingergt')] = true,
[GetHashKey('surfer')] = true,
[GetHashKey('surfer2')] = true,
[GetHashKey('comet3')] = true
}
-- Position of notification text on screen
-- Options: "top-center", "top-right", "top-left", "bottom-center", "bottom-right", "bottom-left"
Config.TextPosition = "top-center"
-- Keybind for opening the radial menu (mechanic quick actions)
Config.RadialKey = "F5"
--[[
MODIFICATION PRICING SYSTEM
===========================
Prices are calculated as a percentage of the vehicle's base value.
Example: If a vehicle costs $100,000 and engine upgrade level 1 is 0.05 (5%),
the upgrade will cost $5,000.
Categories:
- tuning: Performance upgrades (engine, brakes, transmission, etc.)
- cosmetic: Visual modifications (body kits, paint, wheels, etc.)
- repair: Repair services
]]
Config.ModificationPricing = {
-- PERFORMANCE UPGRADES (tuning)
-- Each array represents upgrade levels, values are % of vehicle price
tuning = {
[11] = {0.05, 0.10, 0.15, 0.25}, -- Engine: Level -1 (5%), 0 (10%), 1 (15%), 2 (25%)
[12] = {0.03, 0.06, 0.09, 0.12}, -- Brakes: Level -1 (3%), 0 (6%), 1 (9%), 2 (12%)
[13] = {0.04, 0.08, 0.12}, -- Transmission: Level -1 (4%), 0 (8%), 1 (12%)
[15] = {0.035, 0.07, 0.105, 0.14, 0.175}, -- Suspension: 5 levels
[16] = {0.025, 0.05, 0.075, 0.10, 0.125, 0.15}, -- Armor: 6 levels
[18] = 0.20 -- Turbo: Single upgrade (20%)
},
-- COSMETIC MODIFICATIONS (cosmetic)
-- Single value = fixed percentage, regardless of variant
cosmetic = {
-- BODY PARTS
[0] = 0.015, -- Spoiler (1.5%)
[1] = 0.02, -- Front Bumper (2%)
[2] = 0.02, -- Rear Bumper (2%)
[3] = 0.01, -- Side Skirt (1%)
[4] = 0.015, -- Exhaust (1.5%)
[5] = 0.01, -- Roll Cage (1%)
[6] = 0.015, -- Grille (1.5%)
[7] = 0.015, -- Hood (1.5%)
[8] = 0.01, -- Fender (1%)
[9] = 0.01, -- Right Fender (1%)
[10] = 0.01, -- Roof (1%)
[14] = 0.01, -- Horn (1%)
[17] = 0.015, -- Grille (1.5%)
[19] = 0.015, -- Dashboard (1.5%)
[20] = 0.01, -- Tyre Smoke Toggle (1%)
[21] = 0.02, -- Seats (2%)
[25] = 0.01, -- Plate Holder (1%)
[26] = 0.01, -- Vanity Plates (1%)
[27] = 0.01, -- Trim Design (1%)
[28] = 0.01, -- Ornaments (1%)
[29] = 0.01, -- Dash (1%)
[30] = 0.01, -- Dial (1%)
[31] = 0.01, -- Door Speaker (1%)
[32] = 0.01, -- Seats (1%)
[33] = 0.015, -- Steering Wheel (1.5%)
[34] = 0.01, -- Shifter Leavers (1%)
[35] = 0.01, -- Plaques (1%)
[36] = 0.01, -- Speakers (1%)
[37] = 0.01, -- Trunk (1%)
[38] = 0.01, -- Hydraulics (1%)
[39] = 0.01, -- Engine Block (1%)
[40] = 0.01, -- Air Filter (1%)
[41] = 0.01, -- Struts (1%)
[42] = 0.01, -- Arch Cover (1%)
[43] = 0.01, -- Aerials (1%)
[44] = 0.01, -- Trim (1%)
[45] = 0.01, -- Tank (1%)
[46] = 0.01, -- Windows (1%)
-- LIGHTS & WHEELS
[22] = 0.03, -- Xenon Headlights (3%)
[23] = 0.015, -- Front Wheels (1.5%)
[24] = 0.015, -- Back Wheels (1.5%)
-- PAINT & VISUAL
[48] = 0.02, -- Livery (2%)
['windowTint'] = 0.02, -- Window Tint (2%)
['plateIndex'] = 0.005, -- License Plate Style (0.5%)
['wheelType'] = 0.015, -- Wheel Type/Category (1.5%)
['xenonColor'] = 0.01, -- Xenon Light Color (1%)
['neonLights'] = 0.05, -- Neon Underglow Lights (5%)
['neonColor'] = 0.01, -- Neon Light Color (1%)
['tyreSmokeColor'] = 0.015, -- Tire Smoke Color (1.5%)
['tyreSmokeEnabled'] = 0.01, -- Tire Smoke Enabled (1%)
['pearlescentColor'] = 0.01, -- Pearlescent Paint (1%)
['wheelColor'] = 0.01, -- Wheel Color (1%)
['interiorColor'] = 0.015, -- Interior Color (1.5%)
['dashboardColor'] = 0.015, -- Dashboard Color (1.5%)
['primaryColor'] = 0.02, -- Primary Paint Color (2%)
['secondaryColor'] = 0.02, -- Secondary Paint Color (2%)
['customTires'] = 0.02 -- Custom Tires (2%)
},
-- REPAIR SERVICES (repair)
-- Used by radial menu repair functions
repair = {
['fullRepair'] = 0.10, -- Complete vehicle repair (10%)
['engineRepair'] = 0.05, -- Engine only repair (5%)
['bodyRepair'] = 0.03, -- Body/cosmetic repair (3%)
['tireRepair'] = 0.01 -- Tire repair (1%)
}
}
-- Default price used when a vehicle's price cannot be determined
-- This ensures modifications always have a calculable cost
Config.DefaultVehiclePrice = 50000