1 -> Read Crosshair offset (u can get offsets in offset topic, somewhere in this forum, just search "csgo offsets");
2 -> if Crosshair offset greater than 0 and less or equal 65 (thats the id of the player that is in your crosshair), then read id base by
Code:
readProcessMemory(handle, LPVOID(clientdll + entitylistoffset + ((chrosshair -1) * 0x10), &address, sizeof(DWORD), null);
the reason of (chrosshair -1) its becuz the crosshair offset aways adds 1 to playerID, and the reason of the 0x10 its because each entity is 0x10 away from another..
>then read player team
Code:
readProcessMemory(handle, LPVOID(address+iTeamNumOffset), &Enemyteam, sizeof(int), null);
>read your playerbase
Code:
readProcessMemory(handle, LPVOID(clientdll+localplayerOffset), &LocalPlayer, sizeof(DWORD), null);
then read your team
Code:
readProcessMemory(handle, LPVOID(LocalPlayer+iTeamNumOffset), &PlayerTeam, sizeof(int), null);
compare if (Enemyteam != PlayerTeam)
if true
Code:
WriteProcessMemory(gHandle, LPVOID(modAddress + forceAttack), &jump, sizeof(int), NULL);
Sleep(10);
WriteProcessMemory(gHandle, LPVOID(modAddress + forceAttack), &dJump, sizeof(int), NULL);
Sleep(10);
That's my shit codded external trigger:
in main():
Code:
bool legit = 0;
while(1){
if (GetAsyncKeyState(VK_F1) & 1) legit = !legit //toggle legit mode pressing f1
if (GetAsyncKeyState(VK_MENU) & 0x8000) //while alt is pressed
{
TriggerBot(gHandle, legit)
}
}
Code:
void lerDadosLocPlayer(HANDLE gHandle){
ReadProcessMemory(gHandle, LPVOID(PlayerBase + teamNum), &playerTeam, sizeof(playerTeam), NULL);
ReadProcessMemory(gHandle, LPVOID(PlayerBase + crosshairId), &enemyinCH, sizeof(enemyinCH), NULL);
}
Code:
void TriggerBot(HANDLE gHandle, bool legit){
lerDadosLocPlayer(gHandle);
if (enemyinCH > 0 && enemyinCH < 65){
ReadProcessMemory(gHandle, LPVOID(modAddress + entityListO + ((enemyinCH - 1) * 0x10)), &enemyBase, sizeof(enemyBase), NULL);
ReadProcessMemory(gHandle, LPVOID(enemyBase + teamNum), &EnemyTeam, sizeof(EnemyTeam), NULL);
if (EnemyTeam != playerTeam){
if (legit) Sleep(150); //if legit option = true, sleep 150ms before shoots!
WriteProcessMemory(gHandle, LPVOID(modAddress + forceAttack), &jump, sizeof(int), NULL);
Sleep(50);
WriteProcessMemory(gHandle, LPVOID(modAddress + forceAttack), &dJump, sizeof(int), NULL);
Sleep(20);
}
}
}