Skip to content

Commit ff3eff6

Browse files
authored
Update main.lua
1 parent afc23bf commit ff3eff6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

client/main.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ AddEventHandler('zaps:useChip', function()
77
if vehicle and vehicle ~= 0 then
88
local plate = GetVehicleNumberPlateText(vehicle)
99
local speed = GetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fInitialDriveMaxFlatVel')
10-
SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fInitialDriveMaxFlatVel', speed + 50.0)
11-
10+
local vehicleClass = GetVehicleClass(vehicle)
11+
local speedModifier = Config.SpeedModifiers[tostring(vehicleClass)]
12+
SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fInitialDriveMaxFlatVel', speed + speedModifier)
1213
lib.notify({
1314
title = 'Tuner Chip',
1415
description = string.format(Locales[Config.Locale]['chip_used'], plate),

0 commit comments

Comments
 (0)