Исходник Knifebot из гладиаторза

Забаненный
Статус
Оффлайн
Регистрация
17 Июл 2018
Сообщения
47
Реакции[?]
7
Поинты[?]
0
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Короче це вырезанный найфбот, пастите в вашу щит пасту
Код:
struct Vector3f {
    float x;
    float y;
    float z;
};
 
Vector3f VectorToVector3f(Vector srcVector) {
    Vector3f outPut;
    outPut.x = srcVector.x;
    outPut.y = srcVector.y;
    outPut.z = srcVector.z;
 
    return outPut;
}
 
int distance(Vector3f a, Vector3f b) {
    double distance;
 
    distance = sqrt(((int)a.x - (int)b.x) * ((int)a.x - (int)b.x) +
        ((int)a.y - (int)b.y) * ((int)a.y - (int)b.y) +
        ((int)a.z - (int)b.z) * ((int)a.z - (int)b.z));
 
    return (int)abs(round(distance));
}
 
void DoAngleBullshit(Vector AimPos)
{
    QAngle new_aim_angles = Math::CalcAngle(g_LocalPlayer->GetEyePos(), AimPos);
    Global::userCMD->viewangles = Global::vecVisualAimbotAngs = new_aim_angles;
    Global::vecVisualAimbotAngs += (g_Options.removals_novisualrecoil ? g_LocalPlayer->m_aimPunchAngle() * 2.f : QAngle(0, 0, 0));
    Global::bVisualAimbotting = true;
}
 
void KnifeBot()
{
    if (!g_EngineClient->IsConnected())
        return;
 
    if (!g_EngineClient->IsInGame())
        return;
 
    if (!g_LocalPlayer->IsAlive())
        return;
 
    if (!g_LocalPlayer->m_hActiveWeapon()->HasBullets())
        g_LocalPlayer->knifeBotting = true;
 
    if (!g_LocalPlayer->knifeBotting)
        return;
 
    C_BaseCombatWeapon *localweapon = g_LocalPlayer->m_hActiveWeapon();
 
    if (localweapon->IsGrenade() || localweapon->IsPistol() || localweapon->IsRifle() || localweapon->IsPlantedC4() || localweapon->IsSniper())
        return;
 
    Vector3f myPos;
    Vector3f enemyPos;
 
    for (int PlayerIndex = 0; PlayerIndex < g_EntityList->GetMaxEntities(); PlayerIndex++)
    {
        C_BasePlayer *pEntity = C_BasePlayer::GetPlayerByIndex(PlayerIndex);
 
        if (!pEntity)
            continue;
 
        if (!pEntity->IsPlayer())
            continue;
 
        if (pEntity->EntIndex() == g_LocalPlayer->EntIndex())
            continue;
 
        if (!pEntity->IsAlive())
            continue;
 
        if (pEntity->m_iTeamNum() == g_LocalPlayer->m_iTeamNum())
            continue;
 
        if (pEntity->IsDormant())
            continue;
 
        myPos = VectorToVector3f(g_LocalPlayer->m_vecOrigin());
        enemyPos = VectorToVector3f(pEntity->m_vecOrigin());
 
        if ((distance(myPos, enemyPos) <= 82) && (distance(myPos, enemyPos) > 50)) {
            DoAngleBullshit(pEntity->GetHitboxPos(HITBOX_CHEST));
            Global::userCMD->buttons |= IN_ATTACK;
            continue;
        }
        else if (distance(myPos, enemyPos) <= 50) {
            DoAngleBullshit(pEntity->GetHitboxPos(HITBOX_CHEST));
            if (pEntity->m_iHealth() > 55) {
                Global::userCMD->buttons |= IN_ATTACK;
            }
            else {
                if (pEntity->m_iHealth() > 44) {
                    Global::userCMD->buttons |= IN_ATTACK2;
                }
                else {
                    Global::userCMD->buttons |= IN_ATTACK;
                }
            }
            continue;
        }
    }
}
 
Сверху Снизу