File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ public class FRFuel : BaseScript
5353 protected Vehicle LastVehicle { get => lastVehicle ; set => lastVehicle = value ; }
5454
5555 protected Config Config { get ; set ; }
56+ protected bool showHud = true ;
5657 #endregion
5758
5859 /// <summary>
@@ -124,8 +125,11 @@ protected void LoadConfig()
124125
125126 Config = new Config ( configContent ) ;
126127
128+ showHud = Config . Get ( "ShowHud" , "true" ) == "true" ;
129+
127130 #if DEBUG
128131 Debug . WriteLine ( $ "CreatePickups: { Config . Get ( "CreatePickups" , "true" ) } ") ;
132+ Debug . WriteLine ( $ "ShowHud: { Config . Get ( "ShowHud" , "true" ) } ") ;
129133 #endif
130134 }
131135
@@ -377,7 +381,10 @@ public void ControlEngine(Vehicle vehicle)
377381 /// <param name="playerPed"></param>
378382 public void RenderUI ( Ped playerPed )
379383 {
380- hud . RenderBar ( playerPed . CurrentVehicle . FuelLevel , fuelTankCapacity ) ;
384+ if ( showHud )
385+ {
386+ hud . RenderBar ( playerPed . CurrentVehicle . FuelLevel , fuelTankCapacity ) ;
387+ }
381388
382389 var gasStationIndex = GetGasStationIndexInRange ( playerPed . Position , showMarkerInRangeSquared ) ;
383390
Original file line number Diff line number Diff line change 6666 </ItemGroup >
6767 <Import Project =" $(MSBuildToolsPath)\Microsoft.CSharp.targets" />
6868 <PropertyGroup >
69- <PostBuildEvent >copy /y $(TargetPath) C:\Games\FiveReborn\server \resources\frfuel</PostBuildEvent >
69+ <PostBuildEvent >copy /y $(TargetPath) C:\Games\FiveReborn\fxserver \resources\frfuel</PostBuildEvent >
7070 </PropertyGroup >
7171 <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
7272 Other similar extension points exist, see Microsoft.Common.targets.
You can’t perform that action at this time.
0 commit comments