Created
July 25, 2015 17:16
-
-
Save aveao/7550e85f801d18b8049e to your computer and use it in GitHub Desktop.
First version of DankNet Menu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//http://github.com/ardaozkal/DankNet-GTAV is current version | |
//This one took me about 15 mins to write, then I turned this into a menu, which ended up being the (arguably and self claimed) best .Net menu. | |
using System; | |
using GTA; | |
using GTA.Math; | |
using GTA.Native; | |
using System.Windows.Forms; | |
public class SmallTrainer : Script | |
{ | |
public SmallTrainer() | |
{ | |
this.KeyUp += this.OnKeyUp; | |
} | |
bool contfix = false; | |
private void OnKeyUp(object sender, KeyEventArgs e) | |
{ | |
int currentwantedlevel = Game.Player.WantedLevel; | |
Ped player = Game.Player.Character; | |
if (e.KeyCode == Keys.F7 || contfix == true) | |
{ | |
if (player.IsInVehicle()) | |
{ | |
Vehicle vehicle = player.CurrentVehicle; | |
vehicle.CanBeVisiblyDamaged = false; | |
vehicle.CanTiresBurst = false; | |
vehicle.EngineRunning = true; | |
vehicle.IsDriveable = true; | |
vehicle.IsStolen = false; | |
vehicle.BodyHealth = vehicle.MaxHealth; | |
vehicle.EngineHealth = vehicle.MaxHealth; | |
vehicle.Repair(); | |
vehicle.IsInvincible = true; | |
contfix = true; | |
} | |
else | |
{ | |
contfix = false; | |
} | |
} | |
if (e.KeyCode == Keys.F5) | |
{ | |
if (currentwantedlevel != 0) | |
{ | |
currentwantedlevel--; | |
} | |
} | |
if (e.KeyCode == Keys.F6) | |
{ | |
if (currentwantedlevel != 5) | |
{ | |
currentwantedlevel++; | |
} | |
} | |
Game.Player.WantedLevel = currentwantedlevel; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment