diff --git a/BigBaseV2/src/gui/tab_bar/main/online.cpp b/BigBaseV2/src/gui/tab_bar/main/online.cpp index 50949042..c6e59eea 100644 --- a/BigBaseV2/src/gui/tab_bar/main/online.cpp +++ b/BigBaseV2/src/gui/tab_bar/main/online.cpp @@ -61,11 +61,58 @@ namespace big if (ImGui::TreeNode("Spoofing")) { - if (ImGui::Checkbox("Spoof Online Rank", g_settings.options["spoof_rank"].get())) + auto& spoof = g_settings.options["spoofing"]; + + if (ImGui::Checkbox("Spoof Name", spoof["name"]["enabled"].get())) + g_settings.save(); + + std::string* sName = spoof["name"]["value"].get(); + char name[20]; + strcpy(name, sName->c_str()); + if (ImGui::InputText("###input_name", name, sizeof(name))) + { + spoof["name"]["value"] = std::string(name); + + g_settings.save(); + } + + ImGui::Separator(); + + if (ImGui::Checkbox("Spoof Online Rank", spoof["rank"]["enabled"].get())) g_settings.save(); ImGui::Text("Rank:"); - if (ImGui::InputInt("##rank", (PINT)g_settings.options["rank"].get(), 1, 50)) + if (ImGui::InputInt("##rank", (PINT)spoof["rank"]["value"].get(), 1, 50)) + g_settings.save(); + + ImGui::Separator(); + + if (ImGui::Checkbox("Spoof IP Address", spoof["ip_address"]["enabled"].get())) + g_settings.save(); + + ImGui::Text("IP Address:"); + int ip_address[4]; + ip_address[0] = spoof["ip_address"]["address"]["byte0"]; + ip_address[1] = spoof["ip_address"]["address"]["byte1"]; + ip_address[2] = spoof["ip_address"]["address"]["byte2"]; + ip_address[3] = spoof["ip_address"]["address"]["byte3"]; + if (ImGui::SliderInt4("###ip_address_spoof", ip_address, 0, 255)) + { + spoof["ip_address"]["address"]["byte0"] = ip_address[0]; + spoof["ip_address"]["address"]["byte1"] = ip_address[1]; + spoof["ip_address"]["address"]["byte2"] = ip_address[2]; + spoof["ip_address"]["address"]["byte3"] = ip_address[3]; + + g_settings.save(); + } + + ImGui::Separator(); + + if (ImGui::Checkbox("Spoof Rockstar ID", spoof["rockstar_id"]["enabled"].get())) + g_settings.save(); + + ImGui::Text("Rockstar ID:"); + if (ImGui::InputScalar("###rockstar_id_spoof", ImGuiDataType_U64, (PUINT64)spoof["rockstar_id"]["value"].get())) g_settings.save(); ImGui::TreePop(); diff --git a/BigBaseV2/src/hooks/send_net_info_to_lobby.cpp b/BigBaseV2/src/hooks/send_net_info_to_lobby.cpp index e20ca99a..5f85380d 100644 --- a/BigBaseV2/src/hooks/send_net_info_to_lobby.cpp +++ b/BigBaseV2/src/hooks/send_net_info_to_lobby.cpp @@ -4,14 +4,28 @@ namespace big { bool hooks::send_net_info_to_lobby(rage::netPlayerData* local_player, int64_t a2, int64_t a3, DWORD* a4) { + auto& spoof = g_settings.options["spoofing"]; + + if (spoof["name"]["enabled"]) + { + std::string* sName = spoof["name"]["value"].get(); + char name[20]; + strcpy(name, sName->c_str()); + memcpy(local_player->m_name, name, sizeof(name)); + } // const char name[20] = "How dare you!"; // memcpy(local_player->m_name, name, sizeof(name)); - local_player->m_online_ip.m_field1 = 69; - local_player->m_online_ip.m_field2 = 69; - local_player->m_online_ip.m_field3 = 69; - local_player->m_online_ip.m_field4 = 69; + + if (spoof["ip_address"]["enabled"]) + { + local_player->m_online_ip.m_field1 = spoof["ip_address"]["address"]["byte0"]; + local_player->m_online_ip.m_field2 = spoof["ip_address"]["address"]["byte1"]; + local_player->m_online_ip.m_field3 = spoof["ip_address"]["address"]["byte2"]; + local_player->m_online_ip.m_field4 = spoof["ip_address"]["address"]["byte3"]; + } - local_player->m_rockstar_id = 1337; + if (spoof["rockstar_id"]["enabled"]) + local_player->m_rockstar_id = spoof["rockstar_id"]["value"]; return g_hooking->m_send_net_info_to_lobby_hook.get_original()(local_player, a2, a3, a4); }