From 92f5d3c0bcc4a5e02a53ce964dcfe3999855c512 Mon Sep 17 00:00:00 2001 From: Kuuzoo Date: Wed, 19 Apr 2023 17:19:20 +0200 Subject: [PATCH 1/2] Add Support for Drift Tyres Integrate them into the VehicleProperties Functions, and make sure that they return true on the check so there should be no problems with older builds. Thx to mycroft for the idea with the type <3 Co-Authored-By: Mycroft <22378232+Mycroft-Studios@users.noreply.github.com> --- [core]/es_extended/client/functions.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index 90191138..b806fe6e 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -627,6 +627,11 @@ function ESX.Game.GetVehicleProperties(vehicle) end end + local driftTyresEnabled = false + if type(GetDriftTyresEnabled(vehicle) == boolean) and GetDriftTyresEnabled(vehicle) then + driftTyresEnabled = true + end + local doorsBroken, windowsBroken, tyreBurst = {}, {}, {} local numWheels = tostring(GetVehicleNumberOfWheels(vehicle)) @@ -689,6 +694,7 @@ function ESX.Game.GetVehicleProperties(vehicle) neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)), extras = extras, + dirftTyresEnabled = driftTyresEnabled, tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)), modSpoilers = GetVehicleMod(vehicle, 0), @@ -822,6 +828,10 @@ function ESX.Game.SetVehicleProperties(vehicle, props) end end + if props.driftTyresEnabled then + SetDriftTyresEnabled(vehicle, true) + end + if props.neonColor ~= nil then SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3]) end From d8b1046d3892fd74012259626ea945262098b54f Mon Sep 17 00:00:00 2001 From: Gergo <69343477+Rav3n95@users.noreply.github.com> Date: Wed, 26 Apr 2023 02:48:12 +0200 Subject: [PATCH 2/2] Update [core]/es_extended/client/functions.lua Co-authored-by: Csoki --- [core]/es_extended/client/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/[core]/es_extended/client/functions.lua b/[core]/es_extended/client/functions.lua index b806fe6e..85a393b6 100644 --- a/[core]/es_extended/client/functions.lua +++ b/[core]/es_extended/client/functions.lua @@ -628,7 +628,7 @@ function ESX.Game.GetVehicleProperties(vehicle) end local driftTyresEnabled = false - if type(GetDriftTyresEnabled(vehicle) == boolean) and GetDriftTyresEnabled(vehicle) then + if type(GetDriftTyresEnabled(vehicle) == "boolean") and GetDriftTyresEnabled(vehicle) then driftTyresEnabled = true end