Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. void c_visuals::indicators2()
  2. {
  3. if (c_config::get().fakelag_on && (c_config::get().rage_fakelag_conds[0] || c_config::get().rage_fakelag_conds[1] || c_config::get().rage_fakelag_conds[2]) && c_config::get().fakelag) {
  4. auto local_player = Globals::LocalPlayer;
  5. if (!local_player) return;
  6. if (!local_player->IsAlive()) return;
  7. auto weapon = local_player->GetActiveWeapon();
  8. int w = 0, h = 0;
  9. g_pEngine->GetScreenSize(w, h);
  10.  
  11. static auto draw_bar = [](int x, int y, float val, float max, const char* name, DWORD zalupa) {
  12. if (val > max)
  13. val = max;
  14.  
  15.  
  16. g_pSurface->DrawT(x + 125 / 2, y - 8, Color(255, 255, 255, 255), zalupa, true, name);
  17. g_pSurface->FilledRect(x, y, 125, 15, Color(50, 50, 50, 75));
  18. g_pSurface->FilledRect(x, y, 125 * (val / max), 15, Color(0, 255, 0, 75));
  19. };
  20. static auto last_fake_origin = Vector();
  21. static auto last_origin = Vector();
  22. auto NetChannel = g_pEngine->GetNetChannel();
  23. if (!NetChannel) return;
  24. if (!NetChannel->m_nChokedPackets) {
  25. last_fake_origin = last_origin;
  26. last_origin = local_player->GetOrigin();
  27. }
  28. auto nci = g_pEngine->GetNetChannelInfo();
  29.  
  30. if (!nci)
  31. return;
  32. if (local_player->IsAlive()) {
  33.  
  34. draw_bar(10, h / 2 - 50, NetChannel->m_nChokedPackets, 17.0f, "choke", Globals::CourierNew);
  35.  
  36.  
  37. draw_bar(10, h / 2, (weapon->GetAmmo()) * 1000.0f, 400.0f, "extend", Globals::CourierNew);
  38.  
  39.  
  40. draw_bar(10, h / 2 + 50, last_fake_origin.DistToSqr(last_origin), 15.0f, "lc", Globals::CourierNew);
  41.  
  42. // g_pSurface->DrawT(Box.left + Box.right + 5, Box.top + (offsetY * 11), textcolor, font, false, ());
  43.  
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement