♛
ну часто это в 19 скачай 17))))
ну часто это в 19 скачай 17))))
установи 17 и проблем не будет
И зачем? Если умеешь думать, то и этой достаточноСделай новую тему
Ошибка C3861 NormalizeAngles: идентификатор не найденNormalizeAngles(angles);
Normalize3 вместо NormalizeAnglesОшибка C3861 NormalizeAngles: идентификатор не найден
Не подскажите?)
Ошибка (активно) E0413 не существует подходящей функции преобразования из "QAngle" в "QAngle *"g_EngineClient->SetViewAngles(angles);
need & before QAngle[QUOTE = "marijuanaxbuks, post: 1469897, member: 360275"]
Error (Active) E0413 There is no suitable conversion function from "QAngle" to "QAngle *"
What to do?
[/ QUOTE]
I'm having the same issue
Исходник с последними обновлениямиПожалуйста, авторизуйтесь для просмотра ссылки.
В options.hpp
После #include <string> добавляем #include <map>
После #define OPTION(type, var, val) type var = val добавляем
После OPTION(Color, color_chams_arms_occluded, Color(0, 128, 255)); добавляемКод:struct aimbot_settings { bool enabled = false; bool deathmatch = false; bool autopistol = false; bool check_smoke = false; bool check_flash = false; bool autowall = false; bool silent = false; bool rcs = false; bool rcs_fov_enabled = false; bool rcs_smooth_enabled = false; bool humanize = false; struct { bool enabled = false; int ticks = 6; } backtrack; bool only_in_zoom = true; int aim_type = 1; int priority = 0; int fov_type = 0; int rcs_type = 0; int hitbox = 1; float fov = 0.f; float silent_fov = 0.f; float rcs_fov = 0.f; float smooth = 1; float rcs_smooth = 1; int shot_delay = 0; int kill_delay = 0; int rcs_x = 100; int rcs_y = 100; int rcs_start = 1; int min_damage = 1; };
В menu.cpp находим if(active_sidebar_tab == 1) { RenderEmptyTab(); } и заменяем RenderEmptyTab на RenderAimbotTabКод:std::map<int, aimbot_settings> aimbot = {};
В ImGui::SetNextWindowSize(ImVec2{ 1000, 0 }, ImGuiSetCond_Once); 1000 заменяем на 1200
Перед void RenderEmptyTab() добавляем
В valve_sdk/csgostructs.hpp после float_t m_flSpawnTime(); добавляем bool IsNotTarget();Код:static int weapon_index = 7; static std::map<int, const char*> k_weapon_names = { { 7, "AK-47" }, { 8, "AUG" }, { 9, "AWP" }, { 63, "CZ75 Auto" }, { 1, "Desert Eagle" }, { 2, "Dual Berettas" }, { 10, "FAMAS" }, { 3, "Five-SeveN" }, { 11, "G3SG1" }, { 13, "Galil AR" }, { 4, "Glock-18" }, { 14, "M249" }, { 60, "M4A1-S" }, { 16, "M4A4" }, { 17, "MAC-10" }, { 27, "MAG-7" }, { 33, "MP7" }, { 34, "MP9" }, { 28, "Negev" }, { 35, "Nova" }, { 32, "P2000" }, { 36, "P250" }, { 19, "P90" }, { 26, "PP-Bizon" }, { 64, "R8 Revolver" }, { 29, "Sawed-Off" }, { 38, "SCAR-20" }, { 40, "SSG 08" }, { 39, "SG 553" }, { 30, "Tec-9" }, { 24, "UMP-45" }, { 61, "USP-S" }, { 25, "XM1014" }, }; void RenderCurrentWeaponButton() { if (!g_EngineClient->IsConnected() || !g_LocalPlayer || !g_LocalPlayer->IsAlive()) { return; } auto weapon = g_LocalPlayer->m_hActiveWeapon(); if (!weapon || !weapon->IsWeapon()) { return; } if (ImGui::Button("Current")) { weapon_index = weapon->m_Item().m_iItemDefinitionIndex(); } } void RenderAimbotTab() { ImGui::Columns(4, NULL, false); ImGui::BeginChild("##aimbot.weapons", ImVec2(0, 0), true); { ImGui::Text("Weapons"); ImGui::Separator(); ImGui::PushItemWidth(-1); ImGui::ListBoxHeader("##weaponslist"); { for (auto weapon : k_weapon_names) { if (ImGui::Selectable(weapon.second, weapon_index == weapon.first)) weapon_index = weapon.first; } } ImGui::ListBoxFooter(); RenderCurrentWeaponButton(); ImGui::PopItemWidth(); } ImGui::EndChild(); ImGui::NextColumn(); auto settings = &g_Options.aimbot[weapon_index]; ImGui::BeginChild("##aimbot.general", ImVec2(0, 0), true); { ImGui::Text("General"); ImGui::Separator(); ImGui::PushItemWidth(-1); ImGui::Checkbox("Enabled", &settings->enabled); ImGui::Checkbox("Deathmatch", &settings->deathmatch); if (weapon_index == WEAPON_P250 || weapon_index == WEAPON_USP_SILENCER || weapon_index == WEAPON_GLOCK || weapon_index == WEAPON_FIVESEVEN || weapon_index == WEAPON_TEC9 || weapon_index == WEAPON_DEAGLE || weapon_index == WEAPON_ELITE || weapon_index == WEAPON_HKP2000) { ImGui::Checkbox("Autopistol", &settings->autopistol); } ImGui::Checkbox("Check Smoke", &settings->check_smoke); ImGui::Checkbox("Check Flash", &settings->check_flash); ImGui::Checkbox("Autowall", &settings->autowall); ImGui::Checkbox("Backtrack", &settings->backtrack.enabled); ImGui::Checkbox("Silent", &settings->silent); ImGui::Checkbox("Humanize", &settings->humanize); if (weapon_index == WEAPON_AWP || weapon_index == WEAPON_SSG08) { ImGui::Checkbox("Only In Zoom", &settings->only_in_zoom); } ImGui::PopItemWidth(); } ImGui::EndChild(); ImGui::NextColumn(); ImGui::BeginChild("##aimbot.misc", ImVec2(0, 0), true); { ImGui::Text("Misc"); ImGui::Separator(); ImGui::PushItemWidth(-1); static char* priorities[] = { "Fov", "Health", "Damage", "Distance" }; static char* aim_types[] = { "Hitbox", "Nearest" }; static char* fov_types[] = { "Static", "Dynamic" }; static char* hitbox_list[] = { "Head", "Neck", "Lower Neck", "Body", "Thorax", "Chest", "Right Thing", "Left Thing", // 7 }; ImGui::Text("Aim Type:"); ImGui::Combo("##aimbot.aim_type", &settings->aim_type, aim_types, IM_ARRAYSIZE(aim_types)); if (settings->aim_type == 0) { ImGui::Text("Hitbox:"); ImGui::Combo("##aimbot.hitbox", &settings->hitbox, hitbox_list, IM_ARRAYSIZE(hitbox_list)); } ImGui::Text("Priority:"); ImGui::Combo("##aimbot.priority", &settings->priority, priorities, IM_ARRAYSIZE(priorities)); ImGui::Text("Fov Type:"); ImGui::Combo("##aimbot.fov_type", &settings->fov_type, fov_types, IM_ARRAYSIZE(fov_types)); ImGui::SliderFloat("##aimbot.fov", &settings->fov, 0, 20, "Fov: %.2f"); if (settings->silent) { ImGui::SliderFloat("##aimbot.silent_fov", &settings->silent_fov, 0, 20, "Silent Fov: %.2f"); } ImGui::SliderFloat("##aimbot.smooth", &settings->smooth, 1, 15, "Smooth: %.2f"); if (!settings->silent) { ImGui::SliderInt("##aimbot.shot_delay", &settings->shot_delay, 0, 100, "Shot Delay: %.0f"); } ImGui::SliderInt("##aimbot.kill_delay", &settings->kill_delay, 0, 1000, "Kill Delay: %.0f"); if (settings->backtrack.enabled) { ImGui::SliderInt("##aimbot_backtrack_ticks", &settings->backtrack.ticks, 0, 12, "BackTrack Ticks: %.0f"); } if (settings->autowall) { ImGui::SliderInt("##aimbot.min_damage", &settings->min_damage, 1, 100, "Min Damage: %.0f"); } ImGui::PopItemWidth(); } ImGui::EndChild(); ImGui::NextColumn(); ImGui::BeginChild("##aimbot.rcs", ImVec2(0, 0), true); { ImGui::Text("Recoil Control System"); ImGui::Separator(); ImGui::PushItemWidth(-1); ImGui::Checkbox("Enabled##aimbot.rcs", &settings->rcs); ImGui::Text("RCS Type:"); static char* rcs_types[] = { "Standalone", "Aim" }; ImGui::Combo("##aimbot.rcs_type", &settings->rcs_type, rcs_types, IM_ARRAYSIZE(rcs_types)); ImGui::Checkbox("RCS Custom Fov", &settings->rcs_fov_enabled); if (settings->rcs_fov_enabled) { ImGui::SliderFloat("##aimbot.rcs_fov", &settings->rcs_fov, 0, 20, "RCS Fov: %.2f"); } ImGui::Checkbox("RCS Custom Smooth", &settings->rcs_smooth_enabled); if (settings->rcs_smooth_enabled) { ImGui::SliderFloat("##aimbot.rcs_smooth", &settings->rcs_smooth, 1, 15, "RCS Smooth: %.2f"); } ImGui::SliderInt("##aimbot.rcs_x", &settings->rcs_x, 0, 100, "RCS X: %.0f"); ImGui::SliderInt("##aimbot.rcs_y", &settings->rcs_y, 0, 100, "RCS Y: %.0f"); ImGui::SliderInt("##aimbot.rcs_start", &settings->rcs_start, 1, 30, "RCS Start: %.0f"); ImGui::PopItemWidth(); } ImGui::EndChild(); ImGui::Columns(1, NULL, false); }
В valve_sdk/csgostructs.cpp в конце добавляем
В helpers/math.hpp после namespace Math { добавляемКод:bool C_BasePlayer::IsNotTarget() { return !this || !IsPlayer() || this == g_LocalPlayer || m_iHealth() <= 0 || IsDormant() || !IsAlive() || m_bGunGameImmunity() || (m_fFlags() & FL_FROZEN) || GetClientClass()->m_ClassID != 35; }
В helpers/math.cpp после namespace Math { добавляемКод:void FixAngles(QAngle &angle);
Создаем в папке features 6 файлов: autowall.h, autowall.cpp, backtrack.h, backtrack.cpp, aimbot.h и aimbot.cppКод:void FixAngles(QAngle& angles) { NormalizeAngles(angles); ClampAngles(angles); }
autowall.h
autowall.cppКод:#pragma once #include "../valve_sdk/sdk.hpp" #include "../valve_sdk/csgostructs.hpp" namespace Autowall { struct FireBulletData { Vector src; trace_t enter_trace; Vector direction; CTraceFilter filter; float trace_length; float trace_length_remaining; float current_damage; int penetrate_count; }; float GetDamage(const Vector& vecPoint); bool SimulateFireBullet(C_BaseCombatWeapon* pWeapon, FireBulletData &data); bool HandleBulletPenetration(CCSWeaponInfo* weaponInfo, FireBulletData &data); bool TraceToExit(Vector &end, trace_t *enter_trace, Vector start, Vector dir, trace_t *exit_trace); bool DidHitNonWorldEntity(C_BasePlayer* player); void ScaleDamage(int hitbox, C_BasePlayer* enemy, float weapon_armor_ratio, float ¤t_damage); float GetHitgroupDamageMultiplier(int hitbox); }
backtrack.hКод:#include "autowall.h" #include "Math.h" #include "../valve_sdk/interfaces/IEngineTrace.hpp" #include "../helpers/math.hpp" #include "../helpers/utils.hpp" #define HITGROUP_GENERIC 0 #define HITGROUP_HEAD 1 #define HITGROUP_CHEST 2 #define HITGROUP_STOMACH 3 #define HITGROUP_LEFTARM 4 #define HITGROUP_RIGHTARM 5 #define HITGROUP_LEFTLEG 6 #define HITGROUP_RIGHTLEG 7 #define HITGROUP_GEAR 10 float Autowall::GetHitgroupDamageMultiplier(int iHitGroup) { switch (iHitGroup) { case HITGROUP_GENERIC: return 0.5f; case HITGROUP_HEAD: return 2.0f; case HITGROUP_CHEST: return 0.5f; case HITGROUP_STOMACH: return 0.75f; case HITGROUP_LEFTARM: return 0.5f; case HITGROUP_RIGHTARM: return 0.5f; case HITGROUP_LEFTLEG: return 0.375f; case HITGROUP_RIGHTLEG: return 0.375f; case HITGROUP_GEAR: return 0.5f; default: return 1.0f; } return 1.0f; } void Autowall::ScaleDamage(int hitbox, C_BasePlayer *enemy, float weapon_armor_ratio, float& current_damage) { current_damage *= Autowall::GetHitgroupDamageMultiplier(hitbox); if (enemy->m_ArmorValue() > 0) { if (hitbox == 8) { if (enemy->m_bHasHelmet()) current_damage *= weapon_armor_ratio * 0.5f; } else current_damage *= weapon_armor_ratio * 0.5f; } } bool Autowall::TraceToExit(Vector& end, trace_t* enter_trace, Vector start, Vector dir, trace_t* exit_trace) { float distance = 0.0f; while (distance <= 90.0f) { distance += 4.0f; end = start + dir * distance; auto point_contents = g_EngineTrace->GetPointContents(end, MASK_SHOT_HULL | CONTENTS_HITBOX, NULL); if (point_contents & MASK_SHOT_HULL && !(point_contents & CONTENTS_HITBOX)) continue; auto new_end = end - (dir * 4.0f); Ray_t ray; ray.Init(end, new_end); g_EngineTrace->TraceRay(ray, MASK_SHOT, 0, exit_trace); if (exit_trace->startsolid && exit_trace->surface.flags & SURF_HITBOX) { ray.Init(end, start); CTraceFilter filter; filter.pSkip = exit_trace->hit_entity; g_EngineTrace->TraceRay(ray, 0x600400B, &filter, exit_trace); if ((exit_trace->fraction < 1.0f || exit_trace->allsolid) && !exit_trace->startsolid) { end = exit_trace->endpos; return true; } continue; } if (!(exit_trace->fraction < 1.0 || exit_trace->allsolid || exit_trace->startsolid) || exit_trace->startsolid) { if (exit_trace->hit_entity) { if (enter_trace->hit_entity && enter_trace->hit_entity == g_EntityList->GetClientEntity(0)) return true; } continue; } if (exit_trace->surface.flags >> 7 & 1 && !(enter_trace->surface.flags >> 7 & 1)) continue; if (exit_trace->plane.normal.Dot(dir) <= 1.0f) { auto fraction = exit_trace->fraction * 4.0f; end = end - (dir * fraction); return true; } } return false; } bool Autowall::HandleBulletPenetration(CCSWeaponInfo* weaponInfo, FireBulletData& data) { surfacedata_t *enter_surface_data = g_PhysSurface->GetSurfaceData(data.enter_trace.surface.surfaceProps); int enter_material = enter_surface_data->game.material; float enter_surf_penetration_mod = enter_surface_data->game.flPenetrationModifier; data.trace_length += data.enter_trace.fraction * data.trace_length_remaining; data.current_damage *= powf(weaponInfo->flRangeModifier, data.trace_length * 0.002f); if (data.trace_length > 3000.f || enter_surf_penetration_mod < 0.1f) data.penetrate_count = 0; if (data.penetrate_count <= 0) return false; Vector dummy; trace_t trace_exit; if (!TraceToExit(dummy, &data.enter_trace, data.enter_trace.endpos, data.direction, &trace_exit)) return false; surfacedata_t *exit_surface_data = g_PhysSurface->GetSurfaceData(trace_exit.surface.surfaceProps); int exit_material = exit_surface_data->game.material; float exit_surf_penetration_mod = *(float*)((uint8_t*)exit_surface_data + 76); float final_damage_modifier = 0.16f; float combined_penetration_modifier = 0.0f; if ((data.enter_trace.contents & CONTENTS_GRATE) != 0 || enter_material == 89 || enter_material == 71) { combined_penetration_modifier = 3.0f; final_damage_modifier = 0.05f; } else combined_penetration_modifier = (enter_surf_penetration_mod + exit_surf_penetration_mod) * 0.5f; if (enter_material == exit_material) { if (exit_material == 87 || exit_material == 85) combined_penetration_modifier = 3.0f; else if (exit_material == 76) combined_penetration_modifier = 2.0f; } float v34 = fmaxf(0.f, 1.0f / combined_penetration_modifier); float v35 = (data.current_damage * final_damage_modifier) + v34 * 3.0f * fmaxf(0.0f, (3.0f / weaponInfo->flPenetration) * 1.25f); float thickness = (trace_exit.endpos - data.enter_trace.endpos).Length(); thickness *= thickness; thickness *= v34; thickness /= 24.0f; float lost_damage = fmaxf(0.0f, v35 + thickness); if (lost_damage > data.current_damage) return false; if (lost_damage >= 0.0f) data.current_damage -= lost_damage; if (data.current_damage < 1.0f) return false; data.src = trace_exit.endpos; data.penetrate_count--; return true; } void TraceLine(Vector vecAbsStart, Vector vecAbsEnd, unsigned int mask, C_BasePlayer* ignore, trace_t* ptr) { Ray_t ray; ray.Init(vecAbsStart, vecAbsEnd); CTraceFilter filter; filter.pSkip = ignore; g_EngineTrace->TraceRay(ray, mask, &filter, ptr); } bool Autowall::SimulateFireBullet(C_BaseCombatWeapon* pWeapon, FireBulletData& data) { CCSWeaponInfo* weaponInfo = pWeapon->GetCSWeaponData(); data.penetrate_count = 4; data.trace_length = 0.0f; data.current_damage = (float)weaponInfo->iDamage; while (data.penetrate_count > 0 && data.current_damage >= 1.0f) { data.trace_length_remaining = weaponInfo->flRange - data.trace_length; Vector end = data.src + data.direction * data.trace_length_remaining; // data.enter_trace TraceLine(data.src, end, MASK_SHOT, g_LocalPlayer, &data.enter_trace); Ray_t ray; ray.Init(data.src, end + data.direction * 40.f); g_EngineTrace->TraceRay(ray, MASK_SHOT, &data.filter, &data.enter_trace); TraceLine(data.src, end + data.direction * 40.f, MASK_SHOT, g_LocalPlayer, &data.enter_trace); if (data.enter_trace.fraction == 1.0f) break; if (data.enter_trace.hitgroup <= HITGROUP_RIGHTLEG && data.enter_trace.hitgroup > HITGROUP_GENERIC) { data.trace_length += data.enter_trace.fraction * data.trace_length_remaining; data.current_damage *= powf(weaponInfo->flRangeModifier, data.trace_length * 0.002f); C_BasePlayer* player = (C_BasePlayer*)data.enter_trace.hit_entity; Autowall::ScaleDamage(data.enter_trace.hitgroup, player, weaponInfo->flArmorRatio, data.current_damage); return true; } if (!HandleBulletPenetration(weaponInfo, data)) break; } return false; } float Autowall::GetDamage(const Vector& point) { float damage = 0.f; Vector dst = point; FireBulletData data; data.src = g_LocalPlayer->GetEyePos(); data.filter.pSkip = g_LocalPlayer; data.direction = dst - data.src; data.direction.NormalizeInPlace(); C_BaseCombatWeapon* activeWeapon = (C_BaseCombatWeapon*)g_EntityList->GetClientEntityFromHandle(g_LocalPlayer->m_hActiveWeapon()); if (!activeWeapon) return -1.0f; if (SimulateFireBullet(activeWeapon, data)) damage = data.current_damage; return damage; }
backtrack.cppКод:#pragma once #include "../options.hpp" #include "../valve_sdk/csgostructs.hpp" struct backtrack_data { int tick_count; int m_iTeamNum; Vector hitboxPos; int EntIndex; }; class Backtrack { public: void OnMove(CUserCmd *pCmd); private: std::vector<backtrack_data> data = {}; }; extern Backtrack g_Backtrack;
aimbot.hКод:#include "backtrack.h" #include "aimbot.h" #include "../helpers/math.hpp" void Backtrack::OnMove(CUserCmd *pCmd) { if (!g_EngineClient->IsConnected() || !g_LocalPlayer || !g_LocalPlayer->IsAlive()) { return; } C_BasePlayer* player; for (int i = 1; i < g_EngineClient->GetMaxClients(); ++i) { player = (C_BasePlayer*)g_EntityList->GetClientEntity(i); if (player->IsNotTarget()) { continue; } backtrack_data bd; bd.m_iTeamNum = player->m_iTeamNum(); bd.tick_count = pCmd->tick_count; bd.hitboxPos = player->GetHitboxPos(0); bd.EntIndex = player->EntIndex(); data.insert(data.begin(), bd); } auto it = data.begin(); while (it != data.end()) { if (it->tick_count + 12 < pCmd->tick_count) it = data.erase(it); else it++; } if (!g_Aimbot.IsEnabled(pCmd)) { return; } if (!g_Aimbot.settings.backtrack.enabled) { return; } int tick_count = -1; QAngle angles; float bestFov = 180.f; for (int i = 0; i < data.size(); i++) { if (data[i].tick_count + g_Aimbot.settings.backtrack.ticks < pCmd->tick_count) { continue; } Math::VectorAngles(data[i].hitboxPos - g_LocalPlayer->GetEyePos(), angles); float fov = g_Aimbot.GetFovToPlayer(pCmd->viewangles, angles); if (fov < bestFov && fov < 5) { bestFov = fov; tick_count = data[i].tick_count; } } if (tick_count != -1) { pCmd->tick_count = tick_count; } } Backtrack g_Backtrack;
aimbot.cppКод:#pragma once #include "../options.hpp" #include "../valve_sdk/csgostructs.hpp" class Aimbot { public: void OnMove(CUserCmd *pCmd); bool IsEnabled(CUserCmd *pCmd); float GetFovToPlayer(QAngle viewAngle, QAngle aimAngle); aimbot_settings settings; private: bool IsRcs(); float GetSmooth(); float GetFov(); void RCS(QAngle &angle, C_BasePlayer* target); bool IsLineGoesThroughSmoke(Vector vStartPos, Vector vEndPos); void Smooth(QAngle currentAngle, QAngle aimAngle, QAngle& angle); bool IsNotSilent(float fov); C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, int &bestBone); float shot_delay_time; bool shot_delay = false; bool silent_enabled = false; QAngle CurrentPunch = { 0,0,0 }; QAngle RCSLastPunch = { 0,0,0 }; bool is_delayed = false; int kill_delay_time; bool kill_delay = false; C_BasePlayer* target = NULL; }; extern Aimbot g_Aimbot;
Код:#include "aimbot.h" #include "autowall.h" #include "../helpers/math.hpp" float RandomFloat(float a, float b) { float random = ((float)rand()) / (float)RAND_MAX; float diff = b - a; float r = random * diff; return a + r; } //-------------------------------------------------------------------------------- bool Aimbot::IsRcs() { return g_LocalPlayer->m_iShotsFired() >= settings.rcs_start; } //-------------------------------------------------------------------------------- float GetRealDistanceFOV(float distance, QAngle angle, CUserCmd* cmd) { Vector aimingAt; Math::AngleVectors(cmd->viewangles, aimingAt); aimingAt *= distance; Vector aimAt; Math::AngleVectors(angle, aimAt); aimAt *= distance; return aimingAt.DistTo(aimAt) / 5; } //-------------------------------------------------------------------------------- float Aimbot::GetFovToPlayer(QAngle viewAngle, QAngle aimAngle) { QAngle delta = aimAngle - viewAngle; Math::FixAngles(delta); return sqrtf(powf(delta.pitch, 2.0f) + powf(delta.yaw, 2.0f)); } //-------------------------------------------------------------------------------- bool Aimbot::IsLineGoesThroughSmoke(Vector vStartPos, Vector vEndPos) { static auto LineGoesThroughSmokeFn = (bool(*)(Vector vStartPos, Vector vEndPos))Utils::PatternScan(GetModuleHandleA("client.dll"), "55 8B EC 83 EC 08 8B 15 ? ? ? ? 0F 57 C0"); return LineGoesThroughSmokeFn(vStartPos, vEndPos); } //-------------------------------------------------------------------------------- bool Aimbot::IsEnabled(CUserCmd *pCmd) { if (!g_EngineClient->IsConnected() || !g_LocalPlayer || !g_LocalPlayer->IsAlive()) { return false; } auto pWeapon = g_LocalPlayer->m_hActiveWeapon(); if (!pWeapon || !(pWeapon->IsSniper() || pWeapon->IsPistol() || pWeapon->IsRifle())) { return false; } auto weaponData = pWeapon->GetCSWeaponData(); auto weapontype = weaponData->WeaponType; settings = g_Options.aimbot[pWeapon->m_Item().m_iItemDefinitionIndex()]; if (!settings.enabled || !(pCmd->buttons & IN_ATTACK)) { return false; } if ((pWeapon->m_Item().m_iItemDefinitionIndex() == WEAPON_AWP || pWeapon->m_Item().m_iItemDefinitionIndex() == WEAPON_SSG08) && settings.only_in_zoom && !g_LocalPlayer->m_bIsScoped()) { return false; } if (settings.fov == 0 && settings.silent_fov == 0 && !settings.rcs) { return false; } if (!pWeapon->HasBullets() || pWeapon->IsReloading()) { return false; } return true; } //-------------------------------------------------------------------------------- float Aimbot::GetSmooth() { float smooth = IsRcs() && settings.rcs_smooth_enabled ? settings.rcs_smooth : settings.smooth; if (settings.humanize) { smooth += RandomFloat(-1, 4); } return smooth; } //-------------------------------------------------------------------------------- void Aimbot::Smooth(QAngle currentAngle, QAngle aimAngle, QAngle& angle) { if (GetSmooth() <= 1) { return; } Vector vAimAngle; Math::AngleVectors(aimAngle, vAimAngle); Vector vCurrentAngle; Math::AngleVectors(currentAngle, vCurrentAngle); Vector delta = vAimAngle - vCurrentAngle; Vector smoothed = vCurrentAngle + delta / GetSmooth(); Math::VectorAngles(smoothed, angle); } //-------------------------------------------------------------------------------- void Aimbot::RCS(QAngle &angle, C_BasePlayer* target) { if (!settings.rcs || !IsRcs()) { return; } if (settings.rcs_x == 0 && settings.rcs_y == 0) { return; } if (target) { QAngle punch = g_LocalPlayer->m_aimPunchAngle(); angle.pitch -= punch.pitch * (settings.rcs_x / 50.f); angle.yaw -= punch.yaw * (settings.rcs_y / 50.f); } else if (settings.rcs_type == 0) { QAngle NewPunch = { CurrentPunch.pitch - RCSLastPunch.pitch, CurrentPunch.yaw - RCSLastPunch.yaw, 0 }; angle.pitch -= NewPunch.pitch * (settings.rcs_x / 50.f); angle.yaw -= NewPunch.yaw * (settings.rcs_y / 50.f); } Math::FixAngles(angle); } //-------------------------------------------------------------------------------- float Aimbot::GetFov() { if (IsRcs() && settings.rcs && settings.rcs_fov_enabled) return settings.rcs_fov; if (!silent_enabled) return settings.fov; return settings.silent_fov > settings.fov ? settings.silent_fov : settings.fov; } //-------------------------------------------------------------------------------- C_BasePlayer* Aimbot::GetClosestPlayer(CUserCmd* cmd, int &bestBone) { QAngle ang; Vector eVecTarget; Vector pVecTarget = g_LocalPlayer->GetEyePos(); if (target && !kill_delay && settings.kill_delay > 0 && target->IsNotTarget()) { target = NULL; shot_delay = false; kill_delay = true; kill_delay_time = (int)GetTickCount() + settings.kill_delay; } if (kill_delay) { if (kill_delay_time <= (int)GetTickCount()) kill_delay = false; else return NULL; } C_BasePlayer* player; target = NULL; int bestHealth = 100.f; float bestFov = 9999.f; float bestDamage = 0.f; float bestBoneFov = 9999.f; float bestDistance = 9999.f; int health; float fov; float damage; float distance; int fromBone = settings.aim_type == 1 ? 0 : settings.hitbox; int toBone = settings.aim_type == 1 ? 7 : settings.hitbox; for (int i = 1; i < g_EngineClient->GetMaxClients(); ++i) { damage = 0.f; player = (C_BasePlayer*)g_EntityList->GetClientEntity(i); if (player->IsNotTarget()) { continue; } if (!settings.deathmatch && player->m_iTeamNum() == g_LocalPlayer->m_iTeamNum()) { continue; } for (int bone = fromBone; bone <= toBone; bone++) { eVecTarget = player->GetHitboxPos(bone); Math::VectorAngles(eVecTarget - pVecTarget, ang); Math::FixAngles(ang); distance = pVecTarget.DistTo(eVecTarget); if (settings.fov_type == 1) fov = GetRealDistanceFOV(distance, ang, cmd); else fov = GetFovToPlayer(cmd->viewangles, ang); if (fov > GetFov()) { continue; } if (!g_LocalPlayer->CanSeePlayer(player, eVecTarget)) { if (!settings.autowall) { continue; } damage = Autowall::GetDamage(eVecTarget); if (damage < settings.min_damage) { continue; } } if ((settings.priority == 1 || settings.priority == 2) && damage == 0.f) { damage = Autowall::GetDamage(eVecTarget); } health = player->m_iHealth() - damage; if (settings.check_smoke && IsLineGoesThroughSmoke(pVecTarget, eVecTarget)) { continue; } if (settings.aim_type == 1 && bestBoneFov < fov) { continue; } bestBoneFov = fov; if ( (settings.priority == 0 && bestFov > fov) || (settings.priority == 1 && bestHealth > health) || (settings.priority == 2 && bestDamage < damage) || (settings.priority == 3 && distance < bestDistance) ) { bestBone = bone; target = player; bestFov = fov; bestHealth = health; bestDamage = damage; bestDistance = distance; } } } return target; } //-------------------------------------------------------------------------------- bool Aimbot::IsNotSilent(float fov) { return IsRcs() || !silent_enabled || (silent_enabled && fov > settings.silent_fov); } //-------------------------------------------------------------------------------- void Aimbot::OnMove(CUserCmd *pCmd) { if (!IsEnabled(pCmd)) { RCSLastPunch = { 0, 0, 0 }; is_delayed = false; shot_delay = false; kill_delay = false; silent_enabled = settings.silent && settings.silent_fov > 0; target = NULL; return; } QAngle angles = pCmd->viewangles; QAngle current = angles; float fov = 180.f; if (!(settings.check_flash && g_LocalPlayer->IsFlashed())) { int bestBone = -1; if (GetClosestPlayer(pCmd, bestBone)) { Math::VectorAngles(target->GetHitboxPos(bestBone) - g_LocalPlayer->GetEyePos(), angles); Math::FixAngles(angles); if (settings.fov_type == 1) fov = GetRealDistanceFOV(g_LocalPlayer->GetEyePos().DistTo(target->GetHitboxPos(bestBone)), angles, pCmd); else fov = GetFovToPlayer(pCmd->viewangles, angles); if (!settings.silent && !is_delayed && !shot_delay && settings.shot_delay > 0) { is_delayed = true; shot_delay = true; shot_delay_time = GetTickCount() + settings.shot_delay; } if (shot_delay && shot_delay_time <= GetTickCount ()) { tiro_delay = false; } if (shot_delay) { pCmd-> botões & = ~ IN_ATTACK; } } } CurrentPunch = g_LocalPlayer-> m_aimPunchAngle (); if (IsNotSilent (fov)) { RCS (ângulos, alvo); } RCSLastPunch = CurrentPunch; if (target && IsNotSilent (fov)) { Suave (corrente, ângulos, ângulos); } Math :: FixAngles (ângulos); pCmd-> ângulos de visão = ângulos; if (IsNotSilent (fov)) { g_EngineClient-> SetViewAngles (ângulos); } silent_enabled = false; if (g_LocalPlayer-> m_hActiveWeapon () -> IsPistol () && settings.autopistol) { float server_time = g_LocalPlayer-> m_nTickBase () * g_GlobalVars-> interval_per_tick; float next_shot = g_LocalPlayer-> m_hActiveWeapon () -> m_flNextPrimaryAttack () - server_time; if (next_shot> 0) { pCmd-> botões & = ~ IN_ATTACK; } } } Aimbot g_Aimbot; [/CÓDIGO] Em hooks.cpp, após #include "features / glow.hpp", adicione [CÓDIGO] #include "features / aimbot.h" #include "features / backtrack.h" [/CÓDIGO] Antes de if (g_Options.misc_bhop) add [CÓDIGO] g_Aimbot.OnMove (cmd); g_Backtrack.OnMove (cmd); [/CÓDIGO] Compile, injete, aproveite Tela do menu: Conteúdo oculto [/CITAR] [ATTACH type="full"]98549[/ATTACH]
Исходник с последними обновлениямиПожалуйста, авторизуйтесь для просмотра ссылки.
В options.hpp
После #include <string> добавляем #include <map>
После #define OPTION(type, var, val) type var = val добавляем
После OPTION(Color, color_chams_arms_occluded, Color(0, 128, 255)); добавляемКод:struct aimbot_settings { bool enabled = false; bool deathmatch = false; bool autopistol = false; bool check_smoke = false; bool check_flash = false; bool autowall = false; bool silent = false; bool rcs = false; bool rcs_fov_enabled = false; bool rcs_smooth_enabled = false; bool humanize = false; struct { bool enabled = false; int ticks = 6; } backtrack; bool only_in_zoom = true; int aim_type = 1; int priority = 0; int fov_type = 0; int rcs_type = 0; int hitbox = 1; float fov = 0.f; float silent_fov = 0.f; float rcs_fov = 0.f; float smooth = 1; float rcs_smooth = 1; int shot_delay = 0; int kill_delay = 0; int rcs_x = 100; int rcs_y = 100; int rcs_start = 1; int min_damage = 1; };
В menu.cpp находим if(active_sidebar_tab == 1) { RenderEmptyTab(); } и заменяем RenderEmptyTab на RenderAimbotTabКод:std::map<int, aimbot_settings> aimbot = {};
В ImGui::SetNextWindowSize(ImVec2{ 1000, 0 }, ImGuiSetCond_Once); 1000 заменяем на 1200
Перед void RenderEmptyTab() добавляем
В valve_sdk/csgostructs.hpp после float_t m_flSpawnTime(); добавляем bool IsNotTarget();Код:static int weapon_index = 7; static std::map<int, const char*> k_weapon_names = { { 7, "AK-47" }, { 8, "AUG" }, { 9, "AWP" }, { 63, "CZ75 Auto" }, { 1, "Desert Eagle" }, { 2, "Dual Berettas" }, { 10, "FAMAS" }, { 3, "Five-SeveN" }, { 11, "G3SG1" }, { 13, "Galil AR" }, { 4, "Glock-18" }, { 14, "M249" }, { 60, "M4A1-S" }, { 16, "M4A4" }, { 17, "MAC-10" }, { 27, "MAG-7" }, { 33, "MP7" }, { 34, "MP9" }, { 28, "Negev" }, { 35, "Nova" }, { 32, "P2000" }, { 36, "P250" }, { 19, "P90" }, { 26, "PP-Bizon" }, { 64, "R8 Revolver" }, { 29, "Sawed-Off" }, { 38, "SCAR-20" }, { 40, "SSG 08" }, { 39, "SG 553" }, { 30, "Tec-9" }, { 24, "UMP-45" }, { 61, "USP-S" }, { 25, "XM1014" }, }; void RenderCurrentWeaponButton() { if (!g_EngineClient->IsConnected() || !g_LocalPlayer || !g_LocalPlayer->IsAlive()) { return; } auto weapon = g_LocalPlayer->m_hActiveWeapon(); if (!weapon || !weapon->IsWeapon()) { return; } if (ImGui::Button("Current")) { weapon_index = weapon->m_Item().m_iItemDefinitionIndex(); } } void RenderAimbotTab() { ImGui::Columns(4, NULL, false); ImGui::BeginChild("##aimbot.weapons", ImVec2(0, 0), true); { ImGui::Text("Weapons"); ImGui::Separator(); ImGui::PushItemWidth(-1); ImGui::ListBoxHeader("##weaponslist"); { for (auto weapon : k_weapon_names) { if (ImGui::Selectable(weapon.second, weapon_index == weapon.first)) weapon_index = weapon.first; } } ImGui::ListBoxFooter(); RenderCurrentWeaponButton(); ImGui::PopItemWidth(); } ImGui::EndChild(); ImGui::NextColumn(); auto settings = &g_Options.aimbot[weapon_index]; ImGui::BeginChild("##aimbot.general", ImVec2(0, 0), true); { ImGui::Text("General"); ImGui::Separator(); ImGui::PushItemWidth(-1); ImGui::Checkbox("Enabled", &settings->enabled); ImGui::Checkbox("Deathmatch", &settings->deathmatch); if (weapon_index == WEAPON_P250 || weapon_index == WEAPON_USP_SILENCER || weapon_index == WEAPON_GLOCK || weapon_index == WEAPON_FIVESEVEN || weapon_index == WEAPON_TEC9 || weapon_index == WEAPON_DEAGLE || weapon_index == WEAPON_ELITE || weapon_index == WEAPON_HKP2000) { ImGui::Checkbox("Autopistol", &settings->autopistol); } ImGui::Checkbox("Check Smoke", &settings->check_smoke); ImGui::Checkbox("Check Flash", &settings->check_flash); ImGui::Checkbox("Autowall", &settings->autowall); ImGui::Checkbox("Backtrack", &settings->backtrack.enabled); ImGui::Checkbox("Silent", &settings->silent); ImGui::Checkbox("Humanize", &settings->humanize); if (weapon_index == WEAPON_AWP || weapon_index == WEAPON_SSG08) { ImGui::Checkbox("Only In Zoom", &settings->only_in_zoom); } ImGui::PopItemWidth(); } ImGui::EndChild(); ImGui::NextColumn(); ImGui::BeginChild("##aimbot.misc", ImVec2(0, 0), true); { ImGui::Text("Misc"); ImGui::Separator(); ImGui::PushItemWidth(-1); static char* priorities[] = { "Fov", "Health", "Damage", "Distance" }; static char* aim_types[] = { "Hitbox", "Nearest" }; static char* fov_types[] = { "Static", "Dynamic" }; static char* hitbox_list[] = { "Head", "Neck", "Lower Neck", "Body", "Thorax", "Chest", "Right Thing", "Left Thing", // 7 }; ImGui::Text("Aim Type:"); ImGui::Combo("##aimbot.aim_type", &settings->aim_type, aim_types, IM_ARRAYSIZE(aim_types)); if (settings->aim_type == 0) { ImGui::Text("Hitbox:"); ImGui::Combo("##aimbot.hitbox", &settings->hitbox, hitbox_list, IM_ARRAYSIZE(hitbox_list)); } ImGui::Text("Priority:"); ImGui::Combo("##aimbot.priority", &settings->priority, priorities, IM_ARRAYSIZE(priorities)); ImGui::Text("Fov Type:"); ImGui::Combo("##aimbot.fov_type", &settings->fov_type, fov_types, IM_ARRAYSIZE(fov_types)); ImGui::SliderFloat("##aimbot.fov", &settings->fov, 0, 20, "Fov: %.2f"); if (settings->silent) { ImGui::SliderFloat("##aimbot.silent_fov", &settings->silent_fov, 0, 20, "Silent Fov: %.2f"); } ImGui::SliderFloat("##aimbot.smooth", &settings->smooth, 1, 15, "Smooth: %.2f"); if (!settings->silent) { ImGui::SliderInt("##aimbot.shot_delay", &settings->shot_delay, 0, 100, "Shot Delay: %.0f"); } ImGui::SliderInt("##aimbot.kill_delay", &settings->kill_delay, 0, 1000, "Kill Delay: %.0f"); if (settings->backtrack.enabled) { ImGui::SliderInt("##aimbot_backtrack_ticks", &settings->backtrack.ticks, 0, 12, "BackTrack Ticks: %.0f"); } if (settings->autowall) { ImGui::SliderInt("##aimbot.min_damage", &settings->min_damage, 1, 100, "Min Damage: %.0f"); } ImGui::PopItemWidth(); } ImGui::EndChild(); ImGui::NextColumn(); ImGui::BeginChild("##aimbot.rcs", ImVec2(0, 0), true); { ImGui::Text("Recoil Control System"); ImGui::Separator(); ImGui::PushItemWidth(-1); ImGui::Checkbox("Enabled##aimbot.rcs", &settings->rcs); ImGui::Text("RCS Type:"); static char* rcs_types[] = { "Standalone", "Aim" }; ImGui::Combo("##aimbot.rcs_type", &settings->rcs_type, rcs_types, IM_ARRAYSIZE(rcs_types)); ImGui::Checkbox("RCS Custom Fov", &settings->rcs_fov_enabled); if (settings->rcs_fov_enabled) { ImGui::SliderFloat("##aimbot.rcs_fov", &settings->rcs_fov, 0, 20, "RCS Fov: %.2f"); } ImGui::Checkbox("RCS Custom Smooth", &settings->rcs_smooth_enabled); if (settings->rcs_smooth_enabled) { ImGui::SliderFloat("##aimbot.rcs_smooth", &settings->rcs_smooth, 1, 15, "RCS Smooth: %.2f"); } ImGui::SliderInt("##aimbot.rcs_x", &settings->rcs_x, 0, 100, "RCS X: %.0f"); ImGui::SliderInt("##aimbot.rcs_y", &settings->rcs_y, 0, 100, "RCS Y: %.0f"); ImGui::SliderInt("##aimbot.rcs_start", &settings->rcs_start, 1, 30, "RCS Start: %.0f"); ImGui::PopItemWidth(); } ImGui::EndChild(); ImGui::Columns(1, NULL, false); }
В valve_sdk/csgostructs.cpp в конце добавляем
В helpers/math.hpp после namespace Math { добавляемКод:bool C_BasePlayer::IsNotTarget() { return !this || !IsPlayer() || this == g_LocalPlayer || m_iHealth() <= 0 || IsDormant() || !IsAlive() || m_bGunGameImmunity() || (m_fFlags() & FL_FROZEN) || GetClientClass()->m_ClassID != 35; }
В helpers/math.cpp после namespace Math { добавляемКод:void FixAngles(QAngle &angle);
Создаем в папке features 6 файлов: autowall.h, autowall.cpp, backtrack.h, backtrack.cpp, aimbot.h и aimbot.cppКод:void FixAngles(QAngle& angles) { NormalizeAngles(angles); ClampAngles(angles); }
autowall.h
autowall.cppКод:#pragma once #include "../valve_sdk/sdk.hpp" #include "../valve_sdk/csgostructs.hpp" namespace Autowall { struct FireBulletData { Vector src; trace_t enter_trace; Vector direction; CTraceFilter filter; float trace_length; float trace_length_remaining; float current_damage; int penetrate_count; }; float GetDamage(const Vector& vecPoint); bool SimulateFireBullet(C_BaseCombatWeapon* pWeapon, FireBulletData &data); bool HandleBulletPenetration(CCSWeaponInfo* weaponInfo, FireBulletData &data); bool TraceToExit(Vector &end, trace_t *enter_trace, Vector start, Vector dir, trace_t *exit_trace); bool DidHitNonWorldEntity(C_BasePlayer* player); void ScaleDamage(int hitbox, C_BasePlayer* enemy, float weapon_armor_ratio, float ¤t_damage); float GetHitgroupDamageMultiplier(int hitbox); }
backtrack.hКод:#include "autowall.h" #include "Math.h" #include "../valve_sdk/interfaces/IEngineTrace.hpp" #include "../helpers/math.hpp" #include "../helpers/utils.hpp" #define HITGROUP_GENERIC 0 #define HITGROUP_HEAD 1 #define HITGROUP_CHEST 2 #define HITGROUP_STOMACH 3 #define HITGROUP_LEFTARM 4 #define HITGROUP_RIGHTARM 5 #define HITGROUP_LEFTLEG 6 #define HITGROUP_RIGHTLEG 7 #define HITGROUP_GEAR 10 float Autowall::GetHitgroupDamageMultiplier(int iHitGroup) { switch (iHitGroup) { case HITGROUP_GENERIC: return 0.5f; case HITGROUP_HEAD: return 2.0f; case HITGROUP_CHEST: return 0.5f; case HITGROUP_STOMACH: return 0.75f; case HITGROUP_LEFTARM: return 0.5f; case HITGROUP_RIGHTARM: return 0.5f; case HITGROUP_LEFTLEG: return 0.375f; case HITGROUP_RIGHTLEG: return 0.375f; case HITGROUP_GEAR: return 0.5f; default: return 1.0f; } return 1.0f; } void Autowall::ScaleDamage(int hitbox, C_BasePlayer *enemy, float weapon_armor_ratio, float& current_damage) { current_damage *= Autowall::GetHitgroupDamageMultiplier(hitbox); if (enemy->m_ArmorValue() > 0) { if (hitbox == 8) { if (enemy->m_bHasHelmet()) current_damage *= weapon_armor_ratio * 0.5f; } else current_damage *= weapon_armor_ratio * 0.5f; } } bool Autowall::TraceToExit(Vector& end, trace_t* enter_trace, Vector start, Vector dir, trace_t* exit_trace) { float distance = 0.0f; while (distance <= 90.0f) { distance += 4.0f; end = start + dir * distance; auto point_contents = g_EngineTrace->GetPointContents(end, MASK_SHOT_HULL | CONTENTS_HITBOX, NULL); if (point_contents & MASK_SHOT_HULL && !(point_contents & CONTENTS_HITBOX)) continue; auto new_end = end - (dir * 4.0f); Ray_t ray; ray.Init(end, new_end); g_EngineTrace->TraceRay(ray, MASK_SHOT, 0, exit_trace); if (exit_trace->startsolid && exit_trace->surface.flags & SURF_HITBOX) { ray.Init(end, start); CTraceFilter filter; filter.pSkip = exit_trace->hit_entity; g_EngineTrace->TraceRay(ray, 0x600400B, &filter, exit_trace); if ((exit_trace->fraction < 1.0f || exit_trace->allsolid) && !exit_trace->startsolid) { end = exit_trace->endpos; return true; } continue; } if (!(exit_trace->fraction < 1.0 || exit_trace->allsolid || exit_trace->startsolid) || exit_trace->startsolid) { if (exit_trace->hit_entity) { if (enter_trace->hit_entity && enter_trace->hit_entity == g_EntityList->GetClientEntity(0)) return true; } continue; } if (exit_trace->surface.flags >> 7 & 1 && !(enter_trace->surface.flags >> 7 & 1)) continue; if (exit_trace->plane.normal.Dot(dir) <= 1.0f) { auto fraction = exit_trace->fraction * 4.0f; end = end - (dir * fraction); return true; } } return false; } bool Autowall::HandleBulletPenetration(CCSWeaponInfo* weaponInfo, FireBulletData& data) { surfacedata_t *enter_surface_data = g_PhysSurface->GetSurfaceData(data.enter_trace.surface.surfaceProps); int enter_material = enter_surface_data->game.material; float enter_surf_penetration_mod = enter_surface_data->game.flPenetrationModifier; data.trace_length += data.enter_trace.fraction * data.trace_length_remaining; data.current_damage *= powf(weaponInfo->flRangeModifier, data.trace_length * 0.002f); if (data.trace_length > 3000.f || enter_surf_penetration_mod < 0.1f) data.penetrate_count = 0; if (data.penetrate_count <= 0) return false; Vector dummy; trace_t trace_exit; if (!TraceToExit(dummy, &data.enter_trace, data.enter_trace.endpos, data.direction, &trace_exit)) return false; surfacedata_t *exit_surface_data = g_PhysSurface->GetSurfaceData(trace_exit.surface.surfaceProps); int exit_material = exit_surface_data->game.material; float exit_surf_penetration_mod = *(float*)((uint8_t*)exit_surface_data + 76); float final_damage_modifier = 0.16f; float combined_penetration_modifier = 0.0f; if ((data.enter_trace.contents & CONTENTS_GRATE) != 0 || enter_material == 89 || enter_material == 71) { combined_penetration_modifier = 3.0f; final_damage_modifier = 0.05f; } else combined_penetration_modifier = (enter_surf_penetration_mod + exit_surf_penetration_mod) * 0.5f; if (enter_material == exit_material) { if (exit_material == 87 || exit_material == 85) combined_penetration_modifier = 3.0f; else if (exit_material == 76) combined_penetration_modifier = 2.0f; } float v34 = fmaxf(0.f, 1.0f / combined_penetration_modifier); float v35 = (data.current_damage * final_damage_modifier) + v34 * 3.0f * fmaxf(0.0f, (3.0f / weaponInfo->flPenetration) * 1.25f); float thickness = (trace_exit.endpos - data.enter_trace.endpos).Length(); thickness *= thickness; thickness *= v34; thickness /= 24.0f; float lost_damage = fmaxf(0.0f, v35 + thickness); if (lost_damage > data.current_damage) return false; if (lost_damage >= 0.0f) data.current_damage -= lost_damage; if (data.current_damage < 1.0f) return false; data.src = trace_exit.endpos; data.penetrate_count--; return true; } void TraceLine(Vector vecAbsStart, Vector vecAbsEnd, unsigned int mask, C_BasePlayer* ignore, trace_t* ptr) { Ray_t ray; ray.Init(vecAbsStart, vecAbsEnd); CTraceFilter filter; filter.pSkip = ignore; g_EngineTrace->TraceRay(ray, mask, &filter, ptr); } bool Autowall::SimulateFireBullet(C_BaseCombatWeapon* pWeapon, FireBulletData& data) { CCSWeaponInfo* weaponInfo = pWeapon->GetCSWeaponData(); data.penetrate_count = 4; data.trace_length = 0.0f; data.current_damage = (float)weaponInfo->iDamage; while (data.penetrate_count > 0 && data.current_damage >= 1.0f) { data.trace_length_remaining = weaponInfo->flRange - data.trace_length; Vector end = data.src + data.direction * data.trace_length_remaining; // data.enter_trace TraceLine(data.src, end, MASK_SHOT, g_LocalPlayer, &data.enter_trace); Ray_t ray; ray.Init(data.src, end + data.direction * 40.f); g_EngineTrace->TraceRay(ray, MASK_SHOT, &data.filter, &data.enter_trace); TraceLine(data.src, end + data.direction * 40.f, MASK_SHOT, g_LocalPlayer, &data.enter_trace); if (data.enter_trace.fraction == 1.0f) break; if (data.enter_trace.hitgroup <= HITGROUP_RIGHTLEG && data.enter_trace.hitgroup > HITGROUP_GENERIC) { data.trace_length += data.enter_trace.fraction * data.trace_length_remaining; data.current_damage *= powf(weaponInfo->flRangeModifier, data.trace_length * 0.002f); C_BasePlayer* player = (C_BasePlayer*)data.enter_trace.hit_entity; Autowall::ScaleDamage(data.enter_trace.hitgroup, player, weaponInfo->flArmorRatio, data.current_damage); return true; } if (!HandleBulletPenetration(weaponInfo, data)) break; } return false; } float Autowall::GetDamage(const Vector& point) { float damage = 0.f; Vector dst = point; FireBulletData data; data.src = g_LocalPlayer->GetEyePos(); data.filter.pSkip = g_LocalPlayer; data.direction = dst - data.src; data.direction.NormalizeInPlace(); C_BaseCombatWeapon* activeWeapon = (C_BaseCombatWeapon*)g_EntityList->GetClientEntityFromHandle(g_LocalPlayer->m_hActiveWeapon()); if (!activeWeapon) return -1.0f; if (SimulateFireBullet(activeWeapon, data)) damage = data.current_damage; return damage; }
backtrack.cppКод:#pragma once #include "../options.hpp" #include "../valve_sdk/csgostructs.hpp" struct backtrack_data { int tick_count; int m_iTeamNum; Vector hitboxPos; int EntIndex; }; class Backtrack { public: void OnMove(CUserCmd *pCmd); private: std::vector<backtrack_data> data = {}; }; extern Backtrack g_Backtrack;
aimbot.hКод:#include "backtrack.h" #include "aimbot.h" #include "../helpers/math.hpp" void Backtrack::OnMove(CUserCmd *pCmd) { if (!g_EngineClient->IsConnected() || !g_LocalPlayer || !g_LocalPlayer->IsAlive()) { return; } C_BasePlayer* player; for (int i = 1; i < g_EngineClient->GetMaxClients(); ++i) { player = (C_BasePlayer*)g_EntityList->GetClientEntity(i); if (player->IsNotTarget()) { continue; } backtrack_data bd; bd.m_iTeamNum = player->m_iTeamNum(); bd.tick_count = pCmd->tick_count; bd.hitboxPos = player->GetHitboxPos(0); bd.EntIndex = player->EntIndex(); data.insert(data.begin(), bd); } auto it = data.begin(); while (it != data.end()) { if (it->tick_count + 12 < pCmd->tick_count) it = data.erase(it); else it++; } if (!g_Aimbot.IsEnabled(pCmd)) { return; } if (!g_Aimbot.settings.backtrack.enabled) { return; } int tick_count = -1; QAngle angles; float bestFov = 180.f; for (int i = 0; i < data.size(); i++) { if (data[i].tick_count + g_Aimbot.settings.backtrack.ticks < pCmd->tick_count) { continue; } Math::VectorAngles(data[i].hitboxPos - g_LocalPlayer->GetEyePos(), angles); float fov = g_Aimbot.GetFovToPlayer(pCmd->viewangles, angles); if (fov < bestFov && fov < 5) { bestFov = fov; tick_count = data[i].tick_count; } } if (tick_count != -1) { pCmd->tick_count = tick_count; } } Backtrack g_Backtrack;
aimbot.cppКод:#pragma once #include "../options.hpp" #include "../valve_sdk/csgostructs.hpp" class Aimbot { public: void OnMove(CUserCmd *pCmd); bool IsEnabled(CUserCmd *pCmd); float GetFovToPlayer(QAngle viewAngle, QAngle aimAngle); aimbot_settings settings; private: bool IsRcs(); float GetSmooth(); float GetFov(); void RCS(QAngle &angle, C_BasePlayer* target); bool IsLineGoesThroughSmoke(Vector vStartPos, Vector vEndPos); void Smooth(QAngle currentAngle, QAngle aimAngle, QAngle& angle); bool IsNotSilent(float fov); C_BasePlayer* GetClosestPlayer(CUserCmd* cmd, int &bestBone); float shot_delay_time; bool shot_delay = false; bool silent_enabled = false; QAngle CurrentPunch = { 0,0,0 }; QAngle RCSLastPunch = { 0,0,0 }; bool is_delayed = false; int kill_delay_time; bool kill_delay = false; C_BasePlayer* target = NULL; }; extern Aimbot g_Aimbot;
В hooks.cpp после #include "features/glow.hpp" добавляемКод:#include "aimbot.h" #include "autowall.h" #include "../helpers/math.hpp" float RandomFloat(float a, float b) { float random = ((float)rand()) / (float)RAND_MAX; float diff = b - a; float r = random * diff; return a + r; } //-------------------------------------------------------------------------------- bool Aimbot::IsRcs() { return g_LocalPlayer->m_iShotsFired() >= settings.rcs_start; } //-------------------------------------------------------------------------------- float GetRealDistanceFOV(float distance, QAngle angle, CUserCmd* cmd) { Vector aimingAt; Math::AngleVectors(cmd->viewangles, aimingAt); aimingAt *= distance; Vector aimAt; Math::AngleVectors(angle, aimAt); aimAt *= distance; return aimingAt.DistTo(aimAt) / 5; } //-------------------------------------------------------------------------------- float Aimbot::GetFovToPlayer(QAngle viewAngle, QAngle aimAngle) { QAngle delta = aimAngle - viewAngle; Math::FixAngles(delta); return sqrtf(powf(delta.pitch, 2.0f) + powf(delta.yaw, 2.0f)); } //-------------------------------------------------------------------------------- bool Aimbot::IsLineGoesThroughSmoke(Vector vStartPos, Vector vEndPos) { static auto LineGoesThroughSmokeFn = (bool(*)(Vector vStartPos, Vector vEndPos))Utils::PatternScan(GetModuleHandleA("client.dll"), "55 8B EC 83 EC 08 8B 15 ? ? ? ? 0F 57 C0"); return LineGoesThroughSmokeFn(vStartPos, vEndPos); } //-------------------------------------------------------------------------------- bool Aimbot::IsEnabled(CUserCmd *pCmd) { if (!g_EngineClient->IsConnected() || !g_LocalPlayer || !g_LocalPlayer->IsAlive()) { return false; } auto pWeapon = g_LocalPlayer->m_hActiveWeapon(); if (!pWeapon || !(pWeapon->IsSniper() || pWeapon->IsPistol() || pWeapon->IsRifle())) { return false; } auto weaponData = pWeapon->GetCSWeaponData(); auto weapontype = weaponData->WeaponType; settings = g_Options.aimbot[pWeapon->m_Item().m_iItemDefinitionIndex()]; if (!settings.enabled || !(pCmd->buttons & IN_ATTACK)) { return false; } if ((pWeapon->m_Item().m_iItemDefinitionIndex() == WEAPON_AWP || pWeapon->m_Item().m_iItemDefinitionIndex() == WEAPON_SSG08) && settings.only_in_zoom && !g_LocalPlayer->m_bIsScoped()) { return false; } if (settings.fov == 0 && settings.silent_fov == 0 && !settings.rcs) { return false; } if (!pWeapon->HasBullets() || pWeapon->IsReloading()) { return false; } return true; } //-------------------------------------------------------------------------------- float Aimbot::GetSmooth() { float smooth = IsRcs() && settings.rcs_smooth_enabled ? settings.rcs_smooth : settings.smooth; if (settings.humanize) { smooth += RandomFloat(-1, 4); } return smooth; } //-------------------------------------------------------------------------------- void Aimbot::Smooth(QAngle currentAngle, QAngle aimAngle, QAngle& angle) { if (GetSmooth() <= 1) { return; } Vector vAimAngle; Math::AngleVectors(aimAngle, vAimAngle); Vector vCurrentAngle; Math::AngleVectors(currentAngle, vCurrentAngle); Vector delta = vAimAngle - vCurrentAngle; Vector smoothed = vCurrentAngle + delta / GetSmooth(); Math::VectorAngles(smoothed, angle); } //-------------------------------------------------------------------------------- void Aimbot::RCS(QAngle &angle, C_BasePlayer* target) { if (!settings.rcs || !IsRcs()) { return; } if (settings.rcs_x == 0 && settings.rcs_y == 0) { return; } if (target) { QAngle punch = g_LocalPlayer->m_aimPunchAngle(); angle.pitch -= punch.pitch * (settings.rcs_x / 50.f); angle.yaw -= punch.yaw * (settings.rcs_y / 50.f); } else if (settings.rcs_type == 0) { QAngle NewPunch = { CurrentPunch.pitch - RCSLastPunch.pitch, CurrentPunch.yaw - RCSLastPunch.yaw, 0 }; angle.pitch -= NewPunch.pitch * (settings.rcs_x / 50.f); angle.yaw -= NewPunch.yaw * (settings.rcs_y / 50.f); } Math::FixAngles(angle); } //-------------------------------------------------------------------------------- float Aimbot::GetFov() { if (IsRcs() && settings.rcs && settings.rcs_fov_enabled) return settings.rcs_fov; if (!silent_enabled) return settings.fov; return settings.silent_fov > settings.fov ? settings.silent_fov : settings.fov; } //-------------------------------------------------------------------------------- C_BasePlayer* Aimbot::GetClosestPlayer(CUserCmd* cmd, int &bestBone) { QAngle ang; Vector eVecTarget; Vector pVecTarget = g_LocalPlayer->GetEyePos(); if (target && !kill_delay && settings.kill_delay > 0 && target->IsNotTarget()) { target = NULL; shot_delay = false; kill_delay = true; kill_delay_time = (int)GetTickCount() + settings.kill_delay; } if (kill_delay) { if (kill_delay_time <= (int)GetTickCount()) kill_delay = false; else return NULL; } C_BasePlayer* player; target = NULL; int bestHealth = 100.f; float bestFov = 9999.f; float bestDamage = 0.f; float bestBoneFov = 9999.f; float bestDistance = 9999.f; int health; float fov; float damage; float distance; int fromBone = settings.aim_type == 1 ? 0 : settings.hitbox; int toBone = settings.aim_type == 1 ? 7 : settings.hitbox; for (int i = 1; i < g_EngineClient->GetMaxClients(); ++i) { damage = 0.f; player = (C_BasePlayer*)g_EntityList->GetClientEntity(i); if (player->IsNotTarget()) { continue; } if (!settings.deathmatch && player->m_iTeamNum() == g_LocalPlayer->m_iTeamNum()) { continue; } for (int bone = fromBone; bone <= toBone; bone++) { eVecTarget = player->GetHitboxPos(bone); Math::VectorAngles(eVecTarget - pVecTarget, ang); Math::FixAngles(ang); distance = pVecTarget.DistTo(eVecTarget); if (settings.fov_type == 1) fov = GetRealDistanceFOV(distance, ang, cmd); else fov = GetFovToPlayer(cmd->viewangles, ang); if (fov > GetFov()) { continue; } if (!g_LocalPlayer->CanSeePlayer(player, eVecTarget)) { if (!settings.autowall) { continue; } damage = Autowall::GetDamage(eVecTarget); if (damage < settings.min_damage) { continue; } } if ((settings.priority == 1 || settings.priority == 2) && damage == 0.f) { damage = Autowall::GetDamage(eVecTarget); } health = player->m_iHealth() - damage; if (settings.check_smoke && IsLineGoesThroughSmoke(pVecTarget, eVecTarget)) { continue; } if (settings.aim_type == 1 && bestBoneFov < fov) { continue; } bestBoneFov = fov; if ( (settings.priority == 0 && bestFov > fov) || (settings.priority == 1 && bestHealth > health) || (settings.priority == 2 && bestDamage < damage) || (settings.priority == 3 && distance < bestDistance) ) { bestBone = bone; target = player; bestFov = fov; bestHealth = health; bestDamage = damage; bestDistance = distance; } } } return target; } //-------------------------------------------------------------------------------- bool Aimbot::IsNotSilent(float fov) { return IsRcs() || !silent_enabled || (silent_enabled && fov > settings.silent_fov); } //-------------------------------------------------------------------------------- void Aimbot::OnMove(CUserCmd *pCmd) { if (!IsEnabled(pCmd)) { RCSLastPunch = { 0, 0, 0 }; is_delayed = false; shot_delay = false; kill_delay = false; silent_enabled = settings.silent && settings.silent_fov > 0; target = NULL; return; } QAngle angles = pCmd->viewangles; QAngle current = angles; float fov = 180.f; if (!(settings.check_flash && g_LocalPlayer->IsFlashed())) { int bestBone = -1; if (GetClosestPlayer(pCmd, bestBone)) { Math::VectorAngles(target->GetHitboxPos(bestBone) - g_LocalPlayer->GetEyePos(), angles); Math::FixAngles(angles); if (settings.fov_type == 1) fov = GetRealDistanceFOV(g_LocalPlayer->GetEyePos().DistTo(target->GetHitboxPos(bestBone)), angles, pCmd); else fov = GetFovToPlayer(pCmd->viewangles, angles); if (!settings.silent && !is_delayed && !shot_delay && settings.shot_delay > 0) { is_delayed = true; shot_delay = true; shot_delay_time = GetTickCount() + settings.shot_delay; } if (shot_delay && shot_delay_time <= GetTickCount()) { shot_delay = false; } if (shot_delay) { pCmd->buttons &= ~IN_ATTACK; } } } CurrentPunch = g_LocalPlayer->m_aimPunchAngle(); if (IsNotSilent(fov)) { RCS(angles, target); } RCSLastPunch = CurrentPunch; if (target && IsNotSilent(fov)) { Smooth(current, angles, angles); } Math::FixAngles(angles); pCmd->viewangles = angles; if (IsNotSilent(fov)) { g_EngineClient->SetViewAngles(angles); } silent_enabled = false; if (g_LocalPlayer->m_hActiveWeapon()->IsPistol() && settings.autopistol) { float server_time = g_LocalPlayer->m_nTickBase() * g_GlobalVars->interval_per_tick; float next_shot = g_LocalPlayer->m_hActiveWeapon()->m_flNextPrimaryAttack() - server_time; if (next_shot > 0) { pCmd->buttons &= ~IN_ATTACK; } } } Aimbot g_Aimbot;
Перед if (g_Options.misc_bhop) добавляемКод:#include "features/aimbot.h" #include "features/backtrack.h"
Компилируем, инжектим, наслаждаемсяКод:g_Aimbot.OnMove(cmd); g_Backtrack.OnMove(cmd);
Скрин меню:
Скрытое содержимое
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz