Page cover

⚙️Configuration

This is the configuration that you can give to this script to modify it to your liking

Config File

Config = {}
-- Developer Settings
Config.Debug = false

-- Translations Settings
Config.Locale = 'en' -- Set language ['es', 'en', 'fr', 'pt']

-- Framework Settings
Config.Framework = 'QBCore' -- Only support 'ESX' or 'QBCore'
Config.FrameworkName = 'qb-core' -- Put your core resource name folder | QBCore = 'qb-core' or ESX = 'es_extended'


-- Vehicles Settings
Config.FormatInSpeedStats = 'KM/H' --- If you disable this they will only work in miles per second.
Config.MaxSpeedKMH = true --- If you disable this they will only work in miles per second.
Config.MaxSpeedBarLength = 500 --- This will show the maximum value in the vehicle's speed statistics bar, do not touch if you do not know how to do this.

Config.ForceRotation = 3.0 --- This is the rotational force of the vehicle with the mouse wheel. 

Config.CustomTestPlate = 'TEST'
Config.TestTimer = 60 --- Set in seconds
Config.StartVehicleColor = { r = 255, g = 255, b = 255}
Config.DefaultRoutingBucket = 0 -- If you don't know what it is, don't touch it

Config.EnabledSocietyPay = true -- Speak to the function of adding money when buying a vehicle to the society.
Config.SocietyJob = 'cardealer' -- Add money to the partnership when purchasing a vehicle.
Config.NewManagementSystem = false

-- Currencies
Config.VIPCurrency = 'coins'
Config.SellCurrency = 'bank'

-- Stock System
Config.EnableStock = true
Config.MaxStatsStock = 100

-- Camera Settings
Config.FovCamera = 100.0

-- Shops Settings
Config.Shops = {
    ['pdm_main_1'] = {
        label = 'Vehicles - PDM',
        description = '¡Bienvenidos a nuestra distinguida concesionaria! <br><br>En este espacio, nos esforzamos por ofrecer una experiencia única y satisfactoria para cada uno de nuestros valiosos clientes. En nuestra amplia selección de vehículos, encontrarán la combinación perfecta de calidad, estilo y rendimiento que están buscando.',
        img = 'https://i.ibb.co/qxYKPLk/1361.jpg', -- Upload images here (https://es.imgbb.com/)
        marker = {
            type = 36,
            distance = 10.0,
            color = {r = 0, g = 200, b = 0, a = 255},
            scale = vector3(0.4, 0.4, 0.4),
            location = vector3(-56.3652, -1096.4497, 26.4223),
        },
        blip = {
            label = 'Vehicles Shop',
            sprite = 225,
            color = 0,
            scale = 0.8,
        },
        camera = {
            car_position = vector4(-43.1993, -1094.2572, 26.4224, 216.3854),
            camera_position = vector4(-44.1339, -1097.0167, 26.4224, 340.0392),
        },
        vehicle = {
            delivered = vector4(-50.2018, -1076.9784, 26.8831, 66.8324),
            test = vector4(-50.2018, -1076.9784, 26.8831, 66.8324),
        },
        sell = {
            enabled = true,
            marker = {
                type = 29,
                distance = 10.0,
                color = {r = 0, g = 200, b = 0, a = 255},
                scale = vector3(0.9, 0.9, 0.9),
            },
            position = vector3(-46.4420, -1082.7926, 26.7629),
            porcentage = 50
        }
    },
    ['boat_main_1'] = {
        label = 'Boats - Shop',
        description = '¡Bienvenidos a nuestra distinguida concesionaria de Botes! <br><br>En este espacio, nos esforzamos por ofrecer una experiencia única y satisfactoria para cada uno de nuestros valiosos clientes. En nuestra amplia selección de vehículos, encontrarán la combinación perfecta de calidad, estilo y rendimiento que están buscando.',
        img = 'https://i.ibb.co/pLc0sJF/boatshop.png', -- Upload images here (https://es.imgbb.com/)
        marker = {
            type = 35,
            distance = 10.0,
            color = {r = 0, g = 200, b = 0, a = 255},
            scale = vector3(0.4, 0.4, 0.4),
            location = vector3(-940.5393, -1480.2214, 1.5954),
        },
        blip = {
            label = 'Boats Shop',
            sprite = 427,
            color = 0,
            scale = 0.8,
        },
        camera = {
            car_position = vector4(-947.2571, -1464.6824, -0.5080, 291.3913),
            camera_position = vector4(-945.6191, -1469.3267, 2.4169, 23.8710),
        },
        vehicle = {
            delivered = vector4(-927.3200, -1478.9087, 0.3802, 16.8988),
            test = vector4(-888.2534, -1442.1700, 0.4207, 283.7739),
        },
        sell = {
            enabled = true,
            marker = {
                type = 29,
                distance = 10.0,
                color = {r = 0, g = 200, b = 0, a = 255},
                scale = vector3(0.9, 0.9, 0.9),
            },
            position = vector3(-919.0627, -1475.3794, 0.4415),
            porcentage = 50
        }
    },
    ['plane_main_1'] = {
        label = 'Plane - Shop',
        description = '¡Bienvenidos a nuestra distinguida concesionaria de Aviones! <br><br>En este espacio, nos esforzamos por ofrecer una experiencia única y satisfactoria para cada uno de nuestros valiosos clientes. En nuestra amplia selección de vehículos, encontrarán la combinación perfecta de calidad, estilo y rendimiento que están buscando.',
        img = 'https://i.ibb.co/PFQThzC/planeshop.png', -- Upload images here (https://es.imgbb.com/)
        marker = {
            type = 33,
            distance = 20.0,
            color = {r = 0, g = 200, b = 0, a = 255},
            scale = vector3(0.4, 0.4, 0.4),
            location = vector3(-959.8340, -2974.1289, 13.9451),
        },
        blip = {
            label = 'Planes Shop',
            sprite = 423,
            color = 0,
            scale = 0.8,
        },
        camera = {
            car_position = vector4(-983.0347, -3014.9414, 13.9451, 56.1849),
            camera_position = vector4(-980.9340, -3009.9883, 13.9451, 159.6980),
        },
        vehicle = {
            delivered = vector4(-967.1033, -3003.3198, 13.9451, 57.5427),
            test = vector4(-1033.7959, -3123.5962, 13.9675, 59.8178),
        },
        sell = {
            enabled = true,
            marker = {
                type = 29,
                distance = 10.0,
                color = {r = 0, g = 200, b = 0, a = 255},
                scale = vector3(0.9, 0.9, 0.9),
            },
            position = vector3(-961.3760, -2964.7075, 13.9451),
            porcentage = 50
        }
    },
    ['heli_main_1'] = {
        label = 'Helicopter',
        description = '¡Bienvenidos a nuestra distinguida concesionaria de Helipuerto! <br><br>En este espacio, nos esforzamos por ofrecer una experiencia única y satisfactoria para cada uno de nuestros valiosos clientes. En nuestra amplia selección de vehículos, encontrarán la combinación perfecta de calidad, estilo y rendimiento que están buscando.',
        img = 'https://i.ibb.co/Jymb859/halishop.png', -- Upload images here (https://es.imgbb.com/)
        marker = {
            type = 34,
            distance = 20.0,
            color = {r = 0, g = 200, b = 0, a = 255},
            scale = vector3(0.4, 0.4, 0.4),
            location = vector3(-1097.1121, -2878.5420, 13.9471),
        },
        blip = {
            label = 'Heliport Shop',
            sprite = 481,
            color = 0,
            scale = 0.8,
        },
        camera = {
            car_position = vector4(-1112.4716, -2883.6052, 13.9460, 146.0821),
            camera_position = vector4(-1107.4045, -2887.2820, 14.9460, 55.1331),
        },
        vehicle = {
            delivered = vector4(-1145.9761, -2864.3367, 13.9460, 147.5178),
            test = vector4(-1178.3162, -2845.5588, 13.9458, 148.2041),
        },
        sell = {
            enabled = true,
            marker = {
                type = 29,
                distance = 10.0,
                color = {r = 0, g = 200, b = 0, a = 255},
                scale = vector3(0.9, 0.9, 0.9),
            },
            position = vector3(-1188.4912, -2863.6943, 13.9456),
            porcentage = 50
        }
    },

   
}


Notify = function (msg, type)  -- Send Notification System
    TriggerEvent('QBCore:Notify', msg, type)
    -- TriggerEvent('esx:showNotification', msg)
end 

Config.CustomPauseMenu = false -- If you use a custom pause menu you can add here the function to close it automatically so that there are no bugs.

ClosePauseMenu = function ()  -- If you have the Config.CustomPauseMenu set to false ignore this
    exports['custom_pausemenu']:ClosePauseMenu()
end -- [
    -- Modify your pause menu to be able to close it,
    -- if you don't know how to do it you can open a
    -- support ticket and we will help you.
    -- ]


-- Key System

Config.Vehiclekey = false
Config.VehicleSystem = 'cd_garage'


KeyVehicle = function(vehicle)
    if Config.Vehiclekey then
        if Config.VehicleSystem == 'cd_garage' then
            TriggerEvent('cd_garage:AddKeys', exports['cd_garage']:GetPlate(vehicle))
        elseif Config.VehicleSystem == 'qs-vehiclekeys' then
            exports['qs-vehiclekeys']:GiveKeys(plate)
        elseif Config.VehicleSystem == 'wasabi-carlock' then
            exports.wasabi_carlock:GiveKey(plate)
        elseif Config.VehicleSystem == 'qb-vehiclekeys' then
            TriggerServerEvent('qb-vehiclekeys:server:AcquireVehicleKeys', plate)
            
        end
    end
end


-- Fuel System

Config.EnableFuel = true
Config.FuelSystem = 'LegacyFuel'

FuelVehicle = function(vehicle)
    if Config.EnableFuel then
        if Config.FuelSystem == 'LegacyFuel' then
            return exports["LegacyFuel"]:SetFuel(vehicle, 100)
        elseif Config.FuelSystem == 'x-fuel' then
            return exports["x-fuel"]:SetFuel(vehicle, 100)
        elseif Config.FuelSystem == 'x-fuel' then
            return exports["x-fuel"]:SetFuel(vehicle, 100)
        elseif Config.FuelSystem == 'ox-fuel' then
            return SetVehicleFuelLevel(vehicle, 100)
        elseif Config.FuelSystem == 'nd-fuel' then
            return exports["nd-fuel"]:SetFuel(vehicle, 100)
        elseif Config.FuelSystem == 'frfuel' then
            return exports.frfuel:setFuel(vehicle, 100)
        elseif Config.FuelSystem == 'cdn-fuel' then
            return exports['cdn-fuel']:SetFuel(vehicle, 100)
        elseif Config.FuelSystem == 'hyon_gas_station' then
            return exports["hyon_gas_station"]:SetFuel(vehicle, 100)
        end
    end

end

Config.RevivePlayerSystem = true -- System to revive the player when he dies in the vehicle test.
DeadPlayer = function()
    TriggerEvent('hospital:client:Revive')

    -- TriggerEvent('esx_ambulancejob:revive')

end

Locales Editable

/shared/locales.lua

Translations = {
    ['es'] = {
        ['input_text_shop'] = 'Presiona ~g~[E] ~w~para abrir la concesionaria',
        ['input_text_sell'] = 'Presiona ~g~[E] ~w~para vender tu vehiculo al ~g~%s%%',
        ['close'] = 'Cerrar',
        ['title_no_enough_money'] = 'Error',
        ['description_no_enough_money'] = 'No tienes suficiente dinero',
        ['title_no_enough_stock'] = 'Error',
        ['description_no_enough_stock'] = 'No hay suficiente stock',
        ['all_categories'] = 'TODAS LAS CATEGORIAS',
        ['back'] = 'Atras',
        ['select_category'] = 'SELECCIONA UNA CATEGORIA',
        ['select_vehicle'] = 'SELECCIONA UN VEHÍCLO',
        ['test_vehicle'] = 'PROBAR VEHÍCULO',
        ['number_seats'] = 'ASIENTOS',
        ['max_gear'] = 'CAMBIOS',
        ['max_speed'] = 'MAX. VELOCIDAD',
        ['stock'] = 'DISPONIBLES',
        ['select_color'] = 'SELECCIONAR COLOR',
        ['rotate_vehicle'] = 'ROTAR VEHÍCULO',
        ['buy'] = 'COMPRAR',
        ['plate'] = 'MATRICULA',
        ['exit'] = 'SALIR',
        ['close'] = 'CERRAR',
        ['cash'] = 'EFECTIVO',
        ['bank'] = 'BANCO',
        ['coins'] = 'VIP',
        ['title_payment'] = 'METODO DE PAGO',
        ['description_payment'] = 'Para completar el pago, seleccione el método de pago que prefiera.',
        ['no_found'] = 'NO ENCONTRADO',
        ['search'] = 'Buscar...',
        ['timer'] = 'Temporizador',
        ['need_vehicle_sell'] = 'Necesitas estar en un vehículo para venderlo.',
        ['no_vehicle_sell'] = 'Este vehiculo no se encuentra en esta tienda y no puede ser vendido.',
        ['not_player_vehicle'] = 'Este vehiculo no te pertenece para venderlo.',
        ['vehicle_selled'] = 'Has vendido tu vehiculo por $%s'
        
        

    },

    
    ['en'] = {
        ['input_text_shop'] = 'Press ~g~[E] ~w~to open the cardealer.',
        ['input_text_sell'] = 'Press ~g~[E] ~w~to sell your vehicle for ~g~%s%%',
        ['close'] = 'Close',
        ['title_no_enough_money'] = 'Error',
        ['description_no_enough_money'] = 'You don\'t have enough money',
        ['title_no_enough_stock'] = 'Error',
        ['description_no_enough_stock'] = 'Not enough stock',
        ['all_categories'] = 'ALL CATEGORIES',
        ['back'] = 'Back',
        ['select_category'] = 'SELECT A CATEGORY',
        ['select_vehicle'] = 'SELECT A VEHICLE',
        ['test_vehicle'] = 'TEST VEHICLE',
        ['number_seats'] = 'NUMBER SEATS',
        ['max_gear'] = 'MAX GEAR',
        ['max_speed'] = 'MAX SPEED',
        ['stock'] = 'STOCK',
        ['select_color'] = 'SELECT COLOR',
        ['rotate_vehicle'] = 'ROTATE VEHICLE',
        ['buy'] = 'BUY',
        ['plate'] = 'PLATE',
        ['exit'] = 'EXIT',
        ['close'] = 'CLOSE',
        ['cash'] = 'CASH',
        ['bank'] = 'BANK',
        ['coins'] = 'VIP',
        ['title_payment'] = 'PAYMENT METHOD',
        ['description_payment'] = 'To complete the payment select the payment method you prefer.',
        ['no_found'] = 'NO FOUND',
        ['search'] = 'Search...',
        ['timer'] = 'Timer',
        ['need_vehicle_sell'] = 'You need to be in a vehicle to sell it.',
        ['no_vehicle_sell'] = 'This vehicle is not listed in this store and cannot be sold.',
        ['not_player_vehicle'] = 'This vehicle does not belong to you for sale.',
        ['vehicle_selled'] = 'You have sold your vehicle for $%s'

        
        
    },

    ['fr'] = {
        ['input_text_shop'] = 'Appuyez sur ~g~[E] ~w~pour ouvrir le concessionnaire de voitures.',
        ['input_text_sell'] = 'Appuyez sur ~g~E] ~w~pour vendre votre véhicule pour ~g~%s%%',
        ['close'] = 'Fermer',
        ['title_no_enough_money'] = 'Erreur',
        ['description_no_enough_money'] = 'Vous n\'avez pas assez d\'argent',
        ['title_no_enough_stock'] = 'Erreur',
        ['description_no_enough_stock'] = 'Pas assez de stock',
        ['all_categories'] = 'TOUTES LES CATÉGORIES',
        ['back'] = 'Retour',
        ['select_category'] = 'SÉLECTIONNEZ UNE CATÉGORIE',
        ['select_vehicle'] = 'SÉLECTIONNEZ UN VÉHICULE',
        ['test_vehicle'] = 'TESTER LE VÉHICULE',
        ['number_seats'] = 'NOMBRE DE SIÈGES',
        ['max_gear'] = 'VITESSE MAX',
        ['max_speed'] = 'VITESSE MAX',
        ['stock'] = 'EN STOCK',
        ['select_color'] = 'SÉLECTIONNER UNE COULEUR',
        ['rotate_vehicle'] = 'TOURNER LE VÉHICULE',
        ['buy'] = 'ACHETER',
        ['plate'] = 'PLAQUE',
        ['exit'] = 'QUITTER',
        ['close'] = 'FERMER',
        ['cash'] = 'ARGENT LIQUIDE',
        ['bank'] = 'BANQUE',
        ['coins'] = 'PIÈCES',
        ['title_payment'] = 'MODE DE PAIEMENT',
        ['description_payment'] = 'Pour finaliser le paiement, sélectionnez le mode de paiement que vous préférez.',
        ['no_found'] = 'NON TROUVÉ',
        ['search'] = 'Rechercher...',
        ['timer'] = 'Minuteur',
        ['need_vehicle_sell'] = 'Vous devez être dans un véhicule pour le vendre.',
        ['no_vehicle_sell'] = 'Ce véhicule n\'est pas répertorié dans ce magasin et ne peut être vendu.',
        ['not_player_vehicle'] = 'Ce véhicule ne vous appartient pas pour la vente.',
        ['vehicle_selled'] = 'Vous avez vendu votre véhicule pour $%s'
    },


    ['pt'] = {
        ['input_text_shop'] = 'Pressione ~g~[E] ~w~para abrir o revendedor de carros.',
        ['input_text_sell'] = 'Pressione ~g~[E] ~w~para vender seu veículo por ~g~%s%%',
        ['close'] = 'Fechar',
        ['title_no_enough_money'] = 'Erro',
        ['description_no_enough_money'] = 'Você não tem dinheiro suficiente',
        ['title_no_enough_stock'] = 'Erro',
        ['description_no_enough_stock'] = 'Não há estoque suficiente',
        ['all_categories'] = 'TODAS AS CATEGORIAS',
        ['back'] = 'Voltar',
        ['select_category'] = 'SELECIONE UMA CATEGORIA',
        ['select_vehicle'] = 'SELECIONE UM VEÍCULO',
        ['test_vehicle'] = 'TESTAR VEÍCULO',
        ['number_seats'] = 'NÚMERO DE ASSENTOS',
        ['max_gear'] = 'MARCHA MÁXIMA',
        ['max_speed'] = 'VELOCIDADE MÁXIMA',
        ['stock'] = 'ESTOQUE',
        ['select_color'] = 'SELECIONE UMA COR',
        ['rotate_vehicle'] = 'ROTACIONAR VEÍCULO',
        ['buy'] = 'COMPRAR',
        ['plate'] = 'PLACA',
        ['exit'] = 'SAIR',
        ['close'] = 'FECHAR',
        ['cash'] = 'DINHEIRO',
        ['bank'] = 'BANCO',
        ['coins'] = 'MOEDAS',
        ['title_payment'] = 'MÉTODO DE PAGAMENTO',
        ['description_payment'] = 'Para completar o pagamento, selecione o método de pagamento que preferir.',
        ['no_found'] = 'NÃO ENCONTRADO',
        ['search'] = 'Buscar...',
        ['timer'] = 'Cronômetro',
        ['need_vehicle_sell'] = 'É necessário estar num veículo para o vender.',
        ['no_vehicle_sell'] = 'Este veículo não está listado nesta loja e não pode ser vendido.',
        ['not_player_vehicle'] = 'Este veículo não lhe pertence para venda.',
        ['vehicle_selled'] = 'Vendeu o seu veículo por $%s'
    },    
    
}

Server Side Editable

/shared/sv_editable.lua

AddSocietyMoney = function(job, givenAmount)
    if Config.Framework == "ESX" then
        if job then
            local accountName = 'society_' .. job
            local societyAccountMoney = MySQL.Async.fetchAll("SELECT * FROM `addon_account_data` WHERE `account_name` = '" ..accountName .. "'", {})
            if societyAccountMoney and societyAccountMoney[1] then
                local currentAmount = societyAccountMoney[1].money
                local newAmount = currentAmount + givenAmount
                if newAmount < 0 then
                    return false
                else
                    MySQL.Async.execute("UPDATE `addon_account_data` SET `money` = @newAmount WHERE `account_name` = @accountName", {["@newAmount"] = newAmount, ["@accountName"] = accountName}, function(rowsChanged)
                        if rowsChanged > 0 then
                            return newAmount
                        else
                            return false
                        end
                    end)
                end
            else
                return false
            end
        end
    elseif Config.Framework == 'QBCore' then
        if job then
            local accountName = job
            if Config.NewManagementSystem then
                exports["qb-banking"]:GetAccount(accountName, function(account)
                    if account and account.account_balance then
                        if givenAmount < 0 then
                            return false
                        else
                            exports["qb-banking"]:AddMoney(job, givenAmount)
                        end
                    else
                        debugprint('^1Cuenta no encontrada^0')
                        return false
                    end
                end)
            else
                MySQL.Async.fetchAll("SELECT * FROM `management_funds` WHERE `job_name` = '" ..accountName .. "'", {}, function(societyAccountMoney)
                    if societyAccountMoney and societyAccountMoney[1] then
                        local currentAmount = societyAccountMoney[1].amount
                        local newAmount = currentAmount + givenAmount
                        if newAmount < 0 then
                            return false
                        else
                            MySQL.Async.execute("UPDATE `management_funds` SET `amount` = @newAmount WHERE `job_name` = @accountName", {["@newAmount"] = newAmount, ["@accountName"] = accountName}, function(rowsChanged)
                                if rowsChanged > 0 then
                                    return newAmount
                                else
                                    debugprint('^1No se pudo actualizar el monto^0')
                                    return false
                                end
                            end)
                        end
                    else
                        debugprint('^1Sociedad no encontrada^0')
                        return false
                    end
                end)
            end
        end
    end
end

How to add categories?

  1. Select table biyei_hvehicleshop_category

  1. You can add more categories here:

  1. For example:

How to add vehicles?

  1. Select biyei_hvehicleshop_vehicles

  1. You can add vehicles here

  1. For example:

How to add vip vehicles?

  1. In vehicle list table in SQL biyei_hvehicleshop_vehicles change value vip to 1

How to add images of the vehicles?

  1. Go to biyei_hvehicleshop\ui\assets\imgs\vehicles and put the images of the vehicles here, remember that the images must have as name the model of the vehicle.

Last updated