Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.86 KB | None | 0 0
  1. int screenSizeX, screenCenterX;
  2. int screenSizeY, screenCenterY;
  3. auto lineSize = 8;
  4. g_pEngine->GetScreenSize(screenSizeX, screenSizeY);
  5.  
  6. //std::array< vec2_t, 3 >points{ vec2_t(screenSizeX / 2 - 16, screenSizeY / 2 - 16),
  7. //vec2_t(screenSizeX / 2 + 16, screenSizeY / 2),
  8. //vec2_t(screenSizeX / 2 - 16, screenSizeY / 2 + 16) };
  9.  
  10.  
  11. screenCenterX = screenSizeX / 2;
  12. screenCenterY = screenSizeY / 2;
  13.  
  14.  
  15. if (Hitmarkertime > 0) {
  16.  
  17.  
  18.  
  19.  
  20. Hitmarkertime = max(Hitmarkertime - 2, 0);
  21.  
  22. g_pSurface->Line(screenCenterX + 6, screenCenterY + 6, screenCenterX + 3, screenCenterY + 3, Color::White(Hitmarkertime));// Bottom right to center
  23. g_pSurface->Line(screenCenterX - 6, screenCenterY + 6, screenCenterX - 3, screenCenterY + 3, Color::White(Hitmarkertime));//Bottom left to center
  24. g_pSurface->Line(screenCenterX + 6, screenCenterY - 6, screenCenterX + 3, screenCenterY - 3, Color::White(Hitmarkertime));//Top right to center
  25. g_pSurface->Line(screenCenterX - 6, screenCenterY - 6, screenCenterX - 3, screenCenterY - 3, Color::White(Hitmarkertime));//Top left to center
  26. }
  27. Vector ViewAngs;
  28.  
  29. if (c_config::get().watermark) {
  30.  
  31. screenCenterX = screenSizeX / 2;
  32. screenCenterY = screenSizeY / 2;
  33. int fps = static_cast<int>(1.f / g_pGlobalVars->frametime);
  34. int tickrate = 1.f / g_pGlobalVars->intervalPerTick;
  35. SIZE sz;
  36. time_t current = time(0);
  37. std::string nomezao;
  38. nomezao += (" blooms.pw.pub | ");
  39. nomezao += ("fps: ");
  40. std::string timer;
  41. timer += std::to_string(current);
  42. std::string bouncyfps;
  43. bouncyfps += std::to_string(fps);
  44. std::string infozao = nomezao;
  45. auto net_channel = g_pEngine->GetNetChannelInfo();
  46. auto local_player = reinterpret_cast<C_BaseEntity*>(g_pEntityList->GetClientEntity(g_pEngine->GetLocalPlayer()));
  47. std::string incoming = local_player ? std::to_string((int)(net_channel->GetLatency(FLOW_INCOMING) * 1000)) : "0";
  48. std::string outgoing = local_player ? std::to_string((int)(net_channel->GetLatency(FLOW_OUTGOING) * 1000)) : "0";
  49.  
  50. int x, y;
  51. g_pEngine->GetScreenSize(x, y);
  52.  
  53. int w_s, h_s;
  54. int w, h;
  55. int w0, h0;
  56. g_pEngine->GetScreenSize(w_s, h_s);
  57.  
  58. w = w_s / 2; h = h_s / 2;
  59. //197
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66. x = 790 + 790, y = 5, w = 250, h = 30;
  67.  
  68. g_pSurface->DrawSetColor(Color(11, 11, 11));
  69.  
  70.  
  71. auto watermark = [](int x, int y, int w, int h, Color c) {
  72. g_pSurface->Line(x, y, x, y + h, c);
  73. g_pSurface->Line(x, y + h, x + w + 1, y + h, c);
  74. g_pSurface->Line(x + w, y, x + w, y + h, c);
  75. g_pSurface->Line(x, y, x + w, y, c);
  76. };
  77. static int u = 0;
  78. float watermarkScrollSpeed = 1.5f;
  79.  
  80. g_pSurface->FilledRect(x, y, w, h, Color(11, 11, 11));
  81. watermark(x - 0, y - 0, w + 0 * 2, h + 0 * 2, Color(18, 18, 18));
  82. watermark(x - 1, y - 1, w + 1 * 2, h + 1 * 2, Color(53, 53, 53));
  83. watermark(x - 2, y - 2, w + 2 * 2, h + 2 * 2, Color(28, 28, 28));
  84. watermark(x - 3, y - 3, w + 3 * 2, h + 3 * 2, Color(28, 28, 28));
  85. watermark(x - 4, y - 4, w + 4 * 2, h + 4 * 2, Color(28, 28, 28));
  86. watermark(x - 5, y - 5, w + 5 * 2, h + 5 * 2, Color(53, 53, 53));
  87. watermark(x - 6, y - 6, w + 6 * 2, h + 6 * 2, Color(18, 18, 18));
  88. //1700 + 5, 14
  89. //25, 65
  90. static double rainbow;
  91. rainbow += 0.001;
  92. if (rainbow > 1.f)
  93. rainbow = 0;
  94. Color color = Color::FromHSB(rainbow, 1.f, 1.f);
  95.  
  96. g_pSurface->DrawT(1600 + 3, 10, Color(c_config::get().menu_color_r, c_config::get().menu_color_g, c_config::get().menu_color_b), Globals::NEWFont, false, " FPS: PING: TICK: ");
  97. g_pSurface->DrawT(1650, 10, color, Globals::NEWFont, infozao.c_str(), bouncyfps.c_str());
  98. g_pSurface->DrawT(1740, 10, color, Globals::NEWFont, incoming.c_str(), outgoing.c_str());
  99.  
  100. ////////
  101. w = w_s / 2; h = h_s / 2;
  102. //197
  103. x = 930 + 930, y = 5, w = 50, h = 30;
  104.  
  105. auto watermark1 = [](int x, int y, int w, int h, Color c) {
  106. g_pSurface->Line(x, y, x, y + h, c);
  107. g_pSurface->Line(x, y + h, x + w + 1, y + h, c);
  108. g_pSurface->Line(x + w, y, x + w, y + h, c);
  109. g_pSurface->Line(x, y, x + w, y, c);
  110. };
  111. static int u1 = 0;
  112. float watermarkScrollSpeed1 = 1.5f;
  113.  
  114. // g_pSurface->DrawLine(x, y, w, h, 11, 11, 11));
  115.  
  116. g_pSurface->FilledRect(x, y, w, h, Color(11, 11, 11));
  117. watermark1(x - 0, y - 0, w + 0 * 2, h + 0 * 2, Color(18, 18, 18));
  118. watermark1(x - 1, y - 1, w + 1 * 2, h + 1 * 2, Color(53, 53, 53));
  119. watermark1(x - 2, y - 2, w + 2 * 2, h + 2 * 2, Color(28, 28, 28));
  120. watermark1(x - 3, y - 3, w + 3 * 2, h + 3 * 2, Color(28, 28, 28));
  121. watermark1(x - 4, y - 4, w + 4 * 2, h + 4 * 2, Color(28, 28, 28));
  122. watermark1(x - 5, y - 5, w + 5 * 2, h + 5 * 2, Color(53, 53, 53));
  123. watermark1(x - 6, y - 6, w + 6 * 2, h + 6 * 2, Color(18, 18, 18));
  124. //1700 + 5, 14
  125. //25, 65
  126.  
  127. g_pSurface->DrawT(1865 + 1, 7, color, Globals::WTTFont, false, "BS");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement