mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-01-04 00:23:27 +08:00
Added an option to the aimbot to make it retrieve the max distance for the current weapon. (#3430)
Fixed an exception coming from spoof_host_token if a pointer was invalid. Fixed the aimbot targeting "friendly NPCs" who were for some reason marked as hated NPC relationships.
This commit is contained in:
parent
eb68394382
commit
6e8c2106d4
@ -19,6 +19,7 @@ namespace big
|
|||||||
|
|
||||||
g_pointers->m_gta.m_profile_gamer_info->m_peer_id = *g_pointers->m_gta.m_peer_id;
|
g_pointers->m_gta.m_profile_gamer_info->m_peer_id = *g_pointers->m_gta.m_peer_id;
|
||||||
g_pointers->m_gta.m_player_info_gamer_info->m_peer_id = *g_pointers->m_gta.m_peer_id;
|
g_pointers->m_gta.m_player_info_gamer_info->m_peer_id = *g_pointers->m_gta.m_peer_id;
|
||||||
|
if (g_pointers->m_gta.m_communications != nullptr)
|
||||||
(*g_pointers->m_gta.m_communications)->m_voice.m_connections[0]->m_gamer_info.m_peer_id = *g_pointers->m_gta.m_peer_id;
|
(*g_pointers->m_gta.m_communications)->m_voice.m_connections[0]->m_gamer_info.m_peer_id = *g_pointers->m_gta.m_peer_id;
|
||||||
|
|
||||||
if (g_local_player && g_local_player->m_player_info)
|
if (g_local_player && g_local_player->m_player_info)
|
||||||
@ -36,6 +37,7 @@ namespace big
|
|||||||
|
|
||||||
g_pointers->m_gta.m_profile_gamer_info->m_host_token = token;
|
g_pointers->m_gta.m_profile_gamer_info->m_host_token = token;
|
||||||
g_pointers->m_gta.m_player_info_gamer_info->m_host_token = token;
|
g_pointers->m_gta.m_player_info_gamer_info->m_host_token = token;
|
||||||
|
if (g_pointers->m_gta.m_communications != nullptr)
|
||||||
(*g_pointers->m_gta.m_communications)->m_voice.m_connections[0]->m_gamer_info.m_host_token = token;
|
(*g_pointers->m_gta.m_communications)->m_voice.m_connections[0]->m_gamer_info.m_host_token = token;
|
||||||
|
|
||||||
if (g_local_player && g_local_player->m_player_info)
|
if (g_local_player && g_local_player->m_player_info)
|
||||||
|
@ -119,6 +119,17 @@ namespace big
|
|||||||
float best_fov = math::deg_to_rad(g.weapons.aimbot.fov);
|
float best_fov = math::deg_to_rad(g.weapons.aimbot.fov);
|
||||||
float best_distance = g.weapons.aimbot.distance;
|
float best_distance = g.weapons.aimbot.distance;
|
||||||
|
|
||||||
|
if (g.weapons.aimbot.use_weapon_range)
|
||||||
|
{
|
||||||
|
if (auto weapon_manager = g_local_player->m_weapon_manager)
|
||||||
|
{
|
||||||
|
if (auto weapon_info = weapon_manager->m_weapon_info)
|
||||||
|
{
|
||||||
|
best_distance = weapon_info->m_weapon_range;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (rage::CEntity* ped_ : pools::get_all_peds())
|
for (rage::CEntity* ped_ : pools::get_all_peds())
|
||||||
{
|
{
|
||||||
CPed* ped = (CPed*)ped_;
|
CPed* ped = (CPed*)ped_;
|
||||||
@ -163,15 +174,16 @@ namespace big
|
|||||||
{
|
{
|
||||||
case Dislike:
|
case Dislike:
|
||||||
case Wanted:
|
case Wanted:
|
||||||
case Hate: is_hated_relationship = true;
|
case Hate: is_hated_relationship = blip_color != HUD_COLOUR_BLUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_hated_relationship && !is_in_combat && !is_enemy)
|
if (!is_hated_relationship && !is_in_combat && !is_enemy)
|
||||||
{
|
{
|
||||||
/*if (PED::GET_PED_TYPE(ped_handle) != PED_TYPE_ANIMAL)
|
|
||||||
LOG(INFO) << " PED_TYPE " << PED::GET_PED_TYPE(ped_handle) << " hated " << is_hated_relationship << " combat " << is_in_combat << " enemy " << is_enemy << " blip_color " << blip_color;*/
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*if (PED::GET_PED_TYPE(ped_handle) != PED_TYPE_ANIMAL)
|
||||||
|
LOG(INFO) << " PED_TYPE " << PED::GET_PED_TYPE(ped_handle) << " hated " << is_hated_relationship << " combat " << is_in_combat << " enemy " << is_enemy << " blip_color " << blip_color;*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_a_ped_type_we_dont_care_about(ped_handle))
|
if (is_a_ped_type_we_dont_care_about(ped_handle))
|
||||||
|
@ -55,7 +55,7 @@ namespace big
|
|||||||
{
|
{
|
||||||
case Dislike:
|
case Dislike:
|
||||||
case Wanted:
|
case Wanted:
|
||||||
case Hate: is_hated_relationship = true;
|
case Hate: is_hated_relationship = blip_color != HUD_COLOUR_BLUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_hated_relationship && !is_in_combat && !is_enemy)
|
if (!is_hated_relationship && !is_in_combat && !is_enemy)
|
||||||
|
@ -904,6 +904,7 @@ namespace big
|
|||||||
bool exclude_friends = false;
|
bool exclude_friends = false;
|
||||||
bool only_on_enemy = false;
|
bool only_on_enemy = false;
|
||||||
bool has_target = false;
|
bool has_target = false;
|
||||||
|
bool use_weapon_range = false;
|
||||||
float fov = 60.f;
|
float fov = 60.f;
|
||||||
float distance = 200.f;
|
float distance = 200.f;
|
||||||
int32_t selected_bone = (int32_t)ePedBoneType::HEAD;
|
int32_t selected_bone = (int32_t)ePedBoneType::HEAD;
|
||||||
|
@ -225,7 +225,13 @@ namespace big
|
|||||||
|
|
||||||
ImGui::PushItemWidth(350);
|
ImGui::PushItemWidth(350);
|
||||||
ImGui::SliderFloat("VIEW_WEAPON_AIM_FOV"_T.data(), &g.weapons.aimbot.fov, 1.f, 360.f, "%.0f");
|
ImGui::SliderFloat("VIEW_WEAPON_AIM_FOV"_T.data(), &g.weapons.aimbot.fov, 1.f, 360.f, "%.0f");
|
||||||
|
if (g.weapons.aimbot.use_weapon_range)
|
||||||
|
ImGui::BeginDisabled();
|
||||||
ImGui::SliderFloat("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data(), &g.weapons.aimbot.distance, 1.f, 1000.f, "%.0f");
|
ImGui::SliderFloat("VIEW_SELF_CUSTOM_TELEPORT_DISTANCE"_T.data(), &g.weapons.aimbot.distance, 1.f, 1000.f, "%.0f");
|
||||||
|
ImGui::SameLine();
|
||||||
|
if (g.weapons.aimbot.use_weapon_range)
|
||||||
|
ImGui::EndDisabled();
|
||||||
|
ImGui::Checkbox("BACKEND_LOOPED_WEAPONS_USE_MAX_RANGE"_T.data(), &g.weapons.aimbot.use_weapon_range);
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user