TriggerBot shooting everyone
Hello guys so i made a trigger bot but the problem is that he shoot everyone , friendly or enemy i dont know where the problem is tried a couple of change and the result was , either he shoot everyone or he dosent shoot at all if some one could fix the error on my code i will be thank full
Code:
if (MyCross > 0 && MyCross < 11 ) /*i chosed to loop for only 10 player
{
ReadProcessMemory(csProcess, (LPCVOID)(ProgAdr + Entitylist + Numplayer -1 * Distance), &Thereinfo, sizeof(DWORD), 0);
ReadProcessMemory(csProcess, (LPCVOID)(Thereinfo + Tnumber), &Thereteam, sizeof(DWORD), 0);
}
if ((Thereteam != MyTeam) && (Thereteam > 0))
{
WriteProcessMemory(csProcess, (LPVOID)(ProgAdr + InShoot), &Shoot, sizeof(DWORD), 0);
Sleep(25);
WriteProcessMemory(csProcess, (LPVOID)(ProgAdr + InShoot), &Nshoot, sizeof(DWORD), 0);
}
}