diff --git a/client/commands.lua b/client/commands.lua index 297a8ab..c4c8b78 100644 --- a/client/commands.lua +++ b/client/commands.lua @@ -49,6 +49,30 @@ if not Config.Disable.VehicleHandlers and not Config.Disable.Vehicle then end end) + ESX.RegisterInput("esx_hud:indicator:Hazard", Translate("indicatorHazard"), "keyboard", "UP", function() + if not HUD.Data.Vehicle then + return + end + if HUD.Data.VehicleType == "AIR" then + return + end + if leftSignal ~= rightSignal then + leftSignal = true + rightSignal = true + else + leftSignal = not leftSignal + rightSignal = not rightSignal + end + SetVehicleIndicatorLights(HUD.Data.Vehicle, 0, rightSignal) + SetVehicleIndicatorLights(HUD.Data.Vehicle, 1, leftSignal) + + local isAttached, trailer = GetVehicleTrailerVehicle(HUD.Data.Vehicle) + if isAttached and DoesEntityExist(trailer) then + SetVehicleIndicatorLights(trailer, 0, rightSignal) + SetVehicleIndicatorLights(trailer, 1, leftSignal) + end + end) + ESX.RegisterInput("esx_hud:toggleEngine", Translate("toggleEngine"), "keyboard", "N", function() if not HUD.Data.Vehicle then return