Наследование: BaseEntity
 public CSPlayer(CSPlayer copyFrom)
     : base(copyFrom)
 {
     this.CopyFieldsFrom(copyFrom);
     iWeaponIndex = 0;
     this.Bones = copyFrom.Bones;
 }
Пример #2
0
 public CSLocalPlayer(CSPlayer player)
     : base(player)
 {
     this.CopyFieldsFrom(player);
     this.AddField <Vector3>("CSLocalPlayer.m_vecViewOffset", CSGOOffsets.NetVars.LocalPlayer.m_vecViewOffset);
     this.AddField <Vector3>("CSLocalPlayer.m_vecPunch", CSGOOffsets.NetVars.LocalPlayer.m_vecPunch);
     this.AddField <int>("CSLocalPlayer.m_iShotsFired", CSGOOffsets.NetVars.LocalPlayer.m_iShotsFired);
     this.AddField <int>("CSLocalPlayer.m_iCrosshairIdx", CSGOOffsets.NetVars.LocalPlayer.m_iCrosshairIdx);
 }
Пример #3
0
 public CSLocalPlayer(CSPlayer player)
     : base(player)
 {
     this.CopyFieldsFrom(player);
     this.AddField<Vector3>("CSLocalPlayer.m_vecViewOffset", CSGOOffsets.NetVars.LocalPlayer.m_vecViewOffset);
     this.AddField<Vector3>("CSLocalPlayer.m_vecPunch", CSGOOffsets.NetVars.LocalPlayer.m_vecPunch);
     this.AddField<int>("CSLocalPlayer.m_iShotsFired", CSGOOffsets.NetVars.LocalPlayer.m_iShotsFired);
     this.AddField<int>("CSLocalPlayer.m_iCrosshairIdx", CSGOOffsets.NetVars.LocalPlayer.m_iCrosshairIdx);
 }
Пример #4
0
        public void DoAimbot()
        {
            if (LocalPlayer == null)
            {
                return;
            }
            var valid = Players.Where(x => x.Item2.IsValid() && x.Item2.m_iHealth != 0 && x.Item2.m_iDormant != 1);

            if (WithOverlay.ConfigUtils.GetValue <bool>("aimFilterSpotted"))
            {
                valid = valid.Where(x => x.Item2.SeenBy(LocalPlayer));
            }
            if (WithOverlay.ConfigUtils.GetValue <bool>("aimFilterSpottedBy"))
            {
                valid = valid.Where(x => LocalPlayer.SeenBy(x.Item2));
            }
            if (WithOverlay.ConfigUtils.GetValue <bool>("aimFilterEnemies"))
            {
                valid = valid.Where(x => x.Item2.m_iTeamNum != LocalPlayer.m_iTeamNum);
            }
            if (WithOverlay.ConfigUtils.GetValue <bool>("aimFilterAllies"))
            {
                valid = valid.Where(x => x.Item2.m_iTeamNum == LocalPlayer.m_iTeamNum);
            }

            valid = valid.OrderBy(x => (x.Item2.m_vecOrigin - LocalPlayer.m_vecOrigin).Length());
            Vector3 closest    = Vector3.Zero;
            float   closestFov = float.MaxValue;

            foreach (Tuple <int, CSPlayer> tpl in valid)
            {
                CSPlayer plr       = tpl.Item2;
                Vector3  newAngles = MathUtils.CalcAngle(LocalPlayer.m_vecOrigin + LocalPlayer.m_vecViewOffset, plr.Bones.GetBoneByIndex(WithOverlay.ConfigUtils.GetValue <int>("aimBone"))) - NewViewAngles;
                newAngles = MathUtils.ClampAngle(newAngles);
                float fov = newAngles.Length() % 360f;
                if (fov < closestFov && fov < WithOverlay.ConfigUtils.GetValue <float>("aimFov"))
                {
                    closestFov = fov;
                    closest    = newAngles;
                }
            }
            if (closest != Vector3.Zero)
            {
                DoRCS(true);
                if (WithOverlay.ConfigUtils.GetValue <bool>("aimSmoothEnabled"))
                {
                    NewViewAngles = MathUtils.SmoothAngle(NewViewAngles, NewViewAngles + closest, WithOverlay.ConfigUtils.GetValue <float>("aimSmoothValue"));
                }
                else
                {
                    NewViewAngles += closest;
                }
                NewViewAngles = NewViewAngles;
            }
        }
Пример #5
0
 public void DoTriggerbot()
 {
     if (LocalPlayer != null && !TriggerShooting)
     {
         if (Players.Count(x => x.Item2.m_iID == LocalPlayer.m_iCrosshairIdx) > 0)
         {
             CSPlayer player = Players.First(x => x.Item2.m_iID == LocalPlayer.m_iCrosshairIdx).Item2;
             if ((WithOverlay.ConfigUtils.GetValue <bool>("triggerFilterEnemies") && player.m_iTeamNum != LocalPlayer.m_iTeamNum) ||
                 (WithOverlay.ConfigUtils.GetValue <bool>("triggerFilterAllies") && player.m_iTeamNum == LocalPlayer.m_iTeamNum))
             {
                 if (!TriggerOnTarget)
                 {
                     TriggerOnTarget   = true;
                     TriggerLastTarget = DateTime.Now.Ticks;
                 }
                 else
                 {
                     if (new TimeSpan(DateTime.Now.Ticks - TriggerLastTarget).TotalMilliseconds >= WithOverlay.ConfigUtils.GetValue <float>("triggerDelayFirstShot"))
                     {
                         if (new TimeSpan(DateTime.Now.Ticks - TriggerLastShot).TotalMilliseconds >= WithOverlay.ConfigUtils.GetValue <float>("triggerDelayShots"))
                         {
                             TriggerLastShot = DateTime.Now.Ticks;
                             if (!TriggerShooting)
                             {
                                 if (WithOverlay.ConfigUtils.GetValue <bool>("triggerBurstRandomize"))
                                 {
                                     TriggerBurstCount = new Random().Next(1, (int)WithOverlay.ConfigUtils.GetValue <float>("triggerBurstShots"));
                                 }
                                 else
                                 {
                                     TriggerBurstCount = (int)WithOverlay.ConfigUtils.GetValue <float>("triggerBurstShots");
                                 }
                             }
                             TriggerShooting = true;
                         }
                     }
                 }
             }
             else
             {
                 TriggerOnTarget = false;
             }
         }
     }
 }
 public CSPlayer(CSPlayer copyFrom) : base(copyFrom)
 {
     this.CopyFieldsFrom(copyFrom);
     iWeaponIndex = 0;
     this.Bones   = copyFrom.Bones;
 }