⚙️Installation
Follow these steps to use kc_garage
🛠️ Step 1: Put in your resouces file
Download resouces
kc_garageExtract file and put
kc_garagein your resource files
🛠️ Step 2: Insert SQL Query
If you have already used
esx_garages, you can use the old database by replacingesx-database-add.sql.If you have already used
qb-garagesyou can use the old database by replacingqb-database-add.sql.If you want to create a new database you can replace
esx-database-new.sqlforesxorqb-database-new.sqlforqb-core. This method can delete all the vehicles the player owns.
🛠️ Step 3: Conifg.lua Configuration
You can edit the fields in
shared/config.luato the infrastructure you use.
Config = Config or {}
-- [[ FRAMEWORK ]] --
Config.Framework = 'esx' -- Framework
Config.FrameworkFolder = 'es_extended' -- Framework folder
Config.NewESX = true -- if you not use new esx set false
Config.NewQb = true -- if you not use new qb set false
Config.Locale = 'en' -- locale
Config.CheckForUpdates = true -- check if a new update
Config.Debug = false -- print debug
Config.Notify = 'lib' -- 'esx', 'qb', 'lib', 'custom' you can custom notify in mainAPI.lua line 20
Config.TextUI = 'lib' -- use 'esx' or 'lib' or 'qb'
Config.AccountType = 'money' -- account type for default qb = 'cash'
Config.RadialMenu = false -- you can use qb or lib radial menu or if not use radial menu set false
Config.OxTarget = GetResourceState("ox_target") ~= 'missing'
Config.UseAnim = true -- use animation if open garages menu
Config.AutoTpToVeh = false -- auto teleport player to vehicles if player spawn vehicle
Config.AutoLockVeh = false -- auto lock vehilce if vehilce has spawn
Config.AutoDelVeh = true -- auto delete vehicle
Config.DelVehTimer = 60 -- auto delete vehicle timer to send notif
Config.DelVehInSafeZone = true -- include auto delete vehicle in safe zone
Config.SaveVehiclesInterval = 5 -- auto save vehicles properties in seconds
Config.UseKMH = true -- set false if you not use KMH
Config.CmdDelVeh = 'asuransi' -- command for delete vehicles in word
Config.CmdLockVeh = 'kunci' -- command for lock vehicles
Config.LockKeyVehicle = 'U' -- keybind for lock vehicles
Config.CmdGiveKey = 'givekey' -- command for give keys
Config.DeleteVehiclesAt = { -- Automatic clock setting to delete or impound vehicles if there is no player inside. format 24h
-- { ['h'] = hh, ['m'] = mm },
{ ['h'] = 00, ['m'] = 00 },
{ ['h'] = 03, ['m'] = 00 },
{ ['h'] = 09, ['m'] = 00 },
{ ['h'] = 15, ['m'] = 00 },
}
Config.SafeZones = { -- If the vehicle is within the safe zone, it will not be deleted.
{ ['x'] = -44.155646565, ['y'] = -1100.155646565, ['z'] = 26.267009735108, ['radius'] = 50.0},
{ ['x'] = -1688.43811035156, ['y'] = -1073.62536621094, ['z'] = 13.1521873474121, ['radius'] = 200.0},
{ ['x'] = -2195.1352539063, ['y'] = 4288.7290039063, ['z'] = 49.173923492432, ['radius'] = 150.0},
}
Config.DefaultImpound = { -- default vehicles storage if vehicle out garages
['car'] = 'SandyShores',
['aircraft'] = 'SandyShoresAir'
}
Config.DefaultJobImpound = { -- storage of the default vehicle if the vehicle is confiscated by officers
['car'] = 'Samsat',
['aircraft'] = 'SandyShoresAir'
}
Config.GroupAdminList= { -- Admin list for to use Config.CmdVehDelete
'group.god',
'group.dev',
'group.moderator',
'group.headadmin',
'group.superadmin',
'group.admin',
}
Config.Peds = { -- Peds List
garage = 'CSB_TrafficWarden', -- Garages
impound = 's_m_y_construct_01', -- Impounds
policeImpound = 'IG_ProlSec_02' -- PoliceImpounds
}
Config.VehicleFee = { -- fees for removing vehicles in garages or impounds, if set to 0 the player does not pay
garage = { -- Garage Fee
[0] = 0, -- Compacts
[1] = 0, -- Sedans
[2] = 0, -- SUVs
[3] = 0, -- Coupes
[4] = 0, -- Muscle
[5] = 0, -- Sports Classics
[6] = 0, -- Sports
[7] = 0, -- Super
[8] = 0, -- Motorcycles
[9] = 0, -- Off-road
[10] = 0, -- Industrial
[11] = 0, -- Utility
[12] = 0, -- Vans
[13] = 0, -- Cylces
[14] = 0, -- Boats
[15] = 0, -- Helicopters
[16] = 0, -- Planes
[17] = 0, -- Service
[18] = 0, -- Emergency
[19] = 0, -- Military
[20] = 0, -- Commercial
[21] = 0 -- Train
},
impound = { -- Impound Fee
[0] = 15000, -- Compacts
[1] = 15000, -- Sedans
[2] = 15000, -- SUVs
[3] = 15000, -- Coupes
[4] = 15000, -- Muscle
[5] = 15000, -- Sports Classics
[6] = 15000, -- Sports
[7] = 15000, -- Super
[8] = 10000, -- Motorcycles
[9] = 15000, -- Off-road
[10] = 15000, -- Industrial
[11] = 15000, -- Utility
[12] = 15000, -- Vans
[13] = 0, -- Cylces
[14] = 50000, -- Boats
[15] = 50000, -- Helicopters
[16] = 50000, -- Planes
[17] = 15000, -- Service
[18] = 0, -- Emergency
[19] = 15000, -- Military
[20] = 15000, -- Commercial
[21] = 0 -- Train
}
}
Config.Blips = {
['Garages'] = { -- blips for garage
car = {
Sprite = 357,
Colour = 3,
Display = 2,
Scale = 0.8
},
aircraft = {
Sprite = 359,
Colour = 3,
Display = 2,
Scale = 0.8
},
boat = {
Sprite = 356,
Colour = 3,
Display = 2,
Scale = 0.8
}
},
['Impounds'] = { -- blips for impound
car = {
Sprite = 477,
Colour = 51,
Display = 2,
Scale = 0.7
},
aircraft = {
Sprite = 359,
Colour = 51,
Display = 2,
Scale = 0.8
},
boat = {
Sprite = 356,
Colour = 51,
Display = 2,
Scale = 0.8
}
}
}
-- [[ FRAMEWORK ]] --
Core = nil
pcall(function()
while Core == nil do
if Config.Framework == 'esx' then
if Config.NewESX then
Core = exports[Config.FrameworkFolder]:getSharedObject()
else
TriggerEvent('esx:getSharedObject', function(obj) Core = obj end)
end
elseif Config.Framework == 'qb' then
if Config.NewQb then
Core = exports[Config.FrameworkFolder]:GetCoreObject()
else
TriggerEvent('QBCore:GetObject', function(obj) Core = obj end)
end
end
Citizen.Wait(10)
end
end)
function GroupDigits(value)
local left, num, right = string.match(value, '^([^%d]*%d)(%d*)(.-)$')
return left .. (num:reverse():gsub('(%d%d%d)', '%1' .. ','):reverse()) .. right
end🛠️ Step 4: Garages.lua Configuration
You can add a garages anywhere. Open
shared/garages.luato add a new garage
Public Garage:
Private Garage:
Jobs Garage:
🛠️ Step 5: Impound.lua Configuration
You can add a impounds anywhere. Open
shared/impounds.luato add a new impound
🛠️ Step 6: Start the resouce
Go to
server.cfgand replaceensure kc_garage
Last updated