diff --git a/client/cl_bennys.lua b/client/cl_bennys.lua index 7400371..b6a38e2 100644 --- a/client/cl_bennys.lua +++ b/client/cl_bennys.lua @@ -219,7 +219,7 @@ function GetCurrentTurboState() local plyVeh = GetVehiclePedIsIn(plyPed, false) local isEnabled = IsToggleModOn(plyVeh, 18) - return isEnabled and 1 or 0 + return isEnabled and 0 or -1 end function GetCurrentExtraState(extra) diff --git a/client/cl_ui.lua b/client/cl_ui.lua index 7953907..34ec922 100644 --- a/client/cl_ui.lua +++ b/client/cl_ui.lua @@ -306,8 +306,8 @@ function InitiateMenus(isMotorcycle, vehicleHealth, categories, welcomeLabel) local currentTurboState = GetCurrentTurboState() createMenu(v.category:gsub("%s+", "") .. "Menu", v.category .. " Customisation", "Enable or Disable Turbo") - populateMenu(v.category:gsub("%s+", "") .. "Menu", 0, "Disable", "$0") - populateMenu(v.category:gsub("%s+", "") .. "Menu", 1, "Enable", "$" .. vehicleCustomisationPrices.turbo.price) + populateMenu(v.category:gsub("%s+", "") .. "Menu", -1, "Disable", "$0") + populateMenu(v.category:gsub("%s+", "") .. "Menu", 0, "Enable", "$" .. vehicleCustomisationPrices.turbo.prices[2]) updateItem2Text(v.category:gsub("%s+", "") .. "Menu", currentTurboState, "Installed") @@ -582,7 +582,7 @@ function MenuManager(state) if currentMenuItem2 ~= "Installed" then if isMenuActive("modMenu") then if currentCategory == 18 then --Turbo - if AttemptPurchase("turbo") then + if AttemptPurchase("turbo", currentMenuItemID) then ApplyMod(currentCategory, currentMenuItemID) playSoundEffect("wrench", 0.4) updateItem2Text(currentMenu, currentMenuItemID, "Installed") diff --git a/config.lua b/config.lua index daa0dc6..e96510e 100644 --- a/config.lua +++ b/config.lua @@ -14,7 +14,7 @@ vehicleCustomisationPrices = { cosmetics = {price = 400}, respray = {price = 1000}, performance = {prices = {0, 3250, 5500, 10450, 15250, 20500}}, - turbo = {price = 15000}, + turbo = {prices = {0, 15000}}, wheels = {price = 400}, customwheels = {price = 600}, wheelsmoke = {price = 400}, diff --git a/server/sv_bennys.lua b/server/sv_bennys.lua index 8563f85..a219aa2 100644 --- a/server/sv_bennys.lua +++ b/server/sv_bennys.lua @@ -44,7 +44,7 @@ RegisterNetEvent('qb-customs:server:attemptPurchase', function(type, upgradeLeve else TriggerClientEvent('qb-customs:client:purchaseFailed', source) end - elseif type == "performance" then + elseif type == "performance" or type == "turbo" then if balance >= vehicleCustomisationPrices[type].prices[upgradeLevel] then TriggerClientEvent('qb-customs:client:purchaseSuccessful', source) Player.Functions.RemoveMoney(moneyType, vehicleCustomisationPrices[type].prices[upgradeLevel], "bennys")