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?
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);
}
}