Results 1 to 5 of 5
  1. #1
    NETPlocha's Avatar
    Join Date
    Oct 2016
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0

    Question Aimbot C# [HELP]

    Hello guys. I'm starting to learn how to c+p and coding [ lmfao ] but i have a problem. I have source code of external cheat, it's fine but if i use aimbot i gets crash. Can you help me ?

    Of Course C#



    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Numerics;
    using System.Threading;
    using Smurf.GlobalOffensive.Objects;
    using Smurf.GlobalOffensive.Utils;
    
    namespace Smurf.GlobalOffensive.Feauters
    {
        public class AimAssist
        {
            #region Fields
    
            private bool _aimAssistEnabled;
            private WinAPI.VirtualKeyShort _aimKey;
            private bool _aimHumanized;
            private bool _aimSpotted;
            private bool _aimEnemies;
            private bool _aimAllies;
            private int _aimFov;
            private int _aimBone;
            private int _aimSpeed;
    
            private Player _aimTarget;
            private readonly List<Player> _players = new List<Player>();
    
            #endregion
    
            #region Properties
            private Vector3 ViewAngels { get; set; }
            #endregion
    
            #region Methos
    
            public void Update()
            {
                if (!MiscUtils.ShouldUpdate())
                    return;
    
                ReadSettings();
    
                if (!_aimAssistEnabled)
                    return;
    
                GetPlayers();
    
                if (Core.KeyUtils.KeyIsDown(_aimKey))
                {
                    ViewAngels = Core.Memory.Read<Vector3>((IntPtr)(Core.ClientState + Offsets.ClientState.ViewAngles));
    
                    if (_aimTarget == null)
                    {
                        _aimTarget = GetTarget();
                    }
                    else
                    {
                        Aim();
                    }
                }
                if (Core.KeyUtils.KeyWentUp(_aimKey))
                {
                    _aimTarget = null;
                    Thread.Sleep(20);
                }
            }
    
            private void ReadSettings()
            {
                _aimAssistEnabled = Core.Settings.GetBool(Core.LocalPlayerWeapon.WeaponName, "Aim Enabled");
                _aimKey = (WinAPI.VirtualKeyShort)Convert.ToInt32(Core.Settings.GetString(Core.LocalPlayerWeapon.WeaponName, "Aim Key"), 16);
                _aimFov = Core.Settings.GetInt(Core.LocalPlayerWeapon.WeaponName, "Aim Fov");
                _aimHumanized = Core.Settings.GetBool(Core.LocalPlayerWeapon.WeaponName, "Aim Humanized");
                _aimSpotted = Core.Settings.GetBool(Core.LocalPlayerWeapon.WeaponName, "Aim Spotted");
                _aimEnemies = Core.Settings.GetBool(Core.LocalPlayerWeapon.WeaponName, "Aim Enemies");
                _aimAllies = Core.Settings.GetBool(Core.LocalPlayerWeapon.WeaponName, "Aim Allies");
                _aimSpeed = Core.Settings.GetInt(Core.LocalPlayerWeapon.WeaponName, "Aim Speed");
                _aimBone = Core.Settings.GetInt(Core.LocalPlayerWeapon.WeaponName, "Aim Bone");
            }
    
            private void GetPlayers()
            {
                for (var i = 0; i < 64; i++)
                {
                    var entity = new BaseEntity(Core.Objects.GetEntityPtr(i));
    
                    if (!entity.IsValid)
                        continue;
    
                    if (entity.IsPlayer())
                        _players.Add(new Player(Core.Objects.GetEntityPtr(i)));
                }
            }
    
            private void Aim()
            {
                Vector3 destination = AngleToTarget(_aimTarget, _aimBone);
    
    
                //This is pretty shit, needs be worked on.
                if (_aimHumanized)
                {
                    float yScale = 5.7f;
                    float xScale = 1.5f;
    
                    Vector3 vecCurrentViewAngles = ViewAngels;
                    Vector3 vecViewAngleDelta = destination - vecCurrentViewAngles;
    
                    vecViewAngleDelta += new Vector3(vecViewAngleDelta.Y / yScale, vecViewAngleDelta.X / xScale, 0.0f);
                    vecViewAngleDelta /= _aimSpeed;
                    Vector3 vecViewAngles = vecCurrentViewAngles + vecViewAngleDelta;
    
                    SetViewAngles(vecViewAngles);
                }
                else
                {
                    SetViewAngles(destination);
                }
            }
    
            private void SetViewAngles(Vector3 viewAngles)
            {
                viewAngles = viewAngles.ClampAngle();
                viewAngles = viewAngles.NormalizeAngle();
                Core.Memory.Write((IntPtr)(Core.ClientState + Offsets.ClientState.ViewAngles), viewAngles);
            }
    
            private Player GetTarget()
            {
                var tempTargets = _players.Where(p => p.Id != Core.LocalPlayer.Id && p.IsAlive && !p.IsDormant);
                if (_aimSpotted)
                    tempTargets = tempTargets.Where(p => p.SeenBy(Core.LocalPlayer));
                if (_aimEnemies)
                    tempTargets = tempTargets.Where(p => p.Team != Core.LocalPlayer.Team);
                if (_aimAllies)
                    tempTargets = tempTargets.Where(p => p.Team == Core.LocalPlayer.Team);
    
                foreach (Player player in tempTargets)
                {
                    Vector3 dst = AngleToTarget(player, _aimBone);
                    var fov = MathUtils.Fov(ViewAngels, dst, Vector3.Distance(Core.LocalPlayer.Position, player.Position) / 10);
                    Console.WriteLine(fov);
                    if (fov <= _aimFov)
                    {
                        return player;
                    }
                }
                return null;
            }
    
            private Vector3 AngleToTarget(Player target, int boneIndex)
            {
                Vector3 myView = Core.LocalPlayer.Position + Core.LocalPlayer.VecView;
                Vector3 aimView = target.GetBonePos(target, boneIndex);
                Vector3 dst = myView.CalcAngle(aimView);
                dst = dst.NormalizeAngle();
                return dst;
            }
    
            #endregion
        }
    }

  2. #2
    NETPlocha's Avatar
    Join Date
    Oct 2016
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    Any help ?

  3. #3
    CLOUD__'s Avatar
    Join Date
    Jul 2016
    Gender
    female
    Posts
    59
    Reputation
    10
    Thanks
    56
    My Mood
    Doubtful
    Quote Originally Posted by NETPlocha View Post
    Any help ?
    exactly what cheat is this?

  4. #4
    NETPlocha's Avatar
    Join Date
    Oct 2016
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    Smurf.GlobalOffensive

  5. #5
    Smoke's Avatar
    Join Date
    Nov 2014
    Gender
    male
    Posts
    11,899
    Reputation
    2661
    Thanks
    4,610
    My Mood
    Amazed
    Been over a week since last update/bump after answers, assuming solved.

    /Closed.


    CLICK TO BUY NOW!!


    Quote Originally Posted by Liz View Post
    This is my first vouch, ever. Rapidgator account worked perfectly. Would buy in the future.

Similar Threads

  1. [Solved] Black ops aimbot/wallhack help
    By Debruyn in forum Call of Duty Black Ops Help
    Replies: 1
    Last Post: 06-25-2011, 09:32 PM
  2. aimbots need help!!!
    By gunzer6 in forum Alliance of Valiant Arms (AVA) Hacks & Cheats
    Replies: 9
    Last Post: 10-24-2009, 06:02 AM
  3. AIMBOT THREAD HELP.
    By juanrineytor in forum Combat Arms Help
    Replies: 7
    Last Post: 08-24-2009, 05:47 PM
  4. viral v5 aimbot fareal help to make it a pub bot!
    By headsup in forum Combat Arms Hacks & Cheats
    Replies: 5
    Last Post: 04-28-2009, 11:56 AM
  5. can i get a free aimbot? plz help me
    By ataw1957 in forum General Hacking
    Replies: 16
    Last Post: 01-10-2009, 07:29 PM