I welcome you CFX community!
Today I present to you the vehicle shop 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. The resource includes 3 pre-installed stores.
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
Config.MeasurementSpeed = 3.6 --MPH = 2.236936
--Global heading value for the vehicle
Config.globalHeading = 90.0
--Interaction Button
Config.VehicleshopOpenButton = 38
function giveKeysToPlayerBuy(vehicle, plate, model)
--print(vehicle, plate, model)
--exports.Burevestnik_fuelsystem:Burevestnik_fuelsystem_setFuel(100.0) -- Uncomment if you use Burevestnik_fuelsystem system (https://burevestnik.tebex.io/package/5371893)
--QBCore
-- TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', QBCore.Functions.GetPlate(vehicle))
-- TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(vehicle))
end
Config.testDriveTime = 10 -- Specify the time in seconds
function giveKeysToPlayerTestDrive(vehicle, plate, model)
--print(vehicle, plate, model)
--exports.Burevestnik_fuelsystem:Burevestnik_fuelsystem_setFuel(100.0) -- Uncomment if you use Burevestnik_fuelsystem system (https://burevestnik.tebex.io/package/5371893)
--QBCore
-- TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', QBCore.Functions.GetPlate(vehicle))
-- TriggerEvent("vehiclekeys:client:SetOwner", QBCore.Functions.GetPlate(vehicle))
end
function notificationInteraction(str)
SetTextComponentFormat("STRING")
AddTextComponentString(str)
DisplayHelpTextFromStringLabel(0, 0, false, -1)
end
Config.VehicleshopColors = {
{ color = "#0d1116", id = {13, 17, 22} },
{ color = "#999da0", id = {153, 157, 160} },
{ color = "#979a97", id = {151, 154, 151} },
{ color = "#3c3f47", id = {60, 63, 71} },
{ color = "#13181f", id = {19, 24, 31} },
{ color = "#515554", id = {81, 85, 84} },
{ color = "#c00e1a", id = {192, 14, 26} },
{ color = "#a51e23", id = {165, 30, 35} },
{ color = "#8e1b1f", id = {142, 27, 31} },
{ color = "#49111d", id = {73, 17, 29} },
{ color = "#d44a17", id = {212, 74, 23} },
{ color = "#f78616", id = {247, 134, 22} },
{ color = "#66b81f", id = {102, 184, 31} },
{ color = "#0b9cf1", id = {11, 156, 241} },
{ color = "#2446a8", id = {36, 70, 168} },
}
Config.Vehicleshop = {
{
vehicleshopName = "burevestnik.tebex.io | Vehicle shop", --Vehicleshop name
interactionDistance = 2.0, --Distance for interaction with the store
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 227, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 3, --Blip color.
blipText = "Vehicle shop", --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 store. If "all", then everyone can interact with the store.
locations = { --Vehicleshop locations
vector3(137.3353, -1075.0808, 28.1924),
vector3(889.8396, 3653.6765, 32.8269),
vector3(-191.7824, 6220.3521, 31.4890),
},
vehicles = { --List of vehicles: https://docs.fivem.net/docs/game-references/vehicle-models/
{ name = "Gresley", price = 1000, model = "gresley",},
{ name = "Feltzer", price = 900, model = "feltzer2",},
{ name = "Monroe", price = 150000, model = "monroe",},
{ name = "Furore GT", price = 15000, model = "furoregt" },
{ name = 'Dominator7', price = 150000, model = 'dominator7' },
{ name = 'Everon', price = 150000, model = 'everon' },
{ name = 'Cypher', price = 150000, model = 'cypher' },
{ name = 'Zr350', price = 150000, model = 'zr350' },
{ name = 'Calico', price = 150000, model = 'calico' },
{ name = 'Futo2', price = 150000, model = 'futo2' },
{ name = 'Euros', price = 150000, model = 'euros' },
{ name = 'Jester4', price = 150000, model = 'jester4' },
{ name = 'Remus', price = 150000, model = 'remus' },
{ name = 'Vectre', price = 150000, model = 'vectre' },
{ name = 'Sultan3', price = 150000, model = 'sultan3' },
{ name = 'Sultanrs', price = 150000, model = 'sultanrs' },
{ name = 'Radi', price = 150000, model = 'radi' },
{ name = 'Fq2', price = 150000, model = 'fq2' },
{ name = 'Seminole2', price = 150000, model = 'seminole2' },
{ name = 'Seminole', price = 150000, model = 'seminole' },
{ name = 'Stratum', price = 150000, model = 'stratum' },
{ name = 'Asea', price = 150000, model = 'asea' },
{ name = 'Intruder', price = 150000, model = 'intruder' },
{ name = 'Stanier', price = 150000, model = 'stanier' },
{ name = 'Surge', price = 150000, model = 'surge' },
{ name = 'Blista2', price = 150000, model = 'blista2' },
{ name = 'Futo', price = 150000, model = 'futo' },
{ name = 'Asterope', price = 150000, model = 'asterope' },
{ name = 'Ingot', price = 150000, model = 'ingot' },
{ name = 'Premier', price = 150000, model = 'premier' },
{ name = 'Primo', price = 150000, model = 'primo' },
{ name = 'Regina', price = 150000, model = 'regina' },
{ name = 'Washington', price = 150000, model = 'washington' },
{ name = 'Blista', price = 150000, model = 'blista' },
{ name = 'Brioso', price = 150000, model = 'brioso' },
{ name = 'Issi2', price = 150000, model = 'issi2' },
},
},
{
vehicleshopName = "burevestnik.tebex.io | Boat shop", --Vehicleshop name
interactionDistance = 2.0, --Distance for interaction with the store
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 427, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 3, --Blip color.
blipText = "Boat shop", --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 store. If "all", then everyone can interact with the store.
locations = { --Vehicleshop locations
vector3(-789.9935, -1499.9413, -0.4748),
vector3(1445.7771, 3817.4451, 29.6101),
},
vehicles = { --List of vehicles: https://docs.fivem.net/docs/game-references/vehicle-models/
{ name = "Dinghy", price = 1000, model = "dinghy",},
{ name = "Tropic", price = 900, model = "tropic",},
{ name = "Squalo", price = 150000, model = "squalo",},
{ name = "Jetmax", price = 15000, model = "jetmax" },
{ name = 'Seashark', price = 150000, model = 'seashark' },
{ name = 'Seashark2', price = 150000, model = 'seashark2' },
},
},
{
vehicleshopName = "burevestnik.tebex.io | Airplane shop", --Vehicleshop name
interactionDistance = 2.0, --Distance for interaction with the store
useBlip = true, --The ability to use blip on the map for this ped.
blipID = 16, --Blip ID.
blipScale = 0.7, --Blip scale.
blipColor = 3, --Blip color.
blipText = "Airplane shop", --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 store. If "all", then everyone can interact with the store.
locations = { --Vehicleshop locations
vector3(-987.6931, -2991.4583, 13.9451),
vector3(1746.5015, 3242.6064, 41.7251),
},
vehicles = { --List of vehicles: https://docs.fivem.net/docs/game-references/vehicle-models/
{ name = "Maverick", price = 1000, model = "maverick",},
{ name = "Cargobob", price = 900, model = "cargobob",},
{ name = "Shamal", price = 150000, model = "shamal",},
{ name = "Mammatus", price = 15000, model = "mammatus" },
{ name = 'Cuban 800', price = 150000, model = 'cuban800' },
{ name = 'Titan', price = 150000, model = 'titan' },
},
},
}
--Translation config
Config.Translation = {
['menu'] = 'Press ~INPUT_CONTEXT~ to ~g~interact',
['buy1'] = 'You bought: ~g~',
['buy2'] = ' ~w~- ~g~$',
['nomoney'] = '~r~You do not have enough Money!',
['noaccess'] = '~r~Bro, get out of here!',
['translationText1'] = 'ESC',
['translationText2'] = 'Exit showroom',
['translationText3'] = '$ ',
['translationText4'] = 'Test drive',
['translationText5'] = 'Buy',
['translationText6'] = "Dealer's showroom",
['translationText7'] = 'Extra color',
['translationText8'] = 'Primary colour',
['translationText9'] = 'BACKSPACE',
['translationText10'] = 'Go back',
['translationText11'] = 'Choose a payment method:',
['translationText12'] = 'Card',
['translationText13'] = 'Cash',
['translationText14'] = 'Congratulations on your purchase',
['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'] = '~b~The test drive will end in: ~w~',
}
--Exports
--exports.Burevestnik_vehicleshop:bur_open_vehicleshop_by_id(1) --where the number is the store id
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!
- Stores display the custom names!
- The ability of a test drive!
- Various payment methods!
- The ability to set store names!
- Support of our Dialogue system!
- The possibility of endless store settings!
- The ability to use the store only for certain jobs!
- You can completely change the user interface at will!
- Exports are available!
- 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) | ~1800 |
Requirements | Standalone/ESX/QBCore |
Support | Yes |