I welcome you CFX community!
Today I present to you the garage system! This system provides accessibility for all frameworks (ESX, QBCore, Standalone), huge editing capabilities using a configuration file, unique design. Iβm sure you and your players will love it!
This system includes a nice user interface, a convenient configuration file, the ability to configure the entire resource and clear functionality.
Demonstration of the system:
Example of a configuration file:
Configuration files
--/*
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βββββββ¦ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βββββββ¦ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
-- βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ*/
Config = {}
--If ESX = false and QBCore = false, then Standalone will turn on
--Are you using ESX?
Config.UseESX = true
--Enable this if ESX throws an error: Used the getSharedObject Event, this event no longer exists!
Config.UseESX_lib = false
--Are you using QBCore?
Config.UseQBCore = false
--Are you using Standalone?
Config.UseStandalone = false
--Your own export to get the player's job
Config.StandaloneJobCheckExport = nil
--Disappearing of the player in the vehicle during viewing
Config.disappearingDuringInteraction = false
--The ability to embed your own exports to hide the hud
Config.useHudOffOnEvents = true
function hudOnEvent()
DisplayRadar(true)
--exports.Burevestnik_hud:Burevestnik_hud_on() -- Uncomment if you use Burevestnik_HUD system (https://burevestnik.tebex.io/package/5371893)
end
function hudOffEvent()
DisplayRadar(false)
--exports.Burevestnik_hud:Burevestnik_hud_off() -- Uncomment if you use Burevestnik_HUD system (https://burevestnik.tebex.io/package/5371893)
end
--Calculation of the vehicle properties parameter
Config.MeasurementSpeed = 3.6 --MPH = 2.236936
--Global heading value for the vehicle
Config.globalHeading = 90.0
--Interaction Button
Config.GarageOpenButton = 38
--This parameter outputs the player's session number to the server console. Config.SeparateSession must be true !
Config.SeparateSessionDebug = false
--Do you want to send the player to a separate session at the time of opening the dealer and test drive ? (Disabling this parameter can lead to errors)
Config.SeparateSession = true
function giveKeysToPlayerPick(vehicle, plate, model)Β·Β·Β·
end
function notificationInteraction(str)
SetTextComponentFormat("STRING")
AddTextComponentString(str)
DisplayHelpTextFromStringLabel(0, 0, false, -1)
end
-- If true, the custom interaction menus are activated. Pay attention to the customInteractionButtonOpen and customInteractionButtonClose functions.
Config.UseCustomInteractionButton = false
Config.BurevestnikInteractionButton = "E"
Config.BurevestnikInteractionButtonText = "Press to interact"
-- The function of opening a custom interaction menu.
function customInteractionButtonOpen()
--exports.Burevestnik_interaction_button:bur_nui_InteractionButton_open(Config.BurevestnikInteractionButton, Config.BurevestnikInteractionButtonText) -- Uncomment if you use Burevestnik Interaction Button (https://forum.cfx.re/t/free-standalone-interaction-button/4860169)
end
-- The function of closing the custom interaction menu.
function customInteractionButtonClose()
--exports.Burevestnik_interaction_button:bur_nui_InteractionButton_close() -- Uncomment if you use Burevestnik Interaction Button (https://forum.cfx.re/t/free-standalone-interaction-button/4860169)
end
function getVehicleProperties(vehiclePed) --returns a vehicle with information about it in the form of a json array
if Config.UseESX thenΒ·Β·Β·
end
if Config.UseQBCore thenΒ·Β·Β·
end
if Config.UseStandalone thenΒ·Β·Β·
end
end
getVehicle = function(plate) --Set up your framework here.
if Config.UseESX thenΒ·Β·Β·
end
if Config.UseQBCore thenΒ·Β·Β·
end
if Config.UseStandalone thenΒ·Β·Β·
end
end
storeVehicle = function(selectVehicleModel, plate, garageUniqueID, parkVehicle) --Saves vehicle data during parking
if Config.UseESX thenΒ·Β·Β·
end
if Config.UseQBCore thenΒ·Β·Β·
end
if Config.UseStandalone thenΒ·Β·Β·
end
end
deleteVehicle = function(plate) --Delete a vehicle from the database
if Config.UseESX thenΒ·Β·Β·
end
if Config.UseQBCore thenΒ·Β·Β·
end
if Config.UseStandalone thenΒ·Β·Β·
end
end
retrieveData = function(currentGarageID) --Retrieves the necessary information from the database
if Config.UseESX thenΒ·Β·Β·
end
if Config.UseQB thenΒ·Β·Β·
end
if Config.UseStandalone thenΒ·Β·Β·
end
end
onResourceStop = function() --This function returns all vehicles to the garage from which the vehicle.Β·Β·Β·
end
Config.Garage = {
{
garageUniqueID = "Garage1", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(460.7636, -1162.3346, 29.2918), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage2", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(459.9036, -1155.2394, 29.2918), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage3", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(272.5008, -337.4057, 44.9198), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage4", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(-1810.7857, -337.1359, 43.5520), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage5", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(1886.67, 3716.10, 32.82), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage6", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(-76.74, 6346.73, 31.07), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage7", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(850.4742, -1054.4, 28.0727), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage8", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(1109.02, 47.09, 80.76), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage9", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(1022.06, -763.88, 57.95), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage10", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(53.47192, -883.3654, 30.29851), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage11", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(-71.00, 900.06, 235.59), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "Garage12", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 2.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 28, --Blip color.
blipText = "Garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(-3163.21, 1130.80, 20.99), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{Β·Β·Β·
},
{Β·Β·Β·
},
{Β·Β·Β·
},
{Β·Β·Β·
},
{Β·Β·Β·
},
{Β·Β·Β·
},
{Β·Β·Β·
},
{Β·Β·Β·
},
{
garageUniqueID = "GarageBoat1", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 5.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 12, --Blip color.
blipText = "Boat garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(-721.32, -1348.54, 0.97), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
{
garageUniqueID = "GarageAircraft1", --The unique name of the garage, which in no case should be repeated.
garageName = "burevestnik.tebex.io | Garage system", --Garage name.
interactionDistance = 5.0, --Distance for interaction with the garage.
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 357, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 34, --Blip color.
blipText = "Aircraft garage", --Blip text.
UseMarkers = false, --Do you want to use a marker ?
MarkerType = 1, --Marker type
MarkerSizeX = 0.5, --Marker size X
MarkerSizeY = 0.5, --Marker size Y
MarkerSizeZ = 0.5, --Marker size Z
MarkerColourR = 122, --Marker colour R
MarkerColourG = 195, --Marker colour G
MarkerColourB = 254, --Marker colour B
MarkerColourA = 20, --Marker colour A
allowedJobsInteraction = {"all"}, --Jobs that can interact with the garage. If "all", then everyone can interact with the garage.
location = vector3(-1275.56, -3388.01, 14.24), --Garage location
vehicles = {}, --List of vehicles from database. Leave this array empty!
},
}
--Translation config
Config.Translation = {
['menu'] = 'Press ~INPUT_CONTEXT~ to ~g~interact',
['menu2'] = 'Press ~INPUT_CONTEXT~ to ~g~park the vehicle',
['access'] = '~g~You have successfully taken your vehicle!',
['parked'] = '~g~You have successfully parked your vehicle!',
['noaccess'] = '~r~This is not your vehicle!',
['translationText1'] = 'ESC',
['translationText2'] = 'Exit showroom',
['translationText3'] = '',
['translationText4'] = 'Delete a vehicle',
['translationText5'] = 'Get a vehicle',
['translationText6'] = "Garage showroom",
['translationText7'] = 'Extra color',
['translationText8'] = 'Primary colour',
['translationText9'] = 'BACKSPACE',
['translationText10'] = 'Go back',
['translationText11'] = 'Remove your vehicle?',
['translationText12'] = 'Yes',
['translationText13'] = 'No',
['translationText14'] = 'Error returning the vehicles to the garage!',
['translationText15'] = 'We are preparing your vehicle for delivery.',
['translationText16'] = 'RMB',
['translationText17'] = 'Hold key to look around',
['translationText18'] = 'Speed',
['translationText19'] = 'Acceleration',
['translationText20'] = 'Control',
['translationText21'] = 'Brakes',
['translationText22'] = 'Capacity',
['translationText23'] = 'The vehicles was successfully returned to the garage!',
['translationText24'] = 'BEFORE BUCKET SET: ',
['translationText25'] = 'AFTER BUCKET SET: ',
['translationText26'] = 'BEFORE BUCKET RETURN: ',
['translationText27'] = 'AFTER BUCKET RETURN: ',
}
Optimization (The script consumes):
0.01 ms in a quiet state.
0.03 ms in an active state.
What does this system include:
- This system works on all versions of ESX, QBCore, as well as STANDALONE!
- Beautiful user interface!
- The ability to enable blips on the map!
- The ability to enable markers!
- Incredibly customizable configuration file!
- Garages display the custom names!
- The ability to set garage names!
- Preservation of the state of the main components of the vehicle
- More than 20 pre-installed garages all over the map!
- Support for our free Interaction Button resource!
- Support of our Vehicle shop system!
- The possibility of endless garage settings!
- Each garage is unique (This means if you park the vehicle in garage A, you will not be able to pick up the vehicle from garage B)!
- The vehicle goes to the last known garage after the restart!
- The ability to use the garage only for certain jobs!
- You can completely change the user interface at will!
- The ability to customize database queries for your own systems!
- Of course support, Iβm ready to help you!
TOP SALES
You may also be interested in my other resources:
Code accessible | Open source: Yes \ Escrow: No - Available only: config, ui |
Subscription based | No |
Lines (approximately) | ~2000 |
Requirements | Standalone/ESX/QBCore |
Support | Yes |