bool Hotkey(const char* label, int* k, const ImVec2& size_arg) { ImGuiWindow* window = ImGui::GetCurrentWindow(); if (window->SkipItems) return false; ImGuiContext& g = *GImGui; ImGuiIO& io = g.IO; const ImGuiStyle& style = g.Style; const ImGuiID id = window->GetID(label); const ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true); ImVec2 size = ImGui::CalcItemSize(size_arg, ImGui::CalcItemWidth(), label_size.y + style.FramePadding.y * 2.0f); const ImRect frame_bb(window->DC.CursorPos + ImVec2(label_size.x + style.ItemInnerSpacing.x, 0.0f), window->DC.CursorPos + size); const ImRect total_bb(window->DC.CursorPos, frame_bb.Max); ImGui::ItemSize(total_bb, style.FramePadding.y); if (!ImGui::ItemAdd(total_bb, id)) return false; const auto item_status_flags = g.CurrentItemFlags; const bool focus_requested = ImGui::FocusableItemRegister(window, g.ActiveId == id); const bool focus_requested_by_code = (item_status_flags & ImGuiItemStatusFlags_FocusedByCode) != 0; const bool focus_requested_by_tab = focus_requested && !focus_requested_by_code; const bool hovered = ImGui::ItemHoverable(frame_bb, id); if (hovered) { ImGui::SetHoveredID(id); g.MouseCursor = ImGuiMouseCursor_TextInput; } const bool user_clicked = hovered && io.MouseClicked[0]; if (focus_requested || user_clicked) { if (g.ActiveId != id) { // Start edition memset(io.MouseDown, 0, sizeof(io.MouseDown)); memset(io.KeysDown, 0, sizeof(io.KeysDown)); *k = 0; } ImGui::SetActiveID(id, window); ImGui::FocusWindow(window); } else if (io.MouseClicked[0]) { // Release focus when we click outside if (g.ActiveId == id) ImGui::ClearActiveID(); } bool value_changed = false; int key = *k; if (g.ActiveId == id) { for (auto i = 0; i < 5; i++) { if (io.MouseDown) { switch (i) { case 0: key = VK_LBUTTON; break; case 1: key = VK_RBUTTON; break; case 2: key = VK_MBUTTON; break; case 3: key = VK_XBUTTON1; break; case 4: key = VK_XBUTTON2; break; } value_changed = true; ImGui::ClearActiveID(); } } if (!value_changed) { for (auto i = VK_BACK; i <= VK_RMENU; i++) { if (io.KeysDown) { key = i; value_changed = true; ImGui::ClearActiveID(); } } } if (IsKeyPressedMap(ImGuiKey_Escape)) { *k = 0; ImGui::ClearActiveID(); } else { *k = key; } } |
p2 codeМного чего перепробовал, но ничего не получается, кто поможет сделать, могу заплатить небольшую сумму.
void misc::keybinds()
{
if (!m_engine()->IsInGame() || !m_engine()->IsConnected())
return;
if (!g_cfg.menu.keybinds)
return;
const auto freq = 1.f;
const auto real_time = m_globals()->m_realtime * freq;
const int r = std::floor(std::sin(real_time + 0.f) * 127.f + 128.f);
const int g = std::floor(std::sin(real_time + 2.f) * 127.f + 128.f);
const int b = std::floor(std::sin(real_time + 4.f) * 127.f + 128.f);
int specs = 0;
int modes = 0;
std::string spect = "";
std::string mode = "";
if (key_binds::get().get_key_bind_state(0)) {
spect += crypt_str("Auto fire");
spect += crypt_str("\n");
specs++;
switch (g_cfg.legitbot.autofire_key.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (key_binds::get().get_key_bind_state(1)) {
spect += crypt_str("Legit bot");
spect += crypt_str("\n");
specs++;
switch (g_cfg.legitbot.key.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (g_cfg.ragebot.double_tap && g_cfg.ragebot.double_tap_key.key > KEY_NONE && g_cfg.ragebot.double_tap_key.key < KEY_MAX && exploit::get().double_tap_key) {
spect += crypt_str("Doubletap");
spect += crypt_str("\n");
specs++;
switch (g_cfg.ragebot.double_tap_key.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (key_binds::get().get_key_bind_state(3)) {
spect += crypt_str("Safe point");
spect += crypt_str("\n");
specs++;
switch (g_cfg.ragebot.safe_point_key.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (g_ctx.globals.current_weapon != -1 && key_binds::get().get_key_bind_state(4 + g_ctx.globals.current_weapon))
{
spect += crypt_str("Damage override");
spect += crypt_str("\n");
specs++;
switch (g_cfg.ragebot.safe_point_key.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (g_cfg.antiaim.hide_shots && g_cfg.antiaim.hide_shots_key.key > KEY_NONE && g_cfg.antiaim.hide_shots_key.key < KEY_MAX && exploit::get().hide_shots_key) {
spect += crypt_str("Hide shots");
spect += crypt_str("\n");
specs++;
switch (g_cfg.antiaim.hide_shots_key.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (key_binds::get().get_key_bind_state(16)) {
spect += crypt_str("Flip desync");
spect += crypt_str("\n");
specs++;
switch (g_cfg.antiaim.flip_desync.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (key_binds::get().get_key_bind_state(17)) {
spect += crypt_str("Thirdperson");
spect += crypt_str("\n");
specs++;
switch (g_cfg.misc.thirdperson_toggle.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (key_binds::get().get_key_bind_state(18)) {
spect += crypt_str("Auto peek");
spect += crypt_str("\n");
specs++;
switch (g_cfg.misc.automatic_peek.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (key_binds::get().get_key_bind_state(19)) {
spect += crypt_str("Edge jump");
spect += crypt_str("\n");
specs++;
switch (g_cfg.misc.edge_jump.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (key_binds::get().get_key_bind_state(20)) {
spect += crypt_str("Fake duck");
spect += crypt_str("\n");
specs++;
switch (g_cfg.misc.fakeduck_key.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (key_binds::get().get_key_bind_state(21)) {
spect += crypt_str("Slow walk");
spect += crypt_str("\n");
specs++;
switch (g_cfg.misc.slowwalk_key.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
if (key_binds::get().get_key_bind_state(22)) {
spect += crypt_str("Body aim");
spect += crypt_str("\n");
specs++;
switch (g_cfg.ragebot.body_aim_key.mode) {
case 0: {
mode += crypt_str("[holding] ");
}break;
case 1: {
mode += crypt_str("[toggled] ");
}break;
}
mode += crypt_str("\n");
modes++;
}
ImVec2 p;
ImVec2 size_menu;
static bool window_set = false;
float speed = 10;
static bool finish = false;
static bool other_bind_pressed = false;
static int sub_tabs = false;
if (key_binds::get().get_key_bind_state(4 + hooks::rage_weapon) || key_binds::get().get_key_bind_state(16) || key_binds::get().get_key_bind_state(18) || key_binds::get().get_key_bind_state(20)
|| key_binds::get().get_key_bind_state(21) || key_binds::get().get_key_bind_state(17) || key_binds::get().get_key_bind_state(22) || key_binds::get().get_key_bind_state(13) || key_binds::get().get_key_bind_state(14) || key_binds::get().get_key_bind_state(15)
|| exploit::get().double_tap_key || exploit::get().hide_shots_key || key_binds::get().get_key_bind_state(0) || key_binds::get().get_key_bind_state(3) || key_binds::get().get_key_bind_state(23))
other_bind_pressed = true;
else
other_bind_pressed = false;
if (g_cfg.menu.windowsize_x_saved != g_cfg.menu.oldwindowsize_x_saved)
{
if (g_cfg.menu.windowsize_x_saved > g_cfg.menu.oldwindowsize_x_saved)
g_cfg.menu.windowsize_x_saved -= g_cfg.menu.speed;
if (g_cfg.menu.windowsize_x_saved < g_cfg.menu.oldwindowsize_x_saved)
g_cfg.menu.windowsize_x_saved += g_cfg.menu.speed;
}
if (g_cfg.menu.windowsize_y_saved != g_cfg.menu.oldwindowsize_y_saved)
{
if (g_cfg.menu.windowsize_y_saved > g_cfg.menu.oldwindowsize_y_saved)
g_cfg.menu.windowsize_y_saved -= g_cfg.menu.speed;
if (g_cfg.menu.windowsize_y_saved < g_cfg.menu.oldwindowsize_y_saved)
g_cfg.menu.windowsize_y_saved += g_cfg.menu.speed;
}
if (g_cfg.menu.windowsize_x_saved == g_cfg.menu.oldwindowsize_x_saved && g_cfg.menu.windowsize_y_saved == g_cfg.menu.oldwindowsize_y_saved)
finish = true;
else
finish = false;
if (!g_cfg.antiaim.flip_desync.key || !g_cfg.misc.automatic_peek.key || !g_cfg.misc.fakeduck_key.key || !g_cfg.misc.slowwalk_key.key || !g_cfg.ragebot.double_tap_key.key || !g_cfg.misc.fakeduck_key.key || !g_cfg.misc.thirdperson_toggle.key || !hooks::menu_open)
{
g_cfg.menu.windowsize_x_saved = 0;
g_cfg.menu.windowsize_y_saved = 0;
}
static float alpha_menu = 0.1f;
if (other_bind_pressed)
if (alpha_menu < 1.f)
alpha_menu += 0.05f;
else
if (alpha_menu > 0.1f)
alpha_menu -= 0.05f;
bool theme = true;
if ((g_cfg.menu.keybinds))
{
if ((other_bind_pressed && alpha_menu > 0.1f) || hooks::menu_open)
{
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha_menu);
if (ImGui::Begin("Binds", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar))
{
auto b_alpha = alpha_menu;
size_menu = ImGui::GetWindowSize();
p = ImGui::GetWindowPos();
auto draw = ImGui::GetWindowDrawList();
std::vector<std::string> keybind = { "Keybinds" };
draw->AddRectFilled({ p.x + 0, p.y + 0 }, { p.x + 220, p.y + 25 }, ImColor(15, 15, 15));
draw->AddRectFilledMultiColor({ p.x + 0, p.y + 2 }, { p.x + 220, p.y + 5 }, ImColor(205, 255, 55), ImColor(205, 255, 55), ImColor(205, 255, 55, 25), ImColor(205, 255, 55, 25));
draw->AddRectFilled({ p.x + 0, p.y + 0 }, { p.x + 220, p.y + 4 }, ImColor(205, 255, 55), 6);
ImGui::PushFont(c_menu::get().g_pinfoFont);
draw->AddText(ImVec2(p.x + 10, p.y + 7), ImColor(200, 200, 200), keybind.at(0).c_str());
if (specs > 0) spect += "\n";
if (modes > 0) mode += "\n";
ImVec2 size = ImGui::CalcTextSize(spect.c_str());
ImVec2 size2 = ImGui::CalcTextSize(mode.c_str());
ImGui::SetWindowSize(ImVec2(220, 25 + size.y));
ImGui::SetCursorPosY(25);
ImGui::Columns(2, "fart1", false);
ImGui::SetColumnWidth(0, 220 - (size2.x + 8));
ImGui::TextColored(ImVec4(1.f, 1.f, 1.f, alpha_menu), spect.c_str());
ImGui::NextColumn();
ImGui::TextColored(ImVec4(1.f, 1.f, 1.f, alpha_menu), mode.c_str());
ImGui::Columns(1);
ImGui::PopFont();
}
ImGui::End();
ImGui::PopStyleVar();
}
}
}
вызывать где вызываеться меню ибо это имгуиp2 code
Код:void misc::keybinds() { if (!m_engine()->IsInGame() || !m_engine()->IsConnected()) return; if (!g_cfg.menu.keybinds) return; const auto freq = 1.f; const auto real_time = m_globals()->m_realtime * freq; const int r = std::floor(std::sin(real_time + 0.f) * 127.f + 128.f); const int g = std::floor(std::sin(real_time + 2.f) * 127.f + 128.f); const int b = std::floor(std::sin(real_time + 4.f) * 127.f + 128.f); int specs = 0; int modes = 0; std::string spect = ""; std::string mode = ""; if (key_binds::get().get_key_bind_state(0)) { spect += crypt_str("Auto fire"); spect += crypt_str("\n"); specs++; switch (g_cfg.legitbot.autofire_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(1)) { spect += crypt_str("Legit bot"); spect += crypt_str("\n"); specs++; switch (g_cfg.legitbot.key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (g_cfg.ragebot.double_tap && g_cfg.ragebot.double_tap_key.key > KEY_NONE && g_cfg.ragebot.double_tap_key.key < KEY_MAX && exploit::get().double_tap_key) { spect += crypt_str("Doubletap"); spect += crypt_str("\n"); specs++; switch (g_cfg.ragebot.double_tap_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(3)) { spect += crypt_str("Safe point"); spect += crypt_str("\n"); specs++; switch (g_cfg.ragebot.safe_point_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (g_ctx.globals.current_weapon != -1 && key_binds::get().get_key_bind_state(4 + g_ctx.globals.current_weapon)) { spect += crypt_str("Damage override"); spect += crypt_str("\n"); specs++; switch (g_cfg.ragebot.safe_point_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (g_cfg.antiaim.hide_shots && g_cfg.antiaim.hide_shots_key.key > KEY_NONE && g_cfg.antiaim.hide_shots_key.key < KEY_MAX && exploit::get().hide_shots_key) { spect += crypt_str("Hide shots"); spect += crypt_str("\n"); specs++; switch (g_cfg.antiaim.hide_shots_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(16)) { spect += crypt_str("Flip desync"); spect += crypt_str("\n"); specs++; switch (g_cfg.antiaim.flip_desync.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(17)) { spect += crypt_str("Thirdperson"); spect += crypt_str("\n"); specs++; switch (g_cfg.misc.thirdperson_toggle.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(18)) { spect += crypt_str("Auto peek"); spect += crypt_str("\n"); specs++; switch (g_cfg.misc.automatic_peek.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(19)) { spect += crypt_str("Edge jump"); spect += crypt_str("\n"); specs++; switch (g_cfg.misc.edge_jump.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(20)) { spect += crypt_str("Fake duck"); spect += crypt_str("\n"); specs++; switch (g_cfg.misc.fakeduck_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(21)) { spect += crypt_str("Slow walk"); spect += crypt_str("\n"); specs++; switch (g_cfg.misc.slowwalk_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(22)) { spect += crypt_str("Body aim"); spect += crypt_str("\n"); specs++; switch (g_cfg.ragebot.body_aim_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } ImVec2 p; ImVec2 size_menu; static bool window_set = false; float speed = 10; static bool finish = false; static bool other_bind_pressed = false; static int sub_tabs = false; if (key_binds::get().get_key_bind_state(4 + hooks::rage_weapon) || key_binds::get().get_key_bind_state(16) || key_binds::get().get_key_bind_state(18) || key_binds::get().get_key_bind_state(20) || key_binds::get().get_key_bind_state(21) || key_binds::get().get_key_bind_state(17) || key_binds::get().get_key_bind_state(22) || key_binds::get().get_key_bind_state(13) || key_binds::get().get_key_bind_state(14) || key_binds::get().get_key_bind_state(15) || exploit::get().double_tap_key || exploit::get().hide_shots_key || key_binds::get().get_key_bind_state(0) || key_binds::get().get_key_bind_state(3) || key_binds::get().get_key_bind_state(23)) other_bind_pressed = true; else other_bind_pressed = false; if (g_cfg.menu.windowsize_x_saved != g_cfg.menu.oldwindowsize_x_saved) { if (g_cfg.menu.windowsize_x_saved > g_cfg.menu.oldwindowsize_x_saved) g_cfg.menu.windowsize_x_saved -= g_cfg.menu.speed; if (g_cfg.menu.windowsize_x_saved < g_cfg.menu.oldwindowsize_x_saved) g_cfg.menu.windowsize_x_saved += g_cfg.menu.speed; } if (g_cfg.menu.windowsize_y_saved != g_cfg.menu.oldwindowsize_y_saved) { if (g_cfg.menu.windowsize_y_saved > g_cfg.menu.oldwindowsize_y_saved) g_cfg.menu.windowsize_y_saved -= g_cfg.menu.speed; if (g_cfg.menu.windowsize_y_saved < g_cfg.menu.oldwindowsize_y_saved) g_cfg.menu.windowsize_y_saved += g_cfg.menu.speed; } if (g_cfg.menu.windowsize_x_saved == g_cfg.menu.oldwindowsize_x_saved && g_cfg.menu.windowsize_y_saved == g_cfg.menu.oldwindowsize_y_saved) finish = true; else finish = false; if (!g_cfg.antiaim.flip_desync.key || !g_cfg.misc.automatic_peek.key || !g_cfg.misc.fakeduck_key.key || !g_cfg.misc.slowwalk_key.key || !g_cfg.ragebot.double_tap_key.key || !g_cfg.misc.fakeduck_key.key || !g_cfg.misc.thirdperson_toggle.key || !hooks::menu_open) { g_cfg.menu.windowsize_x_saved = 0; g_cfg.menu.windowsize_y_saved = 0; } static float alpha_menu = 0.1f; if (other_bind_pressed) if (alpha_menu < 1.f) alpha_menu += 0.05f; else if (alpha_menu > 0.1f) alpha_menu -= 0.05f; bool theme = true; if ((g_cfg.menu.keybinds)) { if ((other_bind_pressed && alpha_menu > 0.1f) || hooks::menu_open) { ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha_menu); if (ImGui::Begin("Binds", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar)) { auto b_alpha = alpha_menu; size_menu = ImGui::GetWindowSize(); p = ImGui::GetWindowPos(); auto draw = ImGui::GetWindowDrawList(); std::vector<std::string> keybind = { "Keybinds" }; draw->AddRectFilled({ p.x + 0, p.y + 0 }, { p.x + 220, p.y + 25 }, ImColor(15, 15, 15)); draw->AddRectFilledMultiColor({ p.x + 0, p.y + 2 }, { p.x + 220, p.y + 5 }, ImColor(205, 255, 55), ImColor(205, 255, 55), ImColor(205, 255, 55, 25), ImColor(205, 255, 55, 25)); draw->AddRectFilled({ p.x + 0, p.y + 0 }, { p.x + 220, p.y + 4 }, ImColor(205, 255, 55), 6); ImGui::PushFont(c_menu::get().g_pinfoFont); draw->AddText(ImVec2(p.x + 10, p.y + 7), ImColor(200, 200, 200), keybind.at(0).c_str()); if (specs > 0) spect += "\n"; if (modes > 0) mode += "\n"; ImVec2 size = ImGui::CalcTextSize(spect.c_str()); ImVec2 size2 = ImGui::CalcTextSize(mode.c_str()); ImGui::SetWindowSize(ImVec2(220, 25 + size.y)); ImGui::SetCursorPosY(25); ImGui::Columns(2, "fart1", false); ImGui::SetColumnWidth(0, 220 - (size2.x + 8)); ImGui::TextColored(ImVec4(1.f, 1.f, 1.f, alpha_menu), spect.c_str()); ImGui::NextColumn(); ImGui::TextColored(ImVec4(1.f, 1.f, 1.f, alpha_menu), mode.c_str()); ImGui::Columns(1); ImGui::PopFont(); } ImGui::End(); ImGui::PopStyleVar(); } } }
Мне кажется он не это имел ввидуp2 code
вызывать где вызываеться меню ибо это имгуиКод:void misc::keybinds() { if (!m_engine()->IsInGame() || !m_engine()->IsConnected()) return; if (!g_cfg.menu.keybinds) return; const auto freq = 1.f; const auto real_time = m_globals()->m_realtime * freq; const int r = std::floor(std::sin(real_time + 0.f) * 127.f + 128.f); const int g = std::floor(std::sin(real_time + 2.f) * 127.f + 128.f); const int b = std::floor(std::sin(real_time + 4.f) * 127.f + 128.f); int specs = 0; int modes = 0; std::string spect = ""; std::string mode = ""; if (key_binds::get().get_key_bind_state(0)) { spect += crypt_str("Auto fire"); spect += crypt_str("\n"); specs++; switch (g_cfg.legitbot.autofire_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(1)) { spect += crypt_str("Legit bot"); spect += crypt_str("\n"); specs++; switch (g_cfg.legitbot.key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (g_cfg.ragebot.double_tap && g_cfg.ragebot.double_tap_key.key > KEY_NONE && g_cfg.ragebot.double_tap_key.key < KEY_MAX && exploit::get().double_tap_key) { spect += crypt_str("Doubletap"); spect += crypt_str("\n"); specs++; switch (g_cfg.ragebot.double_tap_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(3)) { spect += crypt_str("Safe point"); spect += crypt_str("\n"); specs++; switch (g_cfg.ragebot.safe_point_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (g_ctx.globals.current_weapon != -1 && key_binds::get().get_key_bind_state(4 + g_ctx.globals.current_weapon)) { spect += crypt_str("Damage override"); spect += crypt_str("\n"); specs++; switch (g_cfg.ragebot.safe_point_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (g_cfg.antiaim.hide_shots && g_cfg.antiaim.hide_shots_key.key > KEY_NONE && g_cfg.antiaim.hide_shots_key.key < KEY_MAX && exploit::get().hide_shots_key) { spect += crypt_str("Hide shots"); spect += crypt_str("\n"); specs++; switch (g_cfg.antiaim.hide_shots_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(16)) { spect += crypt_str("Flip desync"); spect += crypt_str("\n"); specs++; switch (g_cfg.antiaim.flip_desync.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(17)) { spect += crypt_str("Thirdperson"); spect += crypt_str("\n"); specs++; switch (g_cfg.misc.thirdperson_toggle.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(18)) { spect += crypt_str("Auto peek"); spect += crypt_str("\n"); specs++; switch (g_cfg.misc.automatic_peek.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(19)) { spect += crypt_str("Edge jump"); spect += crypt_str("\n"); specs++; switch (g_cfg.misc.edge_jump.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(20)) { spect += crypt_str("Fake duck"); spect += crypt_str("\n"); specs++; switch (g_cfg.misc.fakeduck_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(21)) { spect += crypt_str("Slow walk"); spect += crypt_str("\n"); specs++; switch (g_cfg.misc.slowwalk_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } if (key_binds::get().get_key_bind_state(22)) { spect += crypt_str("Body aim"); spect += crypt_str("\n"); specs++; switch (g_cfg.ragebot.body_aim_key.mode) { case 0: { mode += crypt_str("[holding] "); }break; case 1: { mode += crypt_str("[toggled] "); }break; } mode += crypt_str("\n"); modes++; } ImVec2 p; ImVec2 size_menu; static bool window_set = false; float speed = 10; static bool finish = false; static bool other_bind_pressed = false; static int sub_tabs = false; if (key_binds::get().get_key_bind_state(4 + hooks::rage_weapon) || key_binds::get().get_key_bind_state(16) || key_binds::get().get_key_bind_state(18) || key_binds::get().get_key_bind_state(20) || key_binds::get().get_key_bind_state(21) || key_binds::get().get_key_bind_state(17) || key_binds::get().get_key_bind_state(22) || key_binds::get().get_key_bind_state(13) || key_binds::get().get_key_bind_state(14) || key_binds::get().get_key_bind_state(15) || exploit::get().double_tap_key || exploit::get().hide_shots_key || key_binds::get().get_key_bind_state(0) || key_binds::get().get_key_bind_state(3) || key_binds::get().get_key_bind_state(23)) other_bind_pressed = true; else other_bind_pressed = false; if (g_cfg.menu.windowsize_x_saved != g_cfg.menu.oldwindowsize_x_saved) { if (g_cfg.menu.windowsize_x_saved > g_cfg.menu.oldwindowsize_x_saved) g_cfg.menu.windowsize_x_saved -= g_cfg.menu.speed; if (g_cfg.menu.windowsize_x_saved < g_cfg.menu.oldwindowsize_x_saved) g_cfg.menu.windowsize_x_saved += g_cfg.menu.speed; } if (g_cfg.menu.windowsize_y_saved != g_cfg.menu.oldwindowsize_y_saved) { if (g_cfg.menu.windowsize_y_saved > g_cfg.menu.oldwindowsize_y_saved) g_cfg.menu.windowsize_y_saved -= g_cfg.menu.speed; if (g_cfg.menu.windowsize_y_saved < g_cfg.menu.oldwindowsize_y_saved) g_cfg.menu.windowsize_y_saved += g_cfg.menu.speed; } if (g_cfg.menu.windowsize_x_saved == g_cfg.menu.oldwindowsize_x_saved && g_cfg.menu.windowsize_y_saved == g_cfg.menu.oldwindowsize_y_saved) finish = true; else finish = false; if (!g_cfg.antiaim.flip_desync.key || !g_cfg.misc.automatic_peek.key || !g_cfg.misc.fakeduck_key.key || !g_cfg.misc.slowwalk_key.key || !g_cfg.ragebot.double_tap_key.key || !g_cfg.misc.fakeduck_key.key || !g_cfg.misc.thirdperson_toggle.key || !hooks::menu_open) { g_cfg.menu.windowsize_x_saved = 0; g_cfg.menu.windowsize_y_saved = 0; } static float alpha_menu = 0.1f; if (other_bind_pressed) if (alpha_menu < 1.f) alpha_menu += 0.05f; else if (alpha_menu > 0.1f) alpha_menu -= 0.05f; bool theme = true; if ((g_cfg.menu.keybinds)) { if ((other_bind_pressed && alpha_menu > 0.1f) || hooks::menu_open) { ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha_menu); if (ImGui::Begin("Binds", NULL, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar)) { auto b_alpha = alpha_menu; size_menu = ImGui::GetWindowSize(); p = ImGui::GetWindowPos(); auto draw = ImGui::GetWindowDrawList(); std::vector<std::string> keybind = { "Keybinds" }; draw->AddRectFilled({ p.x + 0, p.y + 0 }, { p.x + 220, p.y + 25 }, ImColor(15, 15, 15)); draw->AddRectFilledMultiColor({ p.x + 0, p.y + 2 }, { p.x + 220, p.y + 5 }, ImColor(205, 255, 55), ImColor(205, 255, 55), ImColor(205, 255, 55, 25), ImColor(205, 255, 55, 25)); draw->AddRectFilled({ p.x + 0, p.y + 0 }, { p.x + 220, p.y + 4 }, ImColor(205, 255, 55), 6); ImGui::PushFont(c_menu::get().g_pinfoFont); draw->AddText(ImVec2(p.x + 10, p.y + 7), ImColor(200, 200, 200), keybind.at(0).c_str()); if (specs > 0) spect += "\n"; if (modes > 0) mode += "\n"; ImVec2 size = ImGui::CalcTextSize(spect.c_str()); ImVec2 size2 = ImGui::CalcTextSize(mode.c_str()); ImGui::SetWindowSize(ImVec2(220, 25 + size.y)); ImGui::SetCursorPosY(25); ImGui::Columns(2, "fart1", false); ImGui::SetColumnWidth(0, 220 - (size2.x + 8)); ImGui::TextColored(ImVec4(1.f, 1.f, 1.f, alpha_menu), spect.c_str()); ImGui::NextColumn(); ImGui::TextColored(ImVec4(1.f, 1.f, 1.f, alpha_menu), mode.c_str()); ImGui::Columns(1); ImGui::PopFont(); } ImGui::End(); ImGui::PopStyleVar(); } } }
если лв то в хукс срр
да
Проект предоставляет различный материал, относящийся к сфере киберспорта, программирования, ПО для игр, а также позволяет его участникам общаться на многие другие темы. Почта для жалоб: admin@yougame.biz