Beispiel #1
0
        private static void Triggerbot()
        {
            while (Options.TriggerbotIsEnabled)
            {
                if (PinvokeWrapper.GetTheKeyState(KeyCodes.ALT_KEY) == 0)
                {
                    continue;
                }

                //We get the local player
                var localPlayer = Utils.GetLocalPlayer();

                //We get the crosshair ID
                var crosshairId = PinvokeWrapper.ReadAddInt((IntPtr)localPlayer.BaseAddress + Offsets.m_iCrosshairId, Utils.CsgoHandle);

                if (crosshairId > 0 && crosshairId <= 64)
                {
                    //We get the enemy at our crosshair
                    var enemy = new Player(PinvokeWrapper.ReadAddInt(Utils.ClientBaseAddress + Offsets.dwEntityList + ((crosshairId - 1) * 0x10), Utils.CsgoHandle));

                    //If the enemy is alive and is not one of our teammates
                    if (enemy.GetHealth() > 0 && localPlayer.GetTeam() != enemy.GetTeam())
                    {
                        //We shoot
                        PinvokeWrapper.DoubleClick();
                    }
                }

                //Sleep for 3 milliseconds
                Thread.Sleep(3);
            }
        }
Beispiel #2
0
        public static List <Player> GetPlayers()
        {
            //Create new list of players
            var playerList = new List <Player>();

            //Get our local player
            var localPlayer = GetLocalPlayer();

            for (int i = 0; i < 64; i++)
            {
                //Get the next player
                var playerBase = PinvokeWrapper.ReadAddInt(ClientBaseAddress + Offsets.dwEntityList + (i * 0x10), CsgoHandle);

                //If the player doesn't exist, we continue looping
                if (playerBase == 0)
                {
                    continue;
                }

                //We make sure we do not include our self in the list
                if (playerBase != localPlayer.BaseAddress)
                {
                    playerList.Add(new Player(playerBase));
                }
            }

            //Return the player list
            return(playerList);
        }
Beispiel #3
0
        public bool IsDormant()
        {
            //Check if player is dormant
            var isDormant = PinvokeWrapper.ReadAddInt((IntPtr)BaseAddress + Offsets.m_bDormant, Utils.CsgoHandle);

            //Return the result
            return(isDormant != 0);
        }
Beispiel #4
0
        public static Player GetLocalPlayer()
        {
            //Get the base address of
            var localPlayer = PinvokeWrapper.ReadAddInt(ClientBaseAddress + Offsets.dwLocalPlayer, CsgoHandle);

            //return our new class
            return(new Player(localPlayer));
        }
Beispiel #5
0
        private static void DrawPlayerGlow(PlayerGlowStruct playerStruct, int glowIndex)
        {
            //We ge the glow object manager
            var glowObjectManager = PinvokeWrapper.ReadAddInt(Utils.ClientBaseAddress + Offsets.dwGlowObjectManager, Utils.CsgoHandle);

            //We write the struct to memory
            PinvokeWrapper.WriteFloat((IntPtr)glowObjectManager + glowIndex * 0x38 + 0x4, Utils.CsgoHandle, playerStruct.Red);
            PinvokeWrapper.WriteFloat((IntPtr)glowObjectManager + glowIndex * 0x38 + 0x8, Utils.CsgoHandle, playerStruct.Green);
            PinvokeWrapper.WriteFloat((IntPtr)glowObjectManager + glowIndex * 0x38 + 0xC, Utils.CsgoHandle, playerStruct.Blue);
            PinvokeWrapper.WriteFloat((IntPtr)glowObjectManager + glowIndex * 0x38 + 0x10, Utils.CsgoHandle, playerStruct.Alpha);
            PinvokeWrapper.WriteFloat((IntPtr)glowObjectManager + glowIndex * 0x38 + 0x10, Utils.CsgoHandle, playerStruct.Alpha);
            PinvokeWrapper.WriteBool((IntPtr)glowObjectManager + glowIndex * 0x38 + 0x24, Utils.CsgoHandle, playerStruct.RenderOccluded);
            PinvokeWrapper.WriteBool((IntPtr)glowObjectManager + glowIndex * 0x38 + 0x25, Utils.CsgoHandle, playerStruct.RenderUnoccluded);
        }
Beispiel #6
0
        public Vector2 GetBonePos(int boneId)
        {
            //Create a new vector to save the 2d bone coordinates later
            var player2DPosition = new Vector2();

            //Get the bone matrix
            var boneMatrix = PinvokeWrapper.ReadAddInt((IntPtr)BaseAddress + Offsets.m_dwBoneMatrix, Utils.CsgoHandle);

            //Get the world coordinates of the player's bone
            var playerBoneX = PinvokeWrapper.ReadAddFloat((IntPtr)boneMatrix + 0x30 * boneId + 0x0C, Utils.CsgoHandle);
            var playerBoneY = PinvokeWrapper.ReadAddFloat((IntPtr)boneMatrix + 0x30 * boneId + 0x1C, Utils.CsgoHandle);
            var playerBoneZ = PinvokeWrapper.ReadAddFloat((IntPtr)boneMatrix + 0x30 * boneId + 0x2C, Utils.CsgoHandle);

            //Convert the world coordinates to screen coordinates
            Utils.WorldToScreen(new Vector3(playerBoneX, playerBoneY, playerBoneZ), player2DPosition);

            //Return the result
            return(player2DPosition);
        }
Beispiel #7
0
 public int GetGlowIndex()
 {
     return(PinvokeWrapper.ReadAddInt((IntPtr)BaseAddress + Offsets.m_iGlowIndex, Utils.CsgoHandle));
 }
Beispiel #8
0
 public int GetArmor()
 {
     return(PinvokeWrapper.ReadAddInt((IntPtr)BaseAddress + Offsets.m_ArmorValue, Utils.CsgoHandle));
 }
Beispiel #9
0
 public int GetHealth()
 {
     return(PinvokeWrapper.ReadAddInt((IntPtr)BaseAddress + Offsets.m_iHealth, Utils.CsgoHandle));
 }
Beispiel #10
0
 public int GetTeam()
 {
     return(PinvokeWrapper.ReadAddInt((IntPtr)BaseAddress + Offsets.m_iTeamNum, Utils.CsgoHandle));
 }