Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- //keys
- using System.Windows.Forms;
- //gta stuff
- using GTA;
- using GTA.Native;
- using GTA.Math;
- namespace Mod_name_was_here
- {
- public class AIstartUP : Script
- {
- public AIstartUP()
- {
- LoadSettings();
- Tick += OnTick;
- KeyDown += OnKeyDown;
- }
- private void LoadSettings()
- {
- UI.ShowSubtitle("Custom Mod Installed!", 5000);
- //call fun
- }
- private void OnTick(object sender, EventArgs e)
- {
- }
- private void OnKeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.J)
- {
- RemoveAllPeds();
- }
- }
- private void RemoveAllPeds()
- {
- Vector3 pos = Game.Player.Character.Position;
- Function.Call(Hash.SET_PED_POPULATION_BUDGET, false);
- Function.Call(Hash.SET_VEHICLE_POPULATION_BUDGET, false);
- Function.Call(Hash.CLEAR_AREA_OF_PEDS, pos.X, pos.Y, pos.Z, 10000, 1); //last parameter is an int, not a boolean
- Function.Call(Hash.CLEAR_AREA_OF_VEHICLES, pos.X, pos.Y, pos.Z, 10000, true, true, true, true, true);
- UI.ShowSubtitle("Attempting to Remove All peds and cars!", 5000);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement