@@ -15,8 +15,8 @@ public class Main : Script
1515 bool leftIndicator , rightIndicator ;
1616 bool hazards ;
1717
18- Keys sirenToggleKey , beamToggleKey , interiorLightToggleKey , leftIndicatorKey , rightIndicatorKey ;
19- GTA . Control sirenToggleButton , beamToggleButton , leftIndicatorButton , rightIndicatorButton ;
18+ Keys sirenToggleKey , beamToggleKey , interiorLightToggleKey , leftIndicatorKey , rightIndicatorKey , hazardsKey ;
19+ GTA . Control sirenToggleButton , beamToggleButton , leftIndicatorButton , rightIndicatorButton , hazardsButton ;
2020
2121 public Main ( )
2222 {
@@ -30,14 +30,16 @@ public Main()
3030 beamToggleKey = config . GetValue < Keys > ( "Headlights" , "Beam_Toggle_Key" , Keys . CapsLock ) ;
3131 interiorLightToggleKey = config . GetValue < Keys > ( "Interior" , "Interior_Light_Toggle_Key" , Keys . I ) ;
3232 leftIndicatorKey = config . GetValue < Keys > ( "Indicators" , "Left_Indicator_key" , Keys . Left ) ;
33- rightIndicatorKey = config . GetValue < Keys > ( "Indicators" , "Right_Indicator_key" , Keys . Right ) ;
33+ rightIndicatorKey = config . GetValue < Keys > ( "Indicators" , "Right_Indicator_Key" , Keys . Right ) ;
34+ hazardsKey = config . GetValue < Keys > ( "Indicators" , "Hazard_Lights_Key" , Keys . Down ) ;
3435 #endregion
3536
3637 #region Buttons
3738 sirenToggleButton = config . GetValue < GTA . Control > ( "Emergency Vehicles" , "Siren_Toggle_Button" , GTA . Control . ScriptPadDown ) ;
3839 beamToggleButton = config . GetValue < GTA . Control > ( "Headlights" , "Beam_Toggle_Button" , GTA . Control . ScriptRLeft ) ;
3940 leftIndicatorButton = config . GetValue < GTA . Control > ( "Indicators" , "Left_Indicator_Button" , GTA . Control . ScriptPadLeft ) ;
4041 rightIndicatorButton = config . GetValue < GTA . Control > ( "Indicators" , "Right_Indicator_Button" , GTA . Control . ScriptPadRight ) ;
42+ hazardsButton = config . GetValue < GTA . Control > ( "Indicators" , "Hazard_Lights_Button" , GTA . Control . ScriptRB ) ;
4143 #endregion
4244 }
4345
@@ -76,6 +78,9 @@ private void OnKeyDown(object sender, KeyEventArgs e)
7678
7779 if ( e . KeyCode == leftIndicatorKey )
7880 ToggleLeftIndicator ( ) ;
81+
82+ if ( e . KeyCode == hazardsKey )
83+ ToggleHazards ( ) ;
7984 }
8085 }
8186
@@ -92,6 +97,9 @@ private void GamePad()
9297
9398 if ( Game . IsControlJustPressed ( rightIndicatorButton ) )
9499 ToggleRightIndicator ( ) ;
100+
101+ if ( Game . IsControlJustPressed ( hazardsButton ) )
102+ ToggleHazards ( ) ;
95103 }
96104 #endregion
97105
0 commit comments