Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void eexomiindicatorKeybinds() {
- if (!g_Menu.Config.TopInfoBar)
- return;
- static int spec_x;
- static int spec_y;
- int pos_x = spec_x;
- int pos_y = spec_y;
- static int _drag_x = 300;
- static int _drag_y = 300;
- static bool _dragging = false;
- bool _click = false;
- if (GetAsyncKeyState(VK_LBUTTON))
- _click = true;
- Vector2D _mouse_pos = g_pSurface->GetMousePosition();
- if (_dragging && !_click)
- _dragging = false;
- if (_dragging && _click)
- {
- pos_x = _mouse_pos.x - _drag_x;
- pos_y = _mouse_pos.y - _drag_y;
- spec_x = pos_x;
- spec_y = pos_y;
- }
- int spec_width = 150;
- int spec_height = 160;
- if ((g_pSurface->MouseInRegion(pos_x + 50, pos_y + 50, 100, 60))) {
- _dragging = true;
- _drag_x = _mouse_pos.x - pos_x;
- _drag_y = _mouse_pos.y - pos_y;
- }
- int wa, ha;
- g_pEngine->GetScreenSize(wa, ha);
- auto local_player = g::pLocalEntity;
- if (!local_player) return;
- if (!local_player->IsAlive()) return;
- auto weapon = local_player->GetActiveWeapon();
- int w = 0, h = 0;
- g_pEngine->GetScreenSize(w, h);
- static auto draw_bar = [](int x, int y, float val, float max, const char* name, DWORD zalupa)
- {
- if (val > max)
- val = max;
- g_pSurface->DrawT(x + 12, y + 65, Color(255, 255, 255, 255), zalupa, true, name);
- g_pSurface->FilledRect(x, y, 25, 65, Color(30, 25, 29));
- g_pSurface->OutlinedRect(x, y, 25, 65, Color(0, 0, 0));
- g_pSurface->FilledRect(x, y, 25, 65 * (max / val), Color(255, 3, 20));
- };
- float desyncAmt = MaxDelta(g::pLocalEntity);
- static auto last_fake_origin = Vector();
- static auto last_origin = Vector();
- auto NetChannel = g_pEngine->GetNetChannel();
- if (!NetChannel) return;
- if (!NetChannel->m_nChokedPackets) {
- last_fake_origin = last_origin;
- last_origin = local_player->GetOrigin();
- }
- auto nci = g_pEngine->GetNetChannelInfo();
- if (!nci)
- return;
- g_pSurface->FilledRect(10, 450, 150, 90, Color(30, 25, 29));
- g_pSurface->OutlinedRect(10, 450, 150, 90, Color(255, 3, 20));
- draw_bar(25, 460, NetChannel->m_nChokedPackets, 1.0f, "CHOKE", g::EspTahoma);
- draw_bar(75, 460, desyncAmt, 1.0f, "DESYNC", g::EspTahoma);
- draw_bar(125, 460, NetChannel->m_nChokedPackets, 1.0f, "choke", g::EspTahoma);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement