Skip to content

Commit

Permalink
tweak(client/Function/enginesystem) : support DLC tuners New Vehicles…
Browse files Browse the repository at this point in the history
… handlings
  • Loading branch information
renzuzu committed Jul 25, 2021
1 parent a4c4a9f commit 47ec7eb
Show file tree
Hide file tree
Showing 6 changed files with 39,881 additions and 103,854 deletions.
23 changes: 12 additions & 11 deletions renzu_hud/client/function.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1889,7 +1889,7 @@ function Hud:Boost(hasturbo)
Wait(1)
end
--self.Notify('success',"PRESSURE",lag)
print(self.rpm2 > 0.65 , self.rpm2 < 0.95 , self.turbosound < 500 , self.gear ~= self.oldgear , power_percent <= 1.0)
--print(self.rpm2 > 0.65 , self.rpm2 < 0.95 , self.turbosound < 500 , self.gear ~= self.oldgear , power_percent <= 1.0)
if config.boost_sound and self.rpm2 > 0.65 and self.rpm2 < 0.95 and self.turbosound < 500 and self.gear == self.oldgear and power_percent < 1.0 then
self.turbosound = self.turbosound + 1
SetVehicleBoostActive(self.vehicle , 1, 0)
Expand Down Expand Up @@ -1928,7 +1928,7 @@ function Hud:Boost(hasturbo)
self.gear = 1
end
self.boost = (boost_pressure * 1)
print(self.boost)
--print(self.boost)
-- if IsControlPressed(1, 32) and self.rpm > 0.4 and not RCR(1, 32) then
-- self.pressed = true
-- if self.boost < 1.0 then
Expand Down Expand Up @@ -3668,16 +3668,17 @@ function Hud:GetHandlingfromModel(model)
}
return table
else
for k,v in pairs(self.vehiclehandling['Item']) do
if GetHashKey(v.handlingName) == model then
for k,v in pairs(self.vehiclehandling) do
--print(v.VehicleModels[1],model)
if GetHashKey(v.VehicleModels[1]) == model then
local table = {
['fDriveInertia'] = tonumber(v.fDriveInertia['_value']),
['nInitialDriveGears'] = tonumber(v.nInitialDriveGears['_value']),
['fInitialDriveForce'] = tonumber(v.fInitialDriveForce['_value']),
['fClutchChangeRateScaleUpShift'] = tonumber(v.fClutchChangeRateScaleUpShift['_value']),
['fClutchChangeRateScaleDownShift'] = tonumber(v.fClutchChangeRateScaleDownShift['_value']),
['fInitialDriveMaxFlatVel'] = tonumber(v.fInitialDriveMaxFlatVel['_value']),
['fMass'] = tonumber(v.fMass['_value']),
['fDriveInertia'] = tonumber(v.DriveInertia),
['nInitialDriveGears'] = tonumber(v.InitialDriveGears),
['fInitialDriveForce'] = tonumber(v.InitialDriveForce),
['fClutchChangeRateScaleUpShift'] = tonumber(v.ClutchChangeRateScaleUpShift),
['fClutchChangeRateScaleDownShift'] = tonumber(v.ClutchChangeRateScaleDownShift),
['fInitialDriveMaxFlatVel'] = tonumber(v.InitialDriveMaxFlatVel),
['fMass'] = tonumber(v.Mass),
}
return table
end
Expand Down
7 changes: 6 additions & 1 deletion renzu_hud/client/handling.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
CreateThread(function()
Wait(1000)
if config.customengine then
local f = LoadResourceFile("hud","handling.min.json")
local f = LoadResourceFile("renzu_hud","handling.min.json")
Hud.vehiclehandling = json.decode(f)
--print(f,json.decode(f))
-- for k,v in pairs(Hud.vehiclehandling) do
-- print(k,v.InitialDriveGears)
-- end
--TriggerEvent('table',Hud.vehiclehandling)
Wait(100)
collectgarbage()
--print(f)
Expand Down
3 changes: 1 addition & 2 deletions renzu_hud/config.lua

Large diffs are not rendered by default.

Loading

0 comments on commit 47ec7eb

Please sign in to comment.