View difference between Paste ID: 9sxyKPu1 and kfAAUN6p
SHOW: | | - or go back to the newest paste.
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-
            /*
47+
			Vector3 pos = Game.Player.Character.Position;
48-
             * STREAMING::SET_PED_POPULATION_BUDGET(false);
48+
49-
STREAMING::SET_VEHICLE_POPULATION_BUDGET(false);
49+
50-
GAMEPLAY::CLEAR_AREA_OF_PEDS(0, 0, 0, 10000, true);
50+
51-
GAMEPLAY::CLEAR_AREA_OF_VEHICLES(0, 0, 0, 10000, true, true, true, true, true);
51+
            Function.Call(Hash.CLEAR_AREA_OF_PEDS, pos.X, pos.Y, pos.Z, 10000, 1); //last parameter is an int, not a boolean
52-
             */
52+
            Function.Call(Hash.CLEAR_AREA_OF_VEHICLES, pos.X, pos.Y, pos.Z, 10000, true, true, true, true, true);
53
54
55-
            Function.Call(Hash.CLEAR_AREA_OF_PEDS, 0, 0, 0, 10000, true);
55+
56-
            Function.Call(Hash.CLEAR_AREA_OF_VEHICLES, 0, 0, 0, 10000, true, true, true, true, true);
56+
57
        }
58
    }
59
}