Guest User

GTAV

a guest
Apr 25th, 2017
320
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. //keys
  7. using System.Windows.Forms;
  8. //gta stuff
  9. using GTA;
  10. using GTA.Native;
  11. using GTA.Math;
  12.  
  13. namespace Mod_name_was_here
  14. {
  15. public class AIstartUP : Script
  16. {
  17. public AIstartUP()
  18. {
  19. LoadSettings();
  20. Tick += OnTick;
  21. KeyDown += OnKeyDown;
  22. }
  23.  
  24. private void LoadSettings()
  25. {
  26. UI.ShowSubtitle("Custom Mod Installed!", 5000);
  27. //call fun
  28. }
  29.  
  30. private void OnTick(object sender, EventArgs e)
  31. {
  32.  
  33. }
  34.  
  35. private void OnKeyDown(object sender, KeyEventArgs e)
  36. {
  37. if (e.KeyCode == Keys.J)
  38. {
  39. RemoveAllPeds();
  40.  
  41.  
  42. }
  43. }
  44.  
  45. private void RemoveAllPeds()
  46. {
  47. /*
  48. * STREAMING::SET_PED_POPULATION_BUDGET(false);
  49. STREAMING::SET_VEHICLE_POPULATION_BUDGET(false);
  50. GAMEPLAY::CLEAR_AREA_OF_PEDS(0, 0, 0, 10000, true);
  51. GAMEPLAY::CLEAR_AREA_OF_VEHICLES(0, 0, 0, 10000, true, true, true, true, true);
  52. */
  53. Function.Call(Hash.SET_PED_POPULATION_BUDGET, false);
  54. Function.Call(Hash.SET_VEHICLE_POPULATION_BUDGET, false);
  55. Function.Call(Hash.CLEAR_AREA_OF_PEDS, 0, 0, 0, 10000, true);
  56. Function.Call(Hash.CLEAR_AREA_OF_VEHICLES, 0, 0, 0, 10000, true, true, true, true, true);
  57.  
  58.  
  59.  
  60. UI.ShowSubtitle("Attempting to Remove All peds and cars!", 5000);
  61. }
  62. }
  63. }
RAW Paste Data