Advertisement
Eddlm

Mid-Air AutoCorrection disabler

Feb 16th, 2016
1,065
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. using GTA;
  2. using GTA.Native;
  3. using System;
  4. using System.Windows.Forms;
  5.  
  6.  
  7.  
  8. public class NoAfterTouchControl : Script
  9. {
  10. public NoAfterTouchControl()
  11. {
  12. Tick += OnTick;
  13. Interval = 5000;
  14. }
  15.  
  16. void OnTick(object sender, EventArgs e)
  17. {
  18. Vehicle veh = Game.Player.Character.CurrentVehicle;
  19. if (CanWeUse(veh) && veh.Model.IsCar)
  20. {
  21. Function.Call(GTA.Native.Hash.SET_VEHICLE_OUT_OF_CONTROL, Game.Player.Character.CurrentVehicle, false,false);
  22. }
  23. }
  24.  
  25. bool CanWeUse(Entity entity)
  26. {
  27. return entity != null && entity.Exists();
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement