No cruise control if reversing or destroyed

Prevents the vehicle from entering into cruise control mode if it's reversing or if it's destroyed.
This commit is contained in:
KlibrDM
2018-09-07 14:54:11 +03:00
committed by GitHub
parent 3c0c3786f8
commit 46038eb287
+1 -1
View File
@@ -36,7 +36,7 @@ end)
function TriggerCruiseControl ()
if CruisedSpeed == 0 and IsDriving() then
if GetVehiculeSpeed() > 0 then
if GetVehiculeSpeed() > 0 and GetVehicleCurrentGear(GetVehicle()) > 0 then
CruisedSpeed = GetVehiculeSpeed()
CruisedSpeedKm = TransformToKm(CruisedSpeed)