Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // HippieCommunist ZombieZ
- using System;
- using System.Windows.Forms;
- using GTA;
- namespace Zomb
- {
- // ### makes ZombieZ!
- public class Zomb : Script
- {
- public Zomb()
- {
- this.Tick += new EventHandler(this.ScriptCommunicationExample2_Tick);
- Interval = Settings.GetValueInteger("INTERVAL", "SETTINGS", 200);
- Wait(0);
- }
- private int Ra(int min, int max)
- {
- Random random = new Random();
- return random.Next(min, max);
- }
- bool Ison = false;
- int r;
- private void ScriptCommunicationExample2_Tick(object sender, EventArgs e)
- {
- // Wait(0);
- if (Ison == true)
- {
- if (!Player.Character.isAlive)
- {
- Ison = false; int rand = Ra(0, 6); GTA.Native.Function.Call("FORCE_WEATHER_NOW", rand); Game.DisplayText("INFECTION STOPPED...");
- GTA.Native.Function.Call("SET_MAX_WANTED_LEVEL", 6);
- GTA.Native.Function.Call("DONT_DISPATCH_COPS_FOR_PLAYER", Player, 0);
- }
- else
- {
- int r = Ra(0, 65);
- /*if (r == 2)
- {
- Wait(0);
- Vehicle x = null;
- int a = Ra(0, 26);
- int bb = Ra(-40, 40);
- Vector3 ppp = Player.Character.GetOffsetPosition(new Vector3(bb, 30.0f, -40.0f));
- if (a == 0) { x = GTA.World.CreateVehicle(0x45D56ADA, ppp); }
- else if (a == 1) { x = GTA.World.CreateVehicle(0x7A61B330, ppp); }
- else if (a == 2) { x = GTA.World.CreateVehicle(0x32B91AE8, ppp); }
- else if (a == 3) { x = GTA.World.CreateVehicle(0xD577C962, ppp); }
- else if (a == 4) { x = GTA.World.CreateVehicle(0x73920F8E, ppp); }
- else if (a == 5) { x = GTA.World.CreateVehicle(0x45D56ADA, ppp); }
- else if (a == 6) { x = GTA.World.CreateVehicle(0x50B0215A, ppp); }
- else if (a == 7) { x = GTA.World.CreateVehicle(0x8EB78F5A, ppp); }
- else if (a == 8) { x = GTA.World.CreateVehicle(0xCD935EF9, ppp); }
- else if (a == 9) { x = GTA.World.CreateVehicle(0x72435A19, ppp); }
- else if (a == 10) { x = GTA.World.CreateVehicle(0x31F0B376, ppp); }
- else if (a == 11) { x = GTA.World.CreateVehicle(0x78D70477, ppp); }
- else if (a == 12) { x = GTA.World.CreateVehicle(0x1149422F, ppp); }
- else if (a == 13) { x = GTA.World.CreateVehicle(0x1517D4D9, ppp); }
- else if (a == 14) { x = GTA.World.CreateVehicle(0x73920F8E, ppp); }
- else if (a == 15) { x = GTA.World.CreateVehicle(0x17DF5EC2, ppp); }
- else if (a == 16) { x = GTA.World.CreateVehicle(0x78D70477, ppp); }
- else if (a == 17) { x = GTA.World.CreateVehicle(0xCD935EF9, ppp); }
- else if (a == 18) { x = GTA.World.CreateVehicle(0x1149422F, ppp); }
- else if (a == 19) { x = GTA.World.CreateVehicle(0x8B13F083, ppp); }
- else if (a == 20) { x = GTA.World.CreateVehicle(0x50B0215A, ppp); }
- else if (a == 21) { x = GTA.World.CreateVehicle(0x68E27CB6, ppp); }
- else if (a == 22) { x = GTA.World.CreateVehicle(0x08DE2A8B, ppp); }
- else if (a == 23) { x = GTA.World.CreateVehicle(0x21EEE87D, ppp); }
- else if (a == 24) { x = GTA.World.CreateVehicle(0x22C16A2F, ppp); }
- else if (a == 25) { x = GTA.World.CreateVehicle(0x809AA4CB, ppp); }
- Wait(0);
- if (x != null && x.Exists())
- {
- x.Health = -1000; x.PetrolTankHealth = -0.1F;
- GTA.Native.Function.Call("SET_CAR_COORDINATES", x, x.Position.X, x.Position.Y, x.Position.Z + Ra(10, 350));
- x.Heading = Ra(0, 359);
- Wait(0);
- x.ApplyForce(new Vector3(100.0F, 200.0F, -200000.58F));
- Wait(0);
- x.ApplyForce(new Vector3(500.0F, 200.0F, -20000.58F));
- Wait(0);
- x.NoLongerNeeded();
- }
- }*/
- Vehicle v = null;
- // v = GTA.World.GetClosestVehicle(Player.Character.Position.Around(35.0f), 125.0F); // no car is drivable
- v = GTA.World.GetClosestVehicle(Player.Character.Position.Around(60.0f), 35.0F); // some cars are drivable (player current car wont be touched)
- if (v != null && v.Exists() && v.EngineHealth > 0.0F)
- {
- v.HazardLightsOn = true;
- v.EngineHealth = 0.0F;
- r = Ra(0, 4);
- if (r == 2) { v.PetrolTankHealth = -0.1F; }
- Wait(0); v.NoLongerNeeded();
- }
- GTA.Native.Function.Call("SET_MAX_WANTED_LEVEL", 0);
- GTA.Native.Function.Call("ALTER_WANTED_LEVEL", Player, 0);
- GTA.Native.Function.Call("APPLY_WANTED_LEVEL_CHANGE_NOW", Player);
- GTA.World.PedDensity = 5.0F;
- GTA.World.CarDensity = 0.0F;
- GTA.Native.Function.Call("Request_Anims", "amb@drunk");
- AnimationFlags animflags = AnimationFlags.Unknown11 | AnimationFlags.Unknown09;
- AnimationSet anims = new AnimationSet("amb@drunk");
- GTA.Ped[] pedArray = GTA.World.GetPeds(Player.Character.Position.Around(9.0f), 455.9F, 40);
- foreach (GTA.Ped Pede in pedArray)
- {
- if (!Pede.Exists() || Pede == null || Pede.isRequiredForMission || !Player.Character.isAlive || GTA.Native.Function.Call<bool>("IS_PED_CLIMBING", Pede) ||
- Pede.isGettingIntoAVehicle || Pede.isRagdoll ||
- !Pede.isAlive || Pede == Player.Character)
- {
- continue;
- }
- if (Pede.Exists() && Pede != null)
- {
- GTA.Native.Function.Call("SAY_AMBIENT_SPEECH", Pede, "MOAN", 1, 1, 2);
- if (Pede.isSittingInVehicle())
- {
- Pede.Task.LeaveVehicleImmediately(Pede.CurrentVehicle); Wait(0);
- }
- if (Pede.Exists() && Pede != null && GTA.Native.Function.Call<bool>("IS_CHAR_SITTING_IDLE", Pede))
- {
- Pede.Euphoria.BodyBalance.Start(100); Wait(0);
- }
- if (Pede.Exists() && Pede != null)
- {
- GTA.Native.Function.Call("SET_PED_DONT_DO_EVASIVE_DIVES", Pede, 1);
- GTA.Native.Function.Call("SET_CHAR_SUFFERS_CRITICAL_HITS", Pede, 1);
- Pede.AlwaysDiesOnLowHealth = true;
- GTA.Native.Function.Call("SET_CHAR_MONEY",Pede,0);
- Pede.Health = 600;
- Pede.MakeProofTo(false, false, false, true, false);
- r = Ra(0, 4);
- if ((r == 1) && Pede.Exists() && Pede != null && !GTA.Native.Function.Call<bool>("IS_CHAR_PLAYING_ANIM", Pede, "amb@drunk", "bum_fight") && !GTA.Native.Function.Call<bool>
- ("IS_CHAR_GETTING_UP", Pede) && !Pede.isSittingInVehicle())
- {
- Pede.Task.PlayAnimation(anims, "bum_fight", 10.0F, animflags);
- }
- Pede.DuckWhenAimedAtByGroupMember = false;
- Pede.ChangeRelationship(RelationshipGroup.Player, Relationship.Hate);
- Pede.Weapons.RemoveAll();
- //Pede.CancelAmbientSpeech();
- Pede.Voice = "M_ZOMBIE";
- Pede.SetPathfinding(true, true, true);
- Pede.RelationshipGroup = RelationshipGroup.Player;
- Pede.Task.FightAgainst(Player.Character);
- Pede.Task.GoTo(Player.Character.Position, true);
- //Wait(0);
- GTA.Native.Function.Call("REQUEST_ANIMS", "move_injured_lower");
- }
- if (Pede.Exists() && Pede != null)
- {
- GTA.Native.Function.Call("SET_ANIM_GROUP_FOR_CHAR", Pede, "move_injured_lower"); GTA.Native.Function.Call("Set_Char_Move_Anim_Speed_Multiplier", Pede, 1.6f);
- if (Pede.Exists() && Pede != null)
- {
- float vx = Pede.Velocity.X, vy = Pede.Velocity.Y;
- vx = vx * vx; vy = vy * vy;
- if (Pede.Exists() && Pede != null && (vx < 0.001F) && (vy < 0.001F))// && (vx > 0.00001F) && (vy > 0.00001F)
- {
- GTA.Native.Function.Call("TASK_CLIMB", Pede, 3);
- Wait(0);
- }
- }
- }
- }
- if (Pede.Exists() && Pede != null && (!Pede.isRagdoll) && !GTA.Native.Function.Call<bool>("IS_CHAR_GETTING_UP", Pede) && Pede.isAliveAndWell && Pede.Position.DistanceTo
- (Player.Character.Position) <=
- 1.2f)
- {
- Pede.PreventRagdoll = true;
- if (Pede.Exists() && Pede != null && (!Pede.isRagdoll) && (!Player.Character.isRagdoll) && Player.Character.isAlive && !GTA.Native.Function.Call<bool>("IS_CHAR_PLAYING_ANIM", Pede,
- "amb@drunk", "bum_fight") && !
- GTA.Native.Function.Call<bool>("IS_CHAR_GETTING_UP", Pede))
- Pede.Task.PlayAnimation(anims, "bum_fight", 10.0F, animflags);
- Wait(400);
- Player.Character.Euphoria.BodyBalance.Start(700);
- if (Pede.Position.X < Player.Character.Position.X) { Player.Character.ApplyForce(new Vector3(3.45F, 0.0F, 0.0f)); }
- else { Player.Character.ApplyForce(new Vector3(-3.45F, 0.0F, 0.0f)); }
- if (Pede.Position.Y < Player.Character.Position.Y) { Player.Character.ApplyForce(new Vector3(0.0F, 3.45F, 0.0f)); }
- else { Player.Character.ApplyForce(new Vector3(0.0F, -3.45F, 0.0f)); }
- Player.Character.ApplyForce(new Vector3(0.0F, 0.0F, 0.8f), new Vector3(0.0F, 0.0F, -0.8f));
- Wait(100);
- Player.Character.Health -= 24;
- Pede.PreventRagdoll = false;
- // Wait(0);
- }
- }
- }
- // if (!GTA.Native.Function.Call<bool>("Is_Char_In_Area_2D", Player.Character, 358.4987, 437.2099, 600.0576, -115.1860))
- }
- else
- {
- GTA.Native.Function.Call("DRAW_LIGHT_WITH_RANGE", 468.7595, 391.0586, 8.2811, 250, 20, 20, 9.0F, 95.0F);
- if (GTA.Native.Function.Call<bool>("Is_Char_In_Area_2D", Player.Character, 467.7190, 390.7162, 470.0016, 391.3876) || (isKeyPressed(Settings.GetValueKey("Key", Keys.F8))))
- {
- Ison = true;
- GTA.Native.Function.Call("Do_Screen_Fade_Out", 650);
- Wait(2000);
- int r = Ra(6, 8);
- GTA.Native.Function.Call("FORCE_WEATHER_NOW", r); GTA.Native.Function.Call("SET_TIME_OF_DAY", 0);
- GTA.Native.Function.Call("Do_Screen_Fade_In", 1650);
- Game.DisplayText("INFECTION STARTED!", 5000);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement