Trigger Bot Problem in C#

Posts 1–2 of 2 · Page 1 of 1
Trigger Bot Problem in C#
When my crosshair point at my teammates and enemy it also will auto shoot... Any problem in my code?
How to fix friendly fire occur?



Code:
public static void triggered()
        {
            MemoryManagment mem = new MemoryManagment();
            if (!mem.Initialize())
            {
                Console.ReadKey();
                Environment.Exit(-1);
            }

            while (true)
            {
                uint pLocal = mem.Read<uint>((IntPtr)(mem.clientBaseAddres.ToInt64() + Offsets.m_dwLocalPlayer));
                int myTeam = mem.Read<int>((IntPtr)(pLocal + Offsets.team));
                int crossID = mem.Read<int>((IntPtr)(pLocal + Offsets.m_iCrossHairID));              
                if (crossID < 64 && crossID > 0)
                {


                    if (toggle)
                    {
                        Thread.Sleep(delay);

                        mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
                        Thread.Sleep(delay);
                        mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
                    }
                    else if (!toggle)
                    {
                        //   Console.WriteLine("Wait!");
                    }
                }
                Thread.Sleep(1);
            }
        }
you have to get the entity from crosshair id, read his team and compare with the local one
Posts 1–2 of 2 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us