public override void OnPlayerKilled(Entity player, Entity inflictor, Entity attacker, int damage, string mod, string weapon, Vector3 dir, string hitLoc) { if (Primers.Contains(player)) { GSCFunctions.MagicBullet("uav_strike_missile_mp", player.Origin, player.Origin - new Vector3(0, 0, 4), player); Primers.Remove(player); } }
internal static void MissileStrike(Entity sender) { Random rand = new Random(DateTime.Now.Millisecond); int Height = 10000; int number = BaseScript.Players.Count; for (int i = 0; i < number; i++) { if (i < number /* && BaseScript.Players[i] != sender*/) { if (!BaseScript.Players[i].IsAlive || (BaseScript.Players[i].SessionTeam == sender.SessionTeam && sender.SessionTeam != "none")) { return; } Vector3 dest0 = BaseScript.Players[i].Origin; Vector3 dest1 = BaseScript.Players[i].Origin; if (rand.Next(0, 1000) > 500) { dest0.Z += Height; dest0.X += rand.Next(0, 5000); dest0.Y += rand.Next(0, 5000); //dest1.Z -= Height; //dest1.X -= rand.Next(0, 1000); //dest1.Y -= rand.Next(0, 100); } else { dest0.Z += Height; dest0.X -= rand.Next(0, 5000); dest0.Y -= rand.Next(0, 5000); //dest1.Z -= Height; //dest1.X += rand.Next(0, 1000); //dest1.Y += rand.Next(0, 100); } GSCFunctions.MagicBullet("uav_strike_projectile_mp", dest0, dest1, sender); } } }
internal static void SetupSilentAim() { const string aimFrom = "j_head"; const string aimAt = "j_mainroot"; if (!RegisteredSilentAim) { Events.WeaponFired.Add((senderArgs, args) => { Entity sender = senderArgs as Entity; if (sender.IsFieldTrue("EnableSilentAim")) { foreach (Entity ent in BaseScript.Players) { if (sender == ent || !ent.IsAlive || ent.SessionTeam == "spectator") { continue; } if (GSCFunctions.SightTracePassed(sender.GetTagOrigin(aimFrom), ent.GetTagOrigin(aimAt), false)) { Vector3 angles = GSCFunctions.VectorToAngles(ent.GetTagOrigin(aimAt) - sender.GetTagOrigin(aimFrom)); if (sender.GetPlayerAngles().DistanceToAngle(angles) < 15) { GSCFunctions.MagicBullet(sender.GetCurrentWeapon(), sender.GetTagOrigin("tag_weapon_right"), ent.GetTagOrigin(aimAt), sender); break; } } } } }); RegisteredSilentAim = true; } }
internal static void DoAimbot(Entity sender) { const string aimFrom = "j_head"; const string aimAt = "j_mainroot"; BaseScript.OnInterval(1, () => { if (!sender.IsAlive || sender.SessionTeam == "spectator" || sender.SessionState != "playing") { return(true); } if (!sender.IsFieldTrue("EnableAimbot")) { return(false); } Entity target = null; foreach (Entity ent in BaseScript.Players) { if (!ent.IsAlive || ent == sender) { continue; } if (sender.SessionTeam == ent.SessionTeam && (sender.SessionTeam != "none" || ent.SessionTeam == "spectator")) { continue; } if (!GSCFunctions.SightTracePassed(sender.GetTagOrigin(aimFrom), ent.GetTagOrigin(aimAt), false)) { continue; } if (target != null) { if (GSCFunctions.Closer(target.GetTagOrigin(aimAt), sender.GetTagOrigin(aimFrom), ent.GetTagOrigin(aimAt))) { target = ent; } } else { target = ent; } if (target != null && target.IsAlive) { Vector3 aim = GSCFunctions.VectorToAngles(target.GetTagOrigin(aimAt) - sender.GetTagOrigin(aimFrom)); aim.Z = sender.GetPlayerAngles().Z; sender.SetPlayerAngles(aim); GSCFunctions.MagicBullet(sender.GetCurrentWeapon(), sender.GetTagOrigin(aimFrom), target.GetTagOrigin(aimAt), sender); } } return(true); }); }