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;
- using System.Drawing;
- //gta stuff
- using GTA;
- using GTA.Native;
- using GTA.Math;
- using NativeUI;
- namespace TyronZombies
- {
- public class Warmup : Script
- {
- public Warmup()
- {
- LoadSettings();
- Tick += OnTick; // CallEveryFrame
- KeyDown += OnKeyDown; // CallOnKeyPress
- }
- private void LoadSettings()
- {
- UI.Notify(" Mod Installed!");
- RemoveAllPeds();
- }
- private void OnTick(object sender, EventArgs e)
- {
- if (Game.Player.WantedLevel != 0)
- {
- Game.Player.WantedLevel = 0;
- }
- }
- private void OnKeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.J)
- {
- Vector3 spawnpos = Game.Player.Character.GetOffsetInWorldCoords(new Vector3(0,5,0));
- Vehicle Zombie = World.CreateVehicle(VehicleHash.Turismor, spawnpos);
- UI.Notify("Spawned car");
- try
- {
- Vector3 spawnpos1 = Game.Player.Character.GetOffsetInWorldCoords(new Vector3(0, 5, 0));
- Ped Zambie = World.CreatePed(PedHash.Bodybuild01AFM, spawnpos1);
- UI.Notify("Spawned zombie");
- }
- catch (Exception er)
- {
- UI.Notify(er.Message);
- }
- }
- }
- private void RemoveAllPeds()
- {
- //STREAMING::SET_PED_POPULATION_BUDGET(false);
- //STREAMING::SET_VEHICLE_POPULATION_BUDGET(false);
- //GAMEPLAY::CLEAR_AREA_OF_PEDS(0, 0, 0, 10000, true);
- //GAMEPLAY::CLEAR_AREA_OF_VEHICLES(0, 0, 0, 10000, true, true, true, true, true);
- UI.Notify("Attempting to Remove All Peds and Ped Vehicles!");
- Function.Call(Hash.SET_PED_POPULATION_BUDGET, false);
- Function.Call(Hash.SET_VEHICLE_POPULATION_BUDGET, false);
- Function.Call(Hash.CLEAR_AREA_OF_PEDS, 0, 0, 0, 10000, true);
- Function.Call(Hash.CLEAR_AREA_OF_VEHICLES, 0, 0, 0, 10000, true, true, true, true, true);
- //Function.Call(Hash.pol);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement