abyan (05-22-2018),gaerGAERHGaerherh (05-21-2018),vaisefud3 (05-21-2018)
Credit(s) : N7Code:float GetDistance(float Xx, float Yy, float xX, float yY) { return sqrt((yY - Yy) * (yY - Yy) + (xX - Xx) * (xX - Xx)); } int cAimbot::GetNearestByCrossHair(LPDIRECT3DDEVICE9 pDevice) { DWORD CShell = (DWORD)GetModuleHandleA(eCShell); int iAimAt = -1; float MaxDistance = 0xFFFFFFF; D3DVIEWPORT9 viewP; pDevice->GetViewport(&viewP); float ScreenX = viewP.Width / 2; float ScreenY = viewP.Height / 2; DWORD pLTClientShell = *(DWORD*)(aLTClientShell); if (pLTClientShell != NULL) { CPlayer* Me = GetPlayerByIndex(pLTClientShell, Engine->GetMyIndex(pLTClientShell)); for (int i = 0; i < 16; i++) { CPlayer* pPlayer = GetPlayerByIndex(pLTClientShell, i); D3DXVECTOR3 pos = Engine->GetBonePosition(pPlayer->Object, 6); if (!Engine->isValidClient(pPlayer) && Me != pPlayer) continue; if (Engine->IsTM(Me, pPlayer)) continue; if (Engine->WorldToScreen(pDevice, &pos)) { float radiusx = (3*5.0f) * (ScreenX / 100.0f); float radiusy = (3*5.0f) * (ScreenY / 100.0f); float Tmp = GetDistance(pos.x, pos.y, ScreenX, ScreenY); //if in fov if (pos.x >= ScreenX - radiusx && pos.x <= ScreenX + radiusx && pos.y >= ScreenY - radiusy && pos.y <= ScreenY + radiusy) { if (Tmp < MaxDistance) { MaxDistance = Tmp; iAimAt = i; } } } } } return iAimAt; } then use mouse_event :D
Last edited by jayjay153; 05-20-2018 at 11:05 PM.
abyan (05-22-2018),gaerGAERHGaerherh (05-21-2018),vaisefud3 (05-21-2018)
jayjay153 (05-21-2018)
no dont think so .. he didnt check for crosshair target (trigger) .. he is getting the best target index..
u can use mouse_event for aimbot !
u are right if u are talking about closest distance target
but he is getting closest to crosshair and look at this condition :
he wont get anyone not visible on the screen at the moment anyway
Code:if (Engine->WorldToScreen(pDevice, &pos))
Private Project :
@vaisefud3 @jayjay153
anyway quick suggestion to the client_error ,, try not change it > 90~120 degree at a time
something like this : (not tested)
i think 0.5 is fine as it will be called in endscene anyway cuz u need max 4 frames.. won't be noticeable
Code:if ( abs(newYaw-oldYaw) > (PI*0.5) ) { if ((newYaw - oldYaw) < 0) { *(float*)(CPLAYER + yawOffset) -= (PI*0.5); } else { *(float*)(CPLAYER + yawOffset) += (PI*0.5); } } else { *(float*)(CPLAYER + yawOffset) = newYaw; }
Last edited by I2espect; 05-24-2018 at 02:21 AM.
Private Project :
This code is for aim sensitivity ?
To avoid quick aim
Ahhh ok. I have the idea.