Price Multiplier
getVehiclePrice
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
endLast updated