diff --git a/DevMenu.cs b/DevMenu.cs index 3a104ac..d9b8fde 100644 --- a/DevMenu.cs +++ b/DevMenu.cs @@ -6,6 +6,9 @@ using CitizenFX.Core; using CitizenFX.Core.UI; using NativeUI; +using System.Drawing; +using System.Security; +using CitizenFX.Core.Native; namespace FRFuel.Dev { public class DevMenu { @@ -13,14 +16,16 @@ public class DevMenu { protected UIMenu mainMenu; protected UIMenuItem position; - protected UIMenuItem isDriver; protected UIMenuItem vehicleModelId; protected UIMenuItem vehicleFuelTank; protected UIMenuItem knownVehicle; + protected UIMenuItem netVehicleId; protected UIMenuItem netVehicleIdControl; protected UIMenuItem decoration; + protected Text txt = new Text("", new PointF(600f, 100f), .5f); + public DevMenu() { menuPool = new MenuPool(); mainMenu = new UIMenu("FRFuel dev menu", "things"); @@ -54,7 +59,7 @@ public DevMenu() { menuPool.Add(mainMenu); menuPool.RefreshIndex(); } - + public void OnTick() { position.Text = "Pos: " + Game.PlayerPed.Position.ToString(); diff --git a/FRFuel.cs b/FRFuel.cs index cba70bc..6b8412b 100644 --- a/FRFuel.cs +++ b/FRFuel.cs @@ -142,6 +142,10 @@ public void ConsumeFuel(Vehicle vehicle) { // And ped is in range of sqrt(80) to it Vector3.DistanceSquared(currentGasStation.Position, vehicle.Position) <= 80f ) { + if (vehicle.Speed < 0.1f) { + ControlEngine(vehicle); + } + if (vehicle.IsEngineRunning) { hud.helpTextTurnOff.Draw(); } else { @@ -167,7 +171,7 @@ public void ConsumeFuel(Vehicle vehicle) { /// /// public void ControlEngine(Vehicle vehicle) { - if (Game.IsControlJustReleased(0, Control.CinematicSlowMo)) { + if (Game.IsControlJustReleased(0, Control.VehicleHorn)) { if (vehicle.IsEngineRunning) { vehicle.IsDriveable = false; vehicle.IsEngineRunning = false; @@ -357,7 +361,6 @@ public async Task OnTick() { InitFuel(vehicle); } - ControlEngine(vehicle); ConsumeFuel(vehicle); RenderUI(playerPed); diff --git a/FRFuel.csproj b/FRFuel.csproj index 087778c..76790b6 100644 --- a/FRFuel.csproj +++ b/FRFuel.csproj @@ -20,7 +20,7 @@ DEBUG;TRACE prompt 4 - false + true pdbonly @@ -29,6 +29,7 @@ TRACE prompt 4 + true @@ -54,7 +55,6 @@ - diff --git a/HUD.cs b/HUD.cs index c16f359..cf155f8 100644 --- a/HUD.cs +++ b/HUD.cs @@ -35,7 +35,7 @@ public class HUD { ); public Text helpTextTurnOff = new Text( - "Press ~b~L~w~ to stop engine", + "~b~Horn~w~ to stop engine", new PointF(640f, 690f), 0.5f, Color.FromArgb(255, 255, 255, 255), @@ -46,7 +46,7 @@ public class HUD { ); public Text helpTextTurnOn = new Text( - "Press ~b~L~w~ to start engine", + "~b~Horn~w~ to start engine", new PointF(640f, 690f), 0.5f, Color.FromArgb(255, 255, 255, 255), diff --git a/ModMenu.cs b/ModMenu.cs deleted file mode 100644 index 27a6f22..0000000 --- a/ModMenu.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using NativeUI; -using CitizenFX.Core; - -namespace FRFuel { - public class ModMenu { - public ModMenu() { - - } - - protected void getVehicleMods(Vehicle veh) { - - } - } -} diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 2c111d5..16b12b8 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -33,4 +33,4 @@ // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file