diff --git a/src/backend/looped/weapons/aimbot.cpp b/src/backend/looped/weapons/aimbot.cpp index b8b46965..cec26286 100644 --- a/src/backend/looped/weapons/aimbot.cpp +++ b/src/backend/looped/weapons/aimbot.cpp @@ -144,8 +144,9 @@ namespace big continue; } - const auto is_not_a_player_and_we_target_only_players = g_aimbot_only_on_player.is_enabled() && !ped->m_player_info; - if (is_not_a_player_and_we_target_only_players) + const bool is_not_a_player_and_we_target_only_players = g_aimbot_only_on_player.is_enabled() && !ped->m_player_info; + const bool we_in_the_same_vehicle = self::veh != 0 && ped->m_vehicle == g_player_service->get_self()->get_current_vehicle(); + if (is_not_a_player_and_we_target_only_players || we_in_the_same_vehicle) { continue; } diff --git a/src/backend/looped/weapons/triggerbot.cpp b/src/backend/looped/weapons/triggerbot.cpp index 1c2c6a52..8cc8b6ca 100644 --- a/src/backend/looped/weapons/triggerbot.cpp +++ b/src/backend/looped/weapons/triggerbot.cpp @@ -30,8 +30,12 @@ namespace big if (ped_ptr == nullptr) return; - if (g.weapons.aimbot.only_on_player && !ped_ptr->m_player_info) + const bool trace_hit_non_player = g.weapons.aimbot.only_on_player && !ped_ptr->m_player_info; + const bool we_in_the_same_vehicle = self::veh != 0 && ped_ptr->m_vehicle == g_player_service->get_self()->get_current_vehicle(); + if (trace_hit_non_player || we_in_the_same_vehicle) + { return; + } if (g.weapons.aimbot.exclude_friends && ped_ptr->m_player_info) {