Price Multiplier

For the upgrades inside Performance tab you can setup a multiplier per level based in the vehicle price.

getVehiclePrice

The vehicle price can be fetched from anywhere, by default only QBCore.Shared.Vehicles, AV Dealership and AV Vehicleshop are supported but you can modify the function in client/framework/vehprice.lua

local av_dealership = false -- set true to retrieve the veh price from av_dealership
local av_vehicleshop = false -- set true to retrieve the veh price from av_vehicleshop
vehiclePrice = 0

-- Do your own check to retrieve the vehicle price here:
function getVehiclePrice(vehicle)
    vehiclePrice = 0
    local model = GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))
    model = string.lower(model)
    if Config.Framework == "QBCore" and not (av_dealership or av_vehicleshop) then
        if QBCore.Shared.Vehicles and QBCore.Shared.Vehicles[model] then
            vehiclePrice = QBCore.Shared.Vehicles[model]['price']
            return
        else
            print("Vehicle "..model.." doesn't exist in QBCore.Shared.Vehicles, this is NOT a script problem.")
        end
    end
    if av_dealership then
        vehiclePrice = exports['av_dealership']:getPrice(model)
        return
    end
    if av_vehicleshop then
        vehiclePrice = lib.callback.await("av_tuning:getPrice", false, model)
    end
end

Last updated