Подпишитесь на наш Telegram-канал, чтобы всегда быть в курсе важных обновлений! Перейти

Исходник SMAC TriggerBot

substandard rank
Забаненный
Забаненный
Статус
Оффлайн
Регистрация
21 Янв 2019
Сообщения
429
Реакции
113
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Code for CSGOSimple

C++:
Expand Collapse Copy
//includes
#include "aimbot.hpp"

#include "../../valve_sdk/math/Vector.hpp"

#include "../../helpers/math.hpp"

#include "../../options.hpp"

#include "../../helpers/input.hpp"

#include <WinUser.h>

//triggerbot
void Aimbot::SafeTrigger()
{

    if (!g_LocalPlayer || !g_LocalPlayer->IsAlive() || g_LocalPlayer->m_flNextAttack() > (g_GlobalVars->interval_per_tick * g_LocalPlayer->m_nTickBase()))
        return;

    const auto activeWeapon = g_LocalPlayer->m_hActiveWeapon().Get();
    if (!activeWeapon || activeWeapon->m_flNextPrimaryAttack() > (g_GlobalVars->interval_per_tick * g_LocalPlayer->m_nTickBase()))
        return;

    const auto weaponData = activeWeapon->GetCSWeaponData();

    if (!weaponData)
        return;

    if (activeWeapon->m_Item().m_iItemDefinitionIndex() == ItemDefinitionIndex::WEAPON_TASER || activeWeapon->IsKnife()
        || activeWeapon->IsGrenade() || activeWeapon->IsPlantedC4())
        return;

    if (g_Options.aimbot_trigger_onkey && !GetAsyncKeyState(g_Options.aimbot_trigger_hotkey))
        return;

    trace_t trace;
    CTraceFilter filter;
    Ray_t ray;

    filter.pSkip = g_LocalPlayer;

    const auto aimPunch = g_LocalPlayer->m_aimPunchAngle();

    const Vector viewAngles{ std::cos(DEG2RAD(g_pCmd->viewangles.pitch + aimPunch.pitch)) * std::cos(DEG2RAD(g_pCmd->viewangles.yaw + aimPunch.yaw)) * weaponData->flRange,
                         std::cos(DEG2RAD(g_pCmd->viewangles.pitch + aimPunch.pitch)) * std::sin(DEG2RAD(g_pCmd->viewangles.yaw + aimPunch.yaw)) * weaponData->flRange,
                        -std::sin(DEG2RAD(g_pCmd->viewangles.pitch + aimPunch.pitch)) * weaponData->flRange };

    ray.Init(g_LocalPlayer->GetEyePos(), g_LocalPlayer->GetEyePos() + viewAngles);

    g_EngineTrace->TraceRay(ray, 0x46004009, &filter, &trace);

    static float time = 0.0f;

    HWND hwnd = InputSys::Get().GetMainWindow();

    if (reinterpret_cast<C_BasePlayer*>(trace.hit_entity)->IsPlayer() && reinterpret_cast<C_BasePlayer*>(trace.hit_entity)->m_iTeamNum() != g_LocalPlayer->m_iTeamNum())
    {
        if (g_Options.aimbot_trigger_time > 0.f && (g_GlobalVars->interval_per_tick * g_LocalPlayer->m_nTickBase()) < time
            || (activeWeapon->IsSniper() && !g_LocalPlayer->m_bIsScoped()))
            return;
        else
        {
            SendMessage(hwnd, WM_LBUTTONDOWN, VK_LBUTTON, 0x390000);
            SendMessage(hwnd, WM_LBUTTONUP, VK_LBUTTON, 0x390000);
            time = g_Options.aimbot_trigger_time + (g_GlobalVars->interval_per_tick * g_LocalPlayer->m_nTickBase());
        }
    }

}
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Code for CSGOSimple

C++:
Expand Collapse Copy
//includes
#include "aimbot.hpp"

#include "../../valve_sdk/math/Vector.hpp"

#include "../../helpers/math.hpp"

#include "../../options.hpp"

#include "../../helpers/input.hpp"

#include <WinUser.h>

//triggerbot
void Aimbot::SafeTrigger()
{

    if (!g_LocalPlayer || !g_LocalPlayer->IsAlive() || g_LocalPlayer->m_flNextAttack() > (g_GlobalVars->interval_per_tick * g_LocalPlayer->m_nTickBase()))
        return;

    const auto activeWeapon = g_LocalPlayer->m_hActiveWeapon().Get();
    if (!activeWeapon || activeWeapon->m_flNextPrimaryAttack() > (g_GlobalVars->interval_per_tick * g_LocalPlayer->m_nTickBase()))
        return;

    const auto weaponData = activeWeapon->GetCSWeaponData();

    if (!weaponData)
        return;

    if (activeWeapon->m_Item().m_iItemDefinitionIndex() == ItemDefinitionIndex::WEAPON_TASER || activeWeapon->IsKnife()
        || activeWeapon->IsGrenade() || activeWeapon->IsPlantedC4())
        return;

    if (g_Options.aimbot_trigger_onkey && !GetAsyncKeyState(g_Options.aimbot_trigger_hotkey))
        return;

    trace_t trace;
    CTraceFilter filter;
    Ray_t ray;

    filter.pSkip = g_LocalPlayer;

    const auto aimPunch = g_LocalPlayer->m_aimPunchAngle();

    const Vector viewAngles{ std::cos(DEG2RAD(g_pCmd->viewangles.pitch + aimPunch.pitch)) * std::cos(DEG2RAD(g_pCmd->viewangles.yaw + aimPunch.yaw)) * weaponData->flRange,
                         std::cos(DEG2RAD(g_pCmd->viewangles.pitch + aimPunch.pitch)) * std::sin(DEG2RAD(g_pCmd->viewangles.yaw + aimPunch.yaw)) * weaponData->flRange,
                        -std::sin(DEG2RAD(g_pCmd->viewangles.pitch + aimPunch.pitch)) * weaponData->flRange };

    ray.Init(g_LocalPlayer->GetEyePos(), g_LocalPlayer->GetEyePos() + viewAngles);

    g_EngineTrace->TraceRay(ray, 0x46004009, &filter, &trace);

    static float time = 0.0f;

    HWND hwnd = InputSys::Get().GetMainWindow();

    if (reinterpret_cast<C_BasePlayer*>(trace.hit_entity)->IsPlayer() && reinterpret_cast<C_BasePlayer*>(trace.hit_entity)->m_iTeamNum() != g_LocalPlayer->m_iTeamNum())
    {
        if (g_Options.aimbot_trigger_time > 0.f && (g_GlobalVars->interval_per_tick * g_LocalPlayer->m_nTickBase()) < time
            || (activeWeapon->IsSniper() && !g_LocalPlayer->m_bIsScoped()))
            return;
        else
        {
            SendMessage(hwnd, WM_LBUTTONDOWN, VK_LBUTTON, 0x390000);
            SendMessage(hwnd, WM_LBUTTONUP, VK_LBUTTON, 0x390000);
            time = g_Options.aimbot_trigger_time + (g_GlobalVars->interval_per_tick * g_LocalPlayer->m_nTickBase());
        }
    }

}
Good work!
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Назад
Сверху Снизу