-
Автор темы
- #1
Специально для пастеров Spambotа
1 - открыть сурс
2 - открыть файл Aimbot.cpp
3 - долистать (в файле Aimbot.cpp) до std::vector<Vector> CAimbot::GetMultiplePointsForHitbox(SDK::CBaseEntity* local, SDK::CBaseEntity* entity, int iHitbox, VMatrix BoneMatrix[128]) - примерно 1000 строка
4 - заменить GetMultiplePointsForHitbox, get_hitbox_pos, multipoint и point на данный код
5 - открыть файл menu_init.cpp
6 - добавить в рагебот табе этот код
1 - открыть сурс
2 - открыть файл Aimbot.cpp
3 - долистать (в файле Aimbot.cpp) до std::vector<Vector> CAimbot::GetMultiplePointsForHitbox(SDK::CBaseEntity* local, SDK::CBaseEntity* entity, int iHitbox, VMatrix BoneMatrix[128]) - примерно 1000 строка
4 - заменить GetMultiplePointsForHitbox, get_hitbox_pos, multipoint и point на данный код
Код:
std::vector<Vector> CAimbot::GetMultiplePointsForHitbox(SDK::CBaseEntity* local, SDK::CBaseEntity* entity, int iHitbox, VMatrix BoneMatrix[128])
{
auto VectorTransform_Wrapper = [](const Vector& in1, const VMatrix &in2, Vector &out)
{
auto VectorTransform = [](const float *in1, const VMatrix& in2, float *out)
{
auto DotProducts = [](const float *v1, const float *v2)
{
return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
};
out[0] = DotProducts(in1, in2[0]) + in2[0][3];
out[1] = DotProducts(in1, in2[1]) + in2[1][3];
out[2] = DotProducts(in1, in2[2]) + in2[2][3];
};
VectorTransform(&in1.x, in2, &out.x);
};
SDK::studiohdr_t* pStudioModel = INTERFACES::ModelInfo->GetStudioModel(entity->GetModel());
SDK::mstudiohitboxset_t* set = pStudioModel->pHitboxSet(0);
SDK::mstudiobbox_t *hitbox = set->GetHitbox(iHitbox);
std::vector<Vector> vecArray;
Vector max;
Vector min;
VectorTransform_Wrapper(hitbox->bbmax, BoneMatrix[hitbox->bone], max);
VectorTransform_Wrapper(hitbox->bbmin, BoneMatrix[hitbox->bone], min);
auto center = (min + max) * 0.5f;
Vector CurrentAngles = UTILS::CalcAngle(center, local->GetEyePosition());
Vector Forward;
MATH::AngleVectors(CurrentAngles, &Forward);
Vector Right = Forward.Cross(Vector(0, 0, 1));
Vector Left = Vector(-Right.x, -Right.y, Right.z);
Vector Top = Vector(0, 0, 1);
Vector Bot = Vector(0, 0, -1);
switch (iHitbox) {
case 0:
for (auto i = 0; i < 4; ++i)
vecArray.emplace_back(center);
vecArray[1] += Top * (hitbox->radius * SETTINGS::settings.point_val);
vecArray[2] += Right * (hitbox->radius * SETTINGS::settings.point_val);
vecArray[3] += Left * (hitbox->radius * SETTINGS::settings.point_val);
break;
default:
for (auto i = 0; i < 3; ++i)
vecArray.emplace_back(center);
vecArray[1] += Right * (hitbox->radius * SETTINGS::settings.body_val);
vecArray[2] += Left * (hitbox->radius * SETTINGS::settings.body_val);
break;
}
return vecArray;
}
Vector CAimbot::get_hitbox_pos(SDK::CBaseEntity* entity, int hitbox_id)
{
auto getHitbox = [](SDK::CBaseEntity* entity, int hitboxIndex) -> SDK::mstudiobbox_t*
{
if (entity->GetIsDormant() || entity->GetHealth() <= 0) return NULL;
const auto pModel = entity->GetModel();
if (!pModel) return NULL;
auto pStudioHdr = INTERFACES::ModelInfo->GetStudioModel(pModel);
if (!pStudioHdr) return NULL;
auto pSet = pStudioHdr->pHitboxSet(0);
if (!pSet) return NULL;
if (hitboxIndex >= pSet->numhitboxes || hitboxIndex < 0) return NULL;
return pSet->GetHitbox(hitboxIndex);
};
auto hitbox = getHitbox(entity, hitbox_id);
if (!hitbox) return Vector(0, 0, 0);
auto bone_matrix = entity->GetBoneMatrix(hitbox->bone);
Vector bbmin, bbmax;
MATH::VectorTransform(hitbox->bbmin, bone_matrix, bbmin);
MATH::VectorTransform(hitbox->bbmax, bone_matrix, bbmax);
return (bbmin + bbmax) * 0.5f;
}
Vector CAimbot::multipoint(SDK::CBaseEntity* entity, int option)
{
auto local_player = INTERFACES::ClientEntityList->GetClientEntity(INTERFACES::Engine->GetLocalPlayer());
if (!local_player) return Vector(0, 0, 0);
Vector vector_best_point = Vector(0, 0, 0);
int maxDamage = SETTINGS::settings.damage_val;
VMatrix matrix[128];
if (!entity->SetupBones(matrix, 128, 256, 0)) return Vector(0, 0, 0);
if (SETTINGS::settings.Head1)
{
int hitboxes[] = { SDK::HitboxList::HITBOX_HEAD, SDK::HitboxList::HITBOX_NECK };
for (int i = 0; i < ARRAYSIZE(hitboxes); i++)
{
for (auto point : GetMultiplePointsForHitbox(local_player, entity, hitboxes[i], matrix))
{
int damage = autowall->CalculateDamage(local_player->GetEyePosition(), point, local_player, entity).damage;
if (damage > maxDamage)
{
bestHitbox = hitboxes[i];
maxDamage = damage;
vector_best_point = point;
if (maxDamage >= entity->GetHealth())
return vector_best_point;
}
}
}
}
if (SETTINGS::settings.Chest1)
{
int hitboxes[] = { SDK::HitboxList::HITBOX_CHEST, SDK::HitboxList::HITBOX_UPPER_CHEST, SDK::HitboxList::HITBOX_THORAX };
for (int i = 0; i < ARRAYSIZE(hitboxes); i++)
{
for (auto point : GetMultiplePointsForHitbox(local_player, entity, hitboxes[i], matrix))
{
int damage = autowall->CalculateDamage(local_player->GetEyePosition(), point, local_player, entity).damage;
if (damage > maxDamage)
{
bestHitbox = hitboxes[i];
maxDamage = damage;
vector_best_point = point;
if (maxDamage >= entity->GetHealth())
return vector_best_point;
}
}
}
}
if (SETTINGS::settings.Palvis1)
{
int hitboxes[] = { SDK::HitboxList::HITBOX_PELVIS, SDK::HitboxList::HITBOX_MAX, SDK::HitboxList::HITBOX_BODY, SDK::HitboxList::HITBOX_RIGHT_THIGH, SDK::HitboxList::HITBOX_LEFT_THIGH };
for (int i = 0; i < ARRAYSIZE(hitboxes); i++)
{
for (auto point : GetMultiplePointsForHitbox(local_player, entity, hitboxes[i], matrix))
{
int damage = autowall->CalculateDamage(local_player->GetEyePosition(), point, local_player, entity).damage;
if (damage > maxDamage)
{
bestHitbox = hitboxes[i];
maxDamage = damage;
vector_best_point = point;
if (maxDamage >= entity->GetHealth())
return vector_best_point;
}
}
}
}
if (SETTINGS::settings.Arms1)
{
int hitboxes[] = { SDK::HitboxList::HITBOX_LEFT_FOREARM, SDK::HitboxList::HITBOX_RIGHT_FOREARM };
for (int i = 0; i < ARRAYSIZE(hitboxes); i++)
{
for (auto point : GetMultiplePointsForHitbox(local_player, entity, hitboxes[i], matrix))
{
int damage = autowall->CalculateDamage(local_player->GetEyePosition(), point, local_player, entity).damage;
if (damage > maxDamage)
{
bestHitbox = hitboxes[i];
maxDamage = damage;
vector_best_point = point;
if (maxDamage >= entity->GetHealth())
return vector_best_point;
}
}
}
}
if (SETTINGS::settings.Legs1)
{
int hitboxes[] = { SDK::HitboxList::HITBOX_LEFT_FOOT, SDK::HitboxList::HITBOX_RIGHT_FOOT, SDK::HitboxList::HITBOX_RIGHT_CALF, SDK::HitboxList::HITBOX_RIGHT_CALF };
for (int i = 0; i < ARRAYSIZE(hitboxes); i++)
{
for (auto point : GetMultiplePointsForHitbox(local_player, entity, hitboxes[i], matrix))
{
int damage = autowall->CalculateDamage(local_player->GetEyePosition(), point, local_player, entity).damage;
if (damage > maxDamage)
{
bestHitbox = hitboxes[i];
maxDamage = damage;
vector_best_point = point;
if (maxDamage >= entity->GetHealth())
return vector_best_point;
}
}
}
}
return vector_best_point;
}
6 - добавить в рагебот табе этот код
Код:
Checkbox("Hitscan", SETTINGS::settings.acc_type);
if (SETTINGS::settings.acc_type)
{
Checkbox("Head", SETTINGS::settings.Head1);
Checkbox("Chest", SETTINGS::settings.Chest1);
Checkbox("Pelvis", SETTINGS::settings.Palvis1);
Checkbox("Arms", SETTINGS::settings.Arms1);
Checkbox("Legs", SETTINGS::settings.Legs1);
}