From 75a8084e5630b3fd4d156dfe042b8483c7b7cc20 Mon Sep 17 00:00:00 2001 From: Slewog <31140215+Slewog@users.noreply.github.com> Date: Sun, 8 May 2022 00:46:53 +0200 Subject: [PATCH] Fix - LS Custom wheels changement on bikes Change the position of the condition GetVehicleClass (not working before and working now) --- [esx_addons]/esx_lscustom/client/main.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/[esx_addons]/esx_lscustom/client/main.lua b/[esx_addons]/esx_lscustom/client/main.lua index 337f3760..50d2470a 100644 --- a/[esx_addons]/esx_lscustom/client/main.lua +++ b/[esx_addons]/esx_lscustom/client/main.lua @@ -118,6 +118,11 @@ function UpdateMods(data) if data.wheelType then props['wheels'] = data.wheelType + + if GetVehicleClass(vehicle) == 8 then -- Fix bug wheels for bikes. + props['modBackWheels'] = data.modNum + end + ESX.Game.SetVehicleProperties(vehicle, props) props = {} elseif data.modType == 'neonColor' then @@ -132,8 +137,6 @@ function UpdateMods(data) props['modSmokeEnabled'] = true ESX.Game.SetVehicleProperties(vehicle, props) props = {} - elseif data.modType == "modFrontWheels" and GetVehicleClass(vehicle) == 8 then -- Fix bug wheels for bikes. - props["modBackWheels"] = data.modNum end props[data.modType] = data.modNum