mirror of
https://github.com/ND-Framework/ND_Core.git
synced 2026-08-18 06:16:02 +01:00
tweak(client/vehicle): minimum cruise control speed
This commit is contained in:
@@ -697,9 +697,14 @@ lib.addKeybind({
|
|||||||
})
|
})
|
||||||
end
|
end
|
||||||
if not playerVehicle then return end
|
if not playerVehicle then return end
|
||||||
|
|
||||||
|
local speed = math.floor(GetEntitySpeed(playerVehicle) * 2.236936)
|
||||||
|
if speed < 10 then return end
|
||||||
|
|
||||||
cruiseControlEnabled = true
|
cruiseControlEnabled = true
|
||||||
cruiseSpeedVehicle = math.floor(GetEntitySpeed(playerVehicle) * 2.236936)
|
cruiseSpeedVehicle = speed
|
||||||
cruiseSpeedSet = cruiseSpeedVehicle
|
cruiseSpeedSet = cruiseSpeedVehicle
|
||||||
|
|
||||||
lib.notify({
|
lib.notify({
|
||||||
title = "Cruise control",
|
title = "Cruise control",
|
||||||
description = ("Set to %d mph."):format(math.floor(cruiseSpeedSet)),
|
description = ("Set to %d mph."):format(math.floor(cruiseSpeedSet)),
|
||||||
|
|||||||
Reference in New Issue
Block a user