Advertisement
Guest User

ayyware old esp

a guest
Jul 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.89 KB | None | 0 0
  1. #include "ESP.h"
  2. #include "Interfaces.h"
  3. #include "RenderManager.h"
  4. #include "GlowManager.h"
  5. #include "Autowall.h"
  6. #include <stdio.h>
  7. #include <stdlib.h>
  8. #include "edge.h"
  9. #include "Hooks.h"
  10. DWORD GlowManager = *(DWORD*)(Utilities::Memory::FindPatternV2("client.dll", "0F 11 05 ?? ?? ?? ?? 83 C8 01 C7 05 ?? ?? ?? ?? 00 00 00 00") + 3);
  11.  
  12. #ifdef NDEBUG
  13. #define strenc( s ) std::string( cx_make_encrypted_string( s ) )
  14. #define charenc( s ) strenc( s ).c_str()
  15. #define wstrenc( s ) std::wstring( strenc( s ).begin(), strenc( s ).end() )
  16. #define wcharenc( s ) wstrenc( s ).c_str()
  17. #else
  18. #define strenc( s ) ( s )
  19. #define charenc( s ) ( s )
  20. #define wstrenc( s ) ( s )
  21. #define wcharenc( s ) ( s )
  22. #endif
  23.  
  24. #ifdef NDEBUG
  25. #define XorStr( s ) ( XorCompileTime::XorString< sizeof( s ) - 1, __COUNTER__ >( s, std::make_index_sequence< sizeof( s ) - 1>() ).decrypt() )
  26. #else
  27. #define XorStr( s ) ( s )
  28. #endif
  29.  
  30.  
  31. float lineLBY;
  32. float lineRealAngle;
  33. float lineFakeAngle;
  34. float lby2;
  35. float lspeed;
  36. float pitchmeme;
  37. float inaccuracy;
  38.  
  39. #ifdef NDEBUG
  40. #define strenc( s ) std::string( cx_make_encrypted_string( s ) )
  41. #define charenc( s ) strenc( s ).c_str()
  42. #define wstrenc( s ) std::wstring( strenc( s ).begin(), strenc( s ).end() )
  43. #define wcharenc( s ) wstrenc( s ).c_str()
  44. #else
  45. #define strenc( s ) ( s )
  46. #define charenc( s ) ( s )
  47. #define wstrenc( s ) ( s )
  48. #define wcharenc( s ) ( s )
  49. #endif
  50.  
  51. #ifdef NDEBUG
  52. #define XorStr( s ) ( XorCompileTime::XorString< sizeof( s ) - 1, __COUNTER__ >( s, std::make_index_sequence< sizeof( s ) - 1>() ).decrypt() )
  53. #else
  54. #define XorStr( s ) ( s )
  55. #endif
  56.  
  57. void CEsp::Init()
  58. {
  59. BombCarrier = nullptr;
  60. }
  61.  
  62. void CEsp::Move(CUserCmd *pCmd, bool &bSendPacket)
  63. {
  64.  
  65. }
  66.  
  67. void CEsp::Draw()
  68. {
  69. if (!Interfaces::Engine->IsConnected() || !Interfaces::Engine->IsInGame())
  70. return;
  71.  
  72. IClientEntity *pLocal = hackManager.pLocal();
  73.  
  74. for (int i = 0; i < Interfaces::EntList->GetHighestEntityIndex(); i++)
  75. {
  76. IClientEntity *pEntity = Interfaces::EntList->GetClientEntity(i);
  77. player_info_t pinfo;
  78.  
  79. if (pEntity && pEntity != pLocal && !pEntity->IsDormant())
  80. {
  81. if (Options::Menu.VisualsTab.OtherRadar.GetState())
  82. {
  83. DWORD m_bSpotted = NetVar.GetNetVar(0x839EB159);
  84. *(char*)((DWORD)(pEntity)+m_bSpotted) = 1;
  85. }
  86.  
  87. if (Options::Menu.VisualsTab.FiltersPlayers.GetState() && Interfaces::Engine->GetPlayerInfo(i, &pinfo) && pEntity->IsAlive())
  88. {
  89. DrawPlayer(pEntity, pinfo);
  90. }
  91.  
  92. ClientClass* cClass = (ClientClass*)pEntity->GetClientClass();
  93.  
  94. if (Options::Menu.VisualsTab.FiltersNades.GetState() && strstr(cClass->m_pNetworkName, "Projectile"))
  95. {
  96. DrawThrowable(pEntity);
  97. }
  98.  
  99. if (Options::Menu.VisualsTab.FiltersWeapons.GetState() && cClass->m_ClassID != (int)CSGOClassID::CBaseWeaponWorldModel && ((strstr(cClass->m_pNetworkName, "Weapon") || cClass->m_ClassID == (int)CSGOClassID::CDEagle || cClass->m_ClassID == (int)CSGOClassID::CAK47)))
  100. {
  101. DrawDrop(pEntity, cClass);
  102. }
  103.  
  104. if (Options::Menu.VisualsTab.FiltersC4.GetState())
  105. {
  106. if (cClass->m_ClassID == (int)CSGOClassID::CPlantedC4)
  107. DrawBombPlanted(pEntity, cClass);
  108.  
  109. if (cClass->m_ClassID == (int)CSGOClassID::CPlantedC4)
  110. BombTimer(pEntity, cClass);
  111.  
  112. if (cClass->m_ClassID == (int)CSGOClassID::CC4)
  113. DrawBomb(pEntity, cClass);
  114. }
  115.  
  116. // If entity is the bomb
  117. if (Options::Menu.VisualsTab.OptionsPlant.GetState())
  118. {
  119. if (cClass->m_ClassID == (int)CSGOClassID::CPlantedC4)
  120. DrawBombPlanted2(pEntity, cClass);
  121.  
  122. if (cClass->m_ClassID == (int)CSGOClassID::CPlantedC4)
  123. DrawBombPlanted(pEntity, cClass);
  124.  
  125. if (cClass->m_ClassID == (int)CSGOClassID::CC4)
  126. DrawBomb(pEntity, cClass);
  127. }
  128. }
  129. }
  130.  
  131. if (Options::Menu.VisualsTab.AARows.GetState())
  132. {
  133.  
  134. int screen_width, screen_height;
  135. Interfaces::Engine->GetScreenSize(screen_width, screen_height);
  136.  
  137. static const auto fake_color = Color(255, 0, 0, 255);
  138.  
  139.  
  140. auto client_viewangles = Vector();
  141. Interfaces::Engine->GetViewAngles(client_viewangles);
  142.  
  143. constexpr auto radius = 80.f;
  144.  
  145. const auto screen_center = Vector2D(screen_width / 2.f, screen_height / 2.f);
  146. const auto fake_rot = DEG2RAD(client_viewangles.y - lineFakeAngle - 90);
  147.  
  148. auto draw_arrow = [&](float rot, Color color) -> void
  149. {
  150. std::vector<Vertex_t> vertices;
  151. vertices.push_back(Vertex_t(Vector2D(screen_center.x + cosf(rot) * radius, screen_center.y + sinf(rot) * radius)));
  152. vertices.push_back(Vertex_t(Vector2D(screen_center.x + cosf(rot + DEG2RAD(12)) * (radius - 25.f), screen_center.y + sinf(rot + DEG2RAD(12)) * (radius - 25.f)))); //25
  153. vertices.push_back(Vertex_t(Vector2D(screen_center.x + cosf(rot - DEG2RAD(12)) * (radius - 25.f), screen_center.y + sinf(rot - DEG2RAD(12)) * (radius - 25.f)))); //25
  154. Render::TexturedPolygon(3, vertices, color);
  155. };
  156.  
  157. draw_arrow(fake_rot, fake_color);
  158.  
  159.  
  160. static const auto real_color = Color(0, 255, 0, 255);
  161.  
  162. const auto real_rot = DEG2RAD(client_viewangles.y - lineRealAngle - 90);
  163.  
  164. draw_arrow(real_rot, real_color);
  165.  
  166.  
  167. static const auto lby_color = Color(0, 0, 255);
  168.  
  169. const auto lby_rot = DEG2RAD(client_viewangles.y - lineLBY - 90);
  170.  
  171. draw_arrow(lby_rot, lby_color);
  172. }
  173.  
  174. if (Options::Menu.VisualsTab.OtherNoFlash.GetState())
  175. {
  176. DWORD m_flFlashMaxAlpha = NetVar.GetNetVar(0xFE79FB98);
  177. *(float*)((DWORD)pLocal + m_flFlashMaxAlpha) = 0;
  178. }
  179.  
  180. if (Options::Menu.VisualsTab.OptionsGlow.GetState())
  181. {
  182. DrawGlow();
  183. }
  184. if (Options::Menu.VisualsTab.EntityGlow.GetState())
  185. {
  186. EntityGlow();
  187. }
  188. }
  189.  
  190. void CEsp::DrawPlayer(IClientEntity* pEntity, player_info_t pinfo)
  191. {
  192. Box box;
  193. ESPBox Box;
  194. Color Color;
  195.  
  196. Vector max = pEntity->GetCollideable()->OBBMaxs(); //need fix
  197. Vector pos, pos3D;
  198. Vector top, top3D;
  199. pos3D = pEntity->GetOrigin();
  200. top3D = pos3D + Vector(0, 0, max.z);
  201.  
  202. if (!Render::TransformScreen(pos3D, pos) || !Render::TransformScreen(top3D, top))
  203. return;
  204.  
  205. if (Options::Menu.VisualsTab.FiltersEnemiesOnly.GetState() && (pEntity->GetTeamNum() == hackManager.pLocal()->GetTeamNum()))
  206. return;
  207.  
  208. if (get_box(pEntity, box, Options::Menu.VisualsTab.Active.GetState()))
  209. {
  210. Color = GetPlayerColor(pEntity);
  211.  
  212. if (Options::Menu.VisualsTab.OptionsBox.GetState())
  213. DrawBoxx(box, Color);
  214.  
  215. if (Options::Menu.VisualsTab.OptionsName.GetState())
  216. DrawName(pinfo, box);
  217.  
  218. if (Options::Menu.VisualsTab.OptionsHealth.GetState())
  219. DrawHealth(pEntity, box);
  220.  
  221. if (Options::Menu.VisualsTab.OptionsInfo.GetState() || Options::Menu.VisualsTab.OptionsWeapone.GetState())
  222. DrawInfo(pEntity, box);
  223.  
  224. if (Options::Menu.VisualsTab.OptionsSkeleton.GetState())
  225. DrawSkeleton(pEntity);
  226.  
  227. if (Options::Menu.VisualsTab.AmmoBar.GetState())
  228. AmmoBar(pEntity, box);
  229.  
  230. if (Options::Menu.VisualsTab.OptionsPlant.GetState())
  231. DefuseWarning(pEntity);
  232.  
  233. if (Options::Menu.VisualsTab.OptionsAimSpot.GetState())
  234. DrawCross(pEntity);
  235. }
  236.  
  237. //if (GetBox(pEntity, Box))
  238. // {
  239. // Color = GetPlayerColor(pEntity);
  240. // }
  241. }
  242.  
  243. float dot_product_t(const float* a, const float* b) {
  244. return (a[0] * b[0] + a[1] * b[1] + a[2] * b[2]);
  245. }
  246.  
  247. void vector_transform_a(const float *in1, const matrix3x4& in2, float *out) {
  248. out[0] = dot_product_t(in1, in2[0]) + in2[0][3];
  249. out[1] = dot_product_t(in1, in2[1]) + in2[1][3];
  250. out[2] = dot_product_t(in1, in2[2]) + in2[2][3];
  251. }
  252.  
  253. inline void vector_transform_z(const Vector& in1, const matrix3x4 &in2, Vector &out) {
  254. vector_transform_a(&in1.x, in2, &out.x);
  255. }
  256.  
  257. bool CEsp::get_box(IClientEntity* m_entity, Box& box, bool dynamic) {
  258. DWORD m_rgflCoordinateFrame = (DWORD)0x470 - 0x30;
  259. const matrix3x4& trnsf = *(matrix3x4*)((DWORD)m_entity + (DWORD)m_rgflCoordinateFrame);
  260.  
  261. Vector vOrigin, min, max, sMin, sMax, sOrigin,
  262. flb, brt, blb, frt, frb, brb, blt, flt;
  263.  
  264. float left, top, right, bottom;
  265.  
  266. vOrigin = m_entity->GetOrigin();
  267. min = m_entity->collisionProperty()->GetMins();
  268. max = m_entity->collisionProperty()->GetMaxs();
  269.  
  270. if (!dynamic) {
  271. min += vOrigin;
  272. max += vOrigin;
  273. }
  274.  
  275. Vector points[] = { Vector(min.x, min.y, min.z),
  276. Vector(min.x, max.y, min.z),
  277. Vector(max.x, max.y, min.z),
  278. Vector(max.x, min.y, min.z),
  279. Vector(max.x, max.y, max.z),
  280. Vector(min.x, max.y, max.z),
  281. Vector(min.x, min.y, max.z),
  282. Vector(max.x, min.y, max.z) };
  283.  
  284. Vector vector_transformed[8];
  285.  
  286. if (dynamic)
  287. {
  288. for (int i = 0; i < 8; i++)
  289. {
  290. vector_transform_z(points[i], trnsf, vector_transformed[i]);
  291. points[i] = vector_transformed[i];
  292. }
  293. }
  294. if (!Render::TransformScreen(points[3], flb) || !Render::TransformScreen(points[5], brt)
  295. || !Render::TransformScreen(points[0], blb) || !Render::TransformScreen(points[4], frt)
  296. || !Render::TransformScreen(points[2], frb) || !Render::TransformScreen(points[1], brb)
  297. || !Render::TransformScreen(points[6], blt) || !Render::TransformScreen(points[7], flt))
  298. return false;
  299.  
  300. Vector arr[] = { flb, brt, blb, frt, frb, brb, blt, flt };
  301. left = flb.x;
  302. top = flb.y;
  303. right = flb.x;
  304. bottom = flb.y;
  305.  
  306. for (int i = 1; i < 8; i++) {
  307. if (left > arr[i].x)
  308. left = arr[i].x;
  309. if (bottom < arr[i].y)
  310. bottom = arr[i].y;
  311. if (right < arr[i].x)
  312. right = arr[i].x;
  313. if (top > arr[i].y)
  314. top = arr[i].y;
  315. }
  316.  
  317. box.x = left;
  318. box.y = top;
  319. box.w = right - left;
  320. box.h = bottom - top;
  321.  
  322. return true;
  323. }
  324. bool CEsp::GetBox(IClientEntity* pEntity, CEsp::ESPBox &result)
  325. {
  326. Vector vOrigin, min, max, sMin, sMax, sOrigin,
  327. flb, brt, blb, frt, frb, brb, blt, flt;
  328. float left, top, right, bottom;
  329.  
  330. vOrigin = pEntity->GetOrigin();
  331. min = pEntity->collisionProperty()->GetMins() + vOrigin;
  332. max = pEntity->collisionProperty()->GetMaxs() + vOrigin;
  333.  
  334. Vector points[] = { Vector(min.x, min.y, min.z),
  335. Vector(min.x, max.y, min.z),
  336. Vector(max.x, max.y, min.z),
  337. Vector(max.x, min.y, min.z),
  338. Vector(max.x, max.y, max.z),
  339. Vector(min.x, max.y, max.z),
  340. Vector(min.x, min.y, max.z),
  341. Vector(max.x, min.y, max.z) };
  342.  
  343. if (!Render::TransformScreen(points[3], flb) || !Render::TransformScreen(points[5], brt)
  344. || !Render::TransformScreen(points[0], blb) || !Render::TransformScreen(points[4], frt)
  345. || !Render::TransformScreen(points[2], frb) || !Render::TransformScreen(points[1], brb)
  346. || !Render::TransformScreen(points[6], blt) || !Render::TransformScreen(points[7], flt))
  347. return false;
  348.  
  349. Vector arr[] = { flb, brt, blb, frt, frb, brb, blt, flt };
  350.  
  351. left = flb.x;
  352. top = flb.y;
  353. right = flb.x;
  354. bottom = flb.y;
  355.  
  356. for (int i = 1; i < 8; i++)
  357. {
  358. if (left > arr[i].x)
  359. left = arr[i].x;
  360. if (bottom < arr[i].y)
  361. bottom = arr[i].y;
  362. if (right < arr[i].x)
  363. right = arr[i].x;
  364. if (top > arr[i].y)
  365. top = arr[i].y;
  366. }
  367.  
  368. result.x = left;
  369. result.y = top;
  370. result.w = right - left;
  371. result.h = bottom - top;
  372.  
  373. return true;
  374. }
  375.  
  376. Color CEsp::GetPlayerColor(IClientEntity* pEntity)
  377. {
  378. int TeamNum = pEntity->GetTeamNum();
  379. bool IsVis = GameUtils::IsVisible(hackManager.pLocal(), pEntity, (int)CSGOHitboxID::HITBOX_HEAD);
  380.  
  381. Color color;
  382.  
  383. if (TeamNum == TEAM_CS_T)
  384. {
  385. if (IsVis)
  386. color = Color(Options::Menu.ColorsTab.BoxR.GetValue(), Options::Menu.ColorsTab.BoxG.GetValue(), Options::Menu.ColorsTab.BoxB.GetValue(), 255);
  387. else
  388. color = Color(Options::Menu.ColorsTab.BoxR.GetValue(), Options::Menu.ColorsTab.BoxG.GetValue(), Options::Menu.ColorsTab.BoxB.GetValue(), 255);
  389. }
  390. else
  391. {
  392. if (IsVis)
  393. color = Color(Options::Menu.ColorsTab.BoxR.GetValue(), Options::Menu.ColorsTab.BoxG.GetValue(), Options::Menu.ColorsTab.BoxB.GetValue(), 255);
  394. else
  395. color = Color(Options::Menu.ColorsTab.BoxR.GetValue(), Options::Menu.ColorsTab.BoxG.GetValue(), Options::Menu.ColorsTab.BoxB.GetValue(), 255);
  396. }
  397.  
  398. return color;
  399. }
  400.  
  401. void CEsp::DrawLinesAA(Color color)
  402. {
  403. if (Options::Menu.VisualsTab.OtherAALines.GetState())
  404. {
  405. IClientEntity *pLocal = hackManager.pLocal();
  406.  
  407. Vector src3D, dst3D, forward, src, dst;
  408. trace_t tr;
  409. Ray_t ray;
  410. CTraceFilter filter;
  411.  
  412. filter.pSkip = hackManager.pLocal();
  413.  
  414. AngleVectors(QAngle(0, pLocal->GetLowerBodyYaw(), 0), &forward);
  415. src3D = hackManager.pLocal()->GetOrigin();
  416. dst3D = src3D + (forward * 35.f); //replace 50 with the length you want the line to have
  417.  
  418. ray.Init(src3D, dst3D);
  419.  
  420. Interfaces::Trace->TraceRay(ray, 0, &filter, &tr);
  421.  
  422. if (!Render::WorldToScreen(src3D, src) || !Render::WorldToScreen(tr.endpos, dst))
  423. return;
  424.  
  425. Render::Line(src.x, src.y, dst.x, dst.y, Color(255, 165, 0, 255));
  426. //Render::Text(dst.x, dst.y, Color(255, 165.f, 0, 255), Render::Fonts::ESP, "lby");
  427.  
  428. AngleVectors(QAngle(0, lineRealAngle, 0), &forward);
  429. dst3D = src3D + (forward * 40.f); //replace 50 with the length you want the line to have
  430.  
  431. ray.Init(src3D, dst3D);
  432.  
  433. Interfaces::Trace->TraceRay(ray, 0, &filter, &tr);
  434.  
  435. if (!Render::WorldToScreen(src3D, src) || !Render::WorldToScreen(tr.endpos, dst))
  436. return;
  437.  
  438. Render::Line(src.x, src.y, dst.x, dst.y, Color(0, 255, 0, 255));
  439. //Render::Text(dst.x, dst.y, Color(0, 255.f, 0, 255), Render::Fonts::ESP, "real");
  440.  
  441. AngleVectors(QAngle(0, lineFakeAngle, 0), &forward);
  442. dst3D = src3D + (forward * 45.f); //replace 50 with the length you want the line to have
  443.  
  444. ray.Init(src3D, dst3D);
  445.  
  446. Interfaces::Trace->TraceRay(ray, 0, &filter, &tr);
  447.  
  448. if (!Render::WorldToScreen(src3D, src) || !Render::WorldToScreen(tr.endpos, dst))
  449. return;
  450.  
  451. Render::Line(src.x, src.y, dst.x, dst.y, Color(255, 0, 0, 255));
  452. //Render::Text(dst.x, dst.y, Color(255, 0.f, 0, 255), Render::Fonts::ESP, "fake");
  453. }
  454. }
  455.  
  456. void CEsp::Corners(CEsp::ESPBox size, Color color, IClientEntity* pEntity)
  457. {
  458. int VertLine = (((float)size.w) * (0.20f));
  459. int HorzLine = (((float)size.h) * (0.30f));
  460.  
  461. Render::Clear(size.x, size.y - 1, VertLine, 1, Color(0, 0, 0, 255));
  462. Render::Clear(size.x + size.w - VertLine, size.y - 1, VertLine, 1, Color(0, 0, 0, 255));
  463. Render::Clear(size.x, size.y + size.h - 1, VertLine, 1, Color(0, 0, 0, 255));
  464. Render::Clear(size.x + size.w - VertLine, size.y + size.h - 1, VertLine, 1, Color(0, 0, 0, 255));
  465.  
  466. Render::Clear(size.x - 1, size.y, 1, HorzLine, Color(0, 0, 0, 255));
  467. Render::Clear(size.x - 1, size.y + size.h - HorzLine, 1, HorzLine, Color(0, 0, 0, 255));
  468. Render::Clear(size.x + size.w - 1, size.y, 1, HorzLine, Color(0, 0, 0, 255));
  469. Render::Clear(size.x + size.w - 1, size.y + size.h - HorzLine, 1, HorzLine, Color(0, 0, 0, 255));
  470.  
  471. Render::Clear(size.x, size.y, VertLine, 1, color);
  472. Render::Clear(size.x + size.w - VertLine, size.y, VertLine, 1, color);
  473. Render::Clear(size.x, size.y + size.h, VertLine, 1, color);
  474. Render::Clear(size.x + size.w - VertLine, size.y + size.h, VertLine, 1, color);
  475.  
  476. Render::Clear(size.x, size.y, 1, HorzLine, color);
  477. Render::Clear(size.x, size.y + size.h - HorzLine, 1, HorzLine, color);
  478. Render::Clear(size.x + size.w, size.y, 1, HorzLine, color);
  479. Render::Clear(size.x + size.w, size.y + size.h - HorzLine, 1, HorzLine, color);
  480. }
  481.  
  482. void CEsp::FilledBox(CEsp::ESPBox size, Color color)
  483. {
  484. int VertLine = (((float)size.w) * (0.20f));
  485. int HorzLine = (((float)size.h) * (0.20f));
  486.  
  487. Render::Clear(size.x + 1, size.y + 1, size.w - 2, size.h - 2, Color(0, 0, 0, 40));
  488. Render::Clear(size.x + 1, size.y + 1, size.w - 2, size.h - 2, Color(0, 0, 0, 40));
  489. Render::Clear(size.x, size.y, VertLine, 1, color);
  490. Render::Clear(size.x + size.w - VertLine, size.y, VertLine, 1, color);
  491. Render::Clear(size.x, size.y + size.h, VertLine, 1, color);
  492. Render::Clear(size.x + size.w - VertLine, size.y + size.h, VertLine, 1, color);
  493. Render::Clear(size.x + 1, size.y + 1, size.w - 2, size.h - 2, Color(0, 0, 0, 40));
  494. Render::Clear(size.x, size.y, 1, HorzLine, color);
  495. Render::Clear(size.x, size.y + size.h - HorzLine, 1, HorzLine, color);
  496. Render::Clear(size.x + size.w, size.y, 1, HorzLine, color);
  497. Render::Clear(size.x + size.w, size.y + size.h - HorzLine, 1, HorzLine, color);
  498. Render::Clear(size.x + 1, size.y + 1, size.w - 2, size.h - 2, Color(0, 0, 0, 40));
  499. }
  500.  
  501. /*void CEsp::DrawBoxx(Box box, Color color)
  502. {
  503. Render::Outline(box.x, box.y, box.w, box.h, color);
  504. Render::Outline(box.x - 1, box.y - 1, box.w + 2, box.h + 2, Color(21, 21, 21, 150));
  505. Render::Outline(box.x + 1, box.y + 1, box.w - 2, box.h - 2, Color(21, 21, 21, 150));
  506. }*/
  507.  
  508. void CEsp::DrawBoxx(Box box, Color color)
  509. {
  510. Render::Outline(box.x, box.y, box.w, box.h, color);
  511. Render::Outline(box.x + 2, box.y + 1, box.w - 1, box.h - 1, Color(21, 21, 21, 150));
  512. Render::Outline(box.x - 2, box.y - 1, box.w + 1, box.h + 1, Color(21, 21, 21, 150));
  513.  
  514.  
  515. }
  516.  
  517. std::string CleanItemName(std::string name)
  518. {
  519. std::string Name = name;
  520. if (Name[0] == 'C')
  521. Name.erase(Name.begin());
  522.  
  523. auto startOfWeap = Name.find("Weapon");
  524. if (startOfWeap != std::string::npos)
  525. Name.erase(Name.begin() + startOfWeap, Name.begin() + startOfWeap + 6);
  526.  
  527. return Name;
  528. }
  529.  
  530.  
  531.  
  532.  
  533. static wchar_t* CharToWideChar(const char* text)
  534. {
  535. size_t size = strlen(text) + 1;
  536. wchar_t* wa = new wchar_t[size];
  537. mbstowcs_s(NULL, wa, size / 4, text, size);
  538. return wa;
  539. }
  540.  
  541. void CEsp::BombTimer(IClientEntity* pEntity, ClientClass* cClass)
  542. {
  543. BombCarrier = nullptr;
  544.  
  545. Vector vOrig; Vector vScreen;
  546. vOrig = pEntity->GetOrigin();
  547. CCSBomb* Bomb = (CCSBomb*)pEntity;
  548.  
  549. if (Render::TransformScreen(vOrig, vScreen))
  550. {
  551.  
  552.  
  553. float flBlow = Bomb->GetC4BlowTime();
  554. float TimeRemaining = flBlow - (Interfaces::Globals->interval_per_tick * hackManager.pLocal()->GetTickBase());
  555. float TimeRemaining2;
  556. bool exploded = true;
  557. if (TimeRemaining < 0)
  558. {
  559. !exploded;
  560.  
  561. TimeRemaining2 = 0;
  562. }
  563. else
  564. {
  565. exploded = true;
  566. TimeRemaining2 = TimeRemaining;
  567. }
  568. char buffer[64];
  569. if (exploded)
  570. {
  571. sprintf_s(buffer, "Bomb: %.1f", TimeRemaining2);
  572. }
  573. else
  574. {
  575. sprintf_s(buffer, "Bomb Undefusable", TimeRemaining2);
  576. }
  577. Render::Text(vScreen.x, vScreen.y, Color(0, 255, 50, 255), Render::Fonts::ESP, buffer);
  578. }
  579. }
  580.  
  581. void CEsp::DrawName(player_info_t pinfo, Box size)
  582. {
  583. if (strlen(pinfo.name) > 16)
  584. {
  585. pinfo.name[12] = 0;
  586. strcat(pinfo.name, "...");
  587. RECT nameSize = Render::GetTextSize(Render::Fonts::ESP, pinfo.name);
  588. Render::Text(size.x + (size.w / 2) - (nameSize.right / 2), size.y - 9, Color(255, 255, 255, 255), Render::Fonts::ESP, pinfo.name); //11
  589. }
  590. else
  591. {
  592. RECT nameSize = Render::GetTextSize(Render::Fonts::ESP, pinfo.name);
  593. Render::Text(size.x + (size.w / 2) - (nameSize.right / 2), size.y - 9, Color(255, 255, 255, 255), Render::Fonts::ESP, pinfo.name); //11
  594. }
  595. }
  596.  
  597. void CEsp::DrawHealth(IClientEntity* pEntity, Box size)
  598. {
  599.  
  600.  
  601.  
  602. int HPEnemy = 100;
  603. HPEnemy = pEntity->GetHealth();
  604. char nameBuffer[512];
  605. sprintf_s(nameBuffer, "%d", HPEnemy);
  606. float h = (size.h);
  607. float health = pEntity->GetHealth();
  608. UINT hp = h - (UINT)((h * health) / 100);
  609.  
  610. int Health = pEntity->GetHealth();
  611. if (Health > 100)
  612. Health = 100;
  613. int healthG = Health * 2.55;
  614. int healthR = 255 - healthG;
  615. Interfaces::Surface->DrawSetColor(0, 0, 0, 150);
  616. Interfaces::Surface->DrawOutlinedRect(size.x - 2.5, size.y - 1, size.x - 1, size.y + size.h + 1);
  617. //Interfaces::Surface->DrawOutlinedRect(BOX.x + BOX.w + 1, BOX.y - 1, BOX.x + BOX.w + 5, BOX.y + BOX.h + 1);
  618.  
  619. int hpBarH = Health * size.h / 100;
  620.  
  621. if (Health > 0)
  622. {
  623.  
  624. Interfaces::Surface->DrawSetColor(healthR, healthG, 0, 255);
  625. Interfaces::Surface->DrawFilledRect(size.x - 4, size.y + size.h - hpBarH, size.x - 2, size.y + size.h);
  626. }
  627.  
  628. if (Health < 100)
  629. {
  630.  
  631. Render::Text(size.x - 10, size.y + hp - 2, Color(255, 255, 255, 255), Render::Fonts::ESP, nameBuffer);
  632. }
  633.  
  634. }
  635.  
  636. void CEsp::DrawInfo(IClientEntity* pEntity, Box size)
  637. {
  638. RECT defSize = Render::GetTextSize(Render::Fonts::ESP, "");
  639. std::vector<std::string> Info;
  640.  
  641. // Player Weapon ESP
  642. IClientEntity* pWeapon = Interfaces::EntList->GetClientEntityFromHandle((HANDLE)pEntity->GetActiveWeaponHandle());
  643.  
  644. if (Options::Menu.VisualsTab.OptionsWeapone.GetState())
  645. {
  646.  
  647. if (Options::Menu.VisualsTab.AmmoBar.GetState())
  648. {
  649. RECT nameSize = Render::GetTextSize(Render::Fonts::ESP, pWeapon->GetWeaponName());
  650. Render::Text(size.x + (size.w / 2) - (nameSize.right / 2), size.y + size.h + 5,
  651. Color(255, 255, 255, 255), Render::Fonts::ESP, pWeapon->GetWeaponName());
  652. }
  653. else
  654. {
  655. RECT nameSize = Render::GetTextSize(Render::Fonts::ESP, pWeapon->GetWeaponName());
  656. Render::Text(size.x + (size.w / 2) - (nameSize.right / 2), size.y + size.h,
  657. Color(255, 255, 255, 255), Render::Fonts::ESP, pWeapon->GetWeaponName());
  658. }
  659. }
  660. if (Options::Menu.VisualsTab.OptionsInfo.GetState())
  661. {
  662.  
  663. if (pEntity->ArmorValue() > 0)
  664. {
  665. char hp[50];
  666. sprintf_s(hp, sizeof(hp), "%i", pEntity->ArmorValue());
  667.  
  668. if (pEntity->HasHelmet())
  669. Render::Text(size.x + size.w + 1, size.y + 0, Color(255, 255, 255, 255), Render::Fonts::ESP, "HK");
  670. else
  671. Render::Text(size.x + size.w + 1, size.y + 0, Color(255, 255, 255, 255), Render::Fonts::ESP, "K");
  672. }
  673. }
  674. if (Options::Menu.VisualsTab.OptionsInfo.GetState())
  675. {
  676.  
  677. if (pEntity->IsScoped())
  678. {
  679. Render::Text(size.x + size.w + 1, size.y + 10, Color(0, 255, 255, 255), Render::Fonts::ESP, "ZOOM");
  680. }
  681.  
  682. }
  683. static RECT Size = Render::GetTextSize(Render::Fonts::Default, "Hi");
  684. int i = 0;
  685. for (auto Text : Info)
  686. {
  687. Render::Text(size.x + size.w + 3, size.y + (i*(Size.bottom + 2)), Color(255, 255, 255, 255), Render::Fonts::ESP, Text.c_str());
  688. i++;
  689. }
  690. }
  691. void CEsp::DrawCross(IClientEntity* pEntity)
  692. {
  693. Vector cross = pEntity->GetHeadPos(), screen;
  694. static int Scale = 2;
  695. if (Render::TransformScreen(cross, screen))
  696. {
  697. Render::Clear(screen.x - Scale, screen.y - (Scale * 2), (Scale * 2), (Scale * 4), Color(20, 20, 20, 160));
  698. Render::Clear(screen.x - (Scale * 2), screen.y - Scale, (Scale * 4), (Scale * 2), Color(20, 20, 20, 160));
  699. Render::Clear(screen.x - Scale - 1, screen.y - (Scale * 2) - 1, (Scale * 2) - 2, (Scale * 4) - 2, Color(250, 250, 250, 160));
  700. Render::Clear(screen.x - (Scale * 2) - 1, screen.y - Scale - 1, (Scale * 4) - 2, (Scale * 2) - 2, Color(250, 250, 250, 160));
  701. }
  702. }
  703.  
  704. void CEsp::DefuseWarning(IClientEntity* pEntity)
  705. {
  706. if (pEntity->IsDefusing())
  707. Render::Text(10, 100, Color(255, 0, 0, 255), Render::Fonts::ICON, ("Enemy is defusing"));
  708. else
  709. Render::Text(10, 100, Color(0, 255, 0, 255), Render::Fonts::ICON, (""));
  710. }
  711.  
  712. void CEsp::AmmoBar(IClientEntity* pEntity, Box size)
  713. {
  714. if (!pEntity->IsAlive())
  715. return;
  716. IClientEntity* pLocal = hackManager.pLocal();
  717. IClientEntity* pWeapon = Interfaces::EntList->GetClientEntityFromHandle((HANDLE)pEntity->GetActiveWeaponHandle());
  718. C_BaseCombatWeapon* Weapon = (C_BaseCombatWeapon*)pEntity;
  719. CSWeaponInfo* weapInfo = ((C_BaseCombatWeapon*)Interfaces::EntList->GetClientEntityFromHandle(pEntity->GetActiveWeaponHandle()))->GetCSWpnData();
  720.  
  721.  
  722. Box ArBar = size;
  723. ArBar.y += (ArBar.h + 3);
  724. ArBar.h = 6;
  725.  
  726. float ArValue = pWeapon->GetAmmoInClip();
  727. float ArPerc = ArValue / weapInfo->max_clip;
  728. float Width = (size.w * ArPerc);
  729. ArBar.w = Width;
  730.  
  731.  
  732. Vertex_t Verts[4];
  733. Verts[0].Init(Vector2D(ArBar.x, ArBar.y));
  734. Verts[1].Init(Vector2D(ArBar.x + size.w + 0, ArBar.y));
  735. Verts[2].Init(Vector2D(ArBar.x + size.w, ArBar.y + 5));
  736. Verts[3].Init(Vector2D(ArBar.x - 0, ArBar.y + 4));
  737.  
  738. Render::PolygonOutline(4, Verts, Color(70, 70, 70, 255), Color(70, 70, 70, 255));
  739.  
  740. Vertex_t Verts2[4];
  741. Verts2[0].Init(Vector2D(ArBar.x + 1, ArBar.y + 1));
  742. Verts2[1].Init(Vector2D(ArBar.x + 1 + ArBar.w + 0, ArBar.y + 1));
  743. Verts2[2].Init(Vector2D(ArBar.x + 1 + ArBar.w, ArBar.y + 3));
  744. Verts2[3].Init(Vector2D(ArBar.x + 1, ArBar.y + 2));
  745.  
  746. Color c = GetPlayerColor(pEntity);
  747.  
  748. Render::Polygon(4, Verts2, Color(0, 120, 255, 255));
  749.  
  750. }
  751.  
  752. void CEsp::DrawDrop(IClientEntity* pEntity, ClientClass* cClass)
  753. {
  754. Color color;
  755. Box Box;
  756. IClientEntity* Weapon = (IClientEntity*)pEntity;
  757. IClientEntity* plr = Interfaces::EntList->GetClientEntityFromHandle((HANDLE)Weapon->GetOwnerHandle());
  758. if (Weapon && !plr)
  759. {
  760. if (get_box(pEntity, Box, Options::Menu.VisualsTab.FiltersWeapons.GetState()))
  761. {
  762. if (Options::Menu.VisualsTab.FiltersWeapons.GetState())
  763. {
  764. DrawBoxx(Box, Color(255, 255, 255, 255));
  765. }
  766.  
  767. std::string ItemName = CleanItemName(cClass->m_pNetworkName);
  768. RECT TextSize = Render::GetTextSize(Render::Fonts::ESP, Weapon->GetWeaponName());
  769. Render::Text(Box.x + (Box.w / 2) - (TextSize.right / 2), Box.y + Box.h, Color(255, 255, 255, 255), Render::Fonts::ESP, Weapon->GetWeaponName());
  770. }
  771. }
  772. }
  773.  
  774. void CEsp::DrawBombPlanted(IClientEntity* pEntity, ClientClass* cClass)
  775. {
  776. BombCarrier = nullptr;
  777.  
  778. Vector vOrig; Vector vScreen;
  779. vOrig = pEntity->GetOrigin();
  780. CCSBomb* Bomb = (CCSBomb*)pEntity;
  781.  
  782. float flBlow = Bomb->GetC4BlowTime();
  783. float TimeRemaining = flBlow - (Interfaces::Globals->interval_per_tick * hackManager.pLocal()->GetTickBase());
  784. char buffer[64];
  785. sprintf_s(buffer, "%.1fs", TimeRemaining);
  786. float TimeRemaining2;
  787. bool exploded = true;
  788. if (TimeRemaining < 0)
  789. {
  790. !exploded;
  791.  
  792. TimeRemaining2 = 0;
  793. }
  794. else
  795. {
  796. exploded = true;
  797. TimeRemaining2 = TimeRemaining;
  798. }
  799. if (exploded)
  800. {
  801. sprintf_s(buffer, "Bomb: %.1f", TimeRemaining2);
  802. }
  803. else
  804. {
  805. sprintf_s(buffer, "Bomb Undefusable", TimeRemaining2);
  806. }
  807.  
  808. Render::Text(10, 45, Color(0, 255, 0, 255), Render::Fonts::Clock, buffer);
  809.  
  810. }
  811.  
  812. void CEsp::DrawBomb(IClientEntity* pEntity, ClientClass* cClass)
  813. {
  814. BombCarrier = nullptr;
  815. C_BaseCombatWeapon *BombWeapon = (C_BaseCombatWeapon *)pEntity;
  816. Vector vOrig; Vector vScreen;
  817. vOrig = pEntity->GetOrigin();
  818. bool adopted = true;
  819. HANDLE parent = BombWeapon->GetOwnerHandle();
  820. if (parent || (vOrig.x == 0 && vOrig.y == 0 && vOrig.z == 0))
  821. {
  822. IClientEntity* pParentEnt = (Interfaces::EntList->GetClientEntityFromHandle(parent));
  823. if (pParentEnt && pParentEnt->IsAlive())
  824. {
  825. BombCarrier = pParentEnt;
  826. adopted = false;
  827. }
  828. }
  829.  
  830. if (adopted)
  831. {
  832. if (Render::TransformScreen(vOrig, vScreen))
  833. {
  834. Render::Text(vScreen.x, vScreen.y, Color(112, 230, 20, 255), Render::Fonts::ESP, "Bomb");
  835. }
  836. }
  837. }
  838.  
  839. void DrawBoneArray(int* boneNumbers, int amount, IClientEntity* pEntity, Color color)
  840. {
  841. Vector LastBoneScreen;
  842. for (int i = 0; i < amount; i++)
  843. {
  844. Vector Bone = pEntity->GetBonePos(boneNumbers[i]);
  845. Vector BoneScreen;
  846.  
  847. if (Render::TransformScreen(Bone, BoneScreen))
  848. {
  849. if (i>0)
  850. {
  851. Render::Line(LastBoneScreen.x, LastBoneScreen.y, BoneScreen.x, BoneScreen.y, color);
  852. }
  853. }
  854. LastBoneScreen = BoneScreen;
  855. }
  856. }
  857.  
  858. void DrawBoneTest(IClientEntity *pEntity)
  859. {
  860. for (int i = 0; i < 127; i++)
  861. {
  862. Vector BoneLoc = pEntity->GetBonePos(i);
  863. Vector BoneScreen;
  864. if (Render::TransformScreen(BoneLoc, BoneScreen))
  865. {
  866. char buf[10];
  867. _itoa_s(i, buf, 10);
  868. Render::Text(BoneScreen.x, BoneScreen.y, Color(255, 255, 255, 180), Render::Fonts::ESP, buf);
  869. }
  870. }
  871. }
  872.  
  873. void CEsp::DrawSkeleton(IClientEntity* pEntity)
  874. {
  875. studiohdr_t* pStudioHdr = Interfaces::ModelInfo->GetStudiomodel(pEntity->GetModel());
  876.  
  877. if (!pStudioHdr)
  878. return;
  879.  
  880. Vector vParent, vChild, sParent, sChild;
  881.  
  882. for (int j = 0; j < pStudioHdr->numbones; j++)
  883. {
  884. mstudiobone_t* pBone = pStudioHdr->GetBone(j);
  885.  
  886. if (pBone && (pBone->flags & BONE_USED_BY_HITBOX) && (pBone->parent != -1))
  887. {
  888. vChild = pEntity->GetBonePos(j);
  889. vParent = pEntity->GetBonePos(pBone->parent);
  890.  
  891. if (Render::TransformScreen(vParent, sParent) && Render::TransformScreen(vChild, sChild))
  892. {
  893. Render::Line(sParent[0], sParent[1], sChild[0], sChild[1], Color(255, 255, 255, 255));
  894. }
  895. }
  896. }
  897. }
  898. void CEsp::DrawHealthText(IClientEntity* pEntity, CEsp::ESPBox size)
  899. {
  900.  
  901. ESPBox HealthBar = size;
  902. HealthBar.y += (HealthBar.h + 3.5); //6
  903. HealthBar.h = 4;
  904.  
  905. float HealthValue = pEntity->GetHealth();
  906. float HealthPerc = HealthValue / 100.f;
  907. float Width = (size.w * HealthPerc);
  908. HealthBar.w = Width;
  909.  
  910. int HPEnemy = 100;
  911. HPEnemy = pEntity->GetHealth();
  912. char nameBuffer[512];
  913. sprintf_s(nameBuffer, "%d HP", HPEnemy);
  914.  
  915. Render::Text(size.x - 28, size.y + 0, Color(255, 255, 255, 255), Render::Fonts::ESP, nameBuffer); //36
  916. }
  917.  
  918.  
  919. void CEsp::BoxAndText(IClientEntity* entity, std::string text)
  920. {
  921. Box Box;
  922. std::vector<std::string> Info;
  923. RECT nameSize = Render::GetTextSize(Render::Fonts::ESP, "");
  924. if (get_box(entity, Box, Options::Menu.VisualsTab.FiltersNades.GetState()))
  925. {
  926. Info.push_back(text);
  927. if (Options::Menu.VisualsTab.FiltersNades.GetState())
  928. {
  929. int i = 0;
  930. for (auto kek : Info)
  931. {
  932. DrawBoxx(Box, Color(255, 255, 255, 255));
  933. Render::Text(Box.x + (Box.w / 2) - (nameSize.right / 2), Box.y - 11, Color(255, 255, 255, 255), Render::Fonts::ESP, kek.c_str());
  934. i++;
  935. }
  936. }
  937. }
  938. }
  939.  
  940. void CEsp::DrawThrowable(IClientEntity* throwable)
  941. {
  942. model_t* nadeModel = (model_t*)throwable->GetModel();
  943.  
  944. if (!nadeModel)
  945. return;
  946.  
  947. studiohdr_t* hdr = Interfaces::ModelInfo->GetStudiomodel(nadeModel);
  948.  
  949. if (!hdr)
  950. return;
  951.  
  952. if (!strstr(hdr->name, "thrown") && !strstr(hdr->name, "dropped"))
  953. return;
  954.  
  955. std::string nadeName = "Unknown Grenade";
  956.  
  957. IMaterial* mats[32];
  958. Interfaces::ModelInfo->GetModelMaterials(nadeModel, hdr->numtextures, mats);
  959.  
  960. for (int i = 0; i < hdr->numtextures; i++)
  961. {
  962. IMaterial* mat = mats[i];
  963. if (!mat)
  964. continue;
  965.  
  966. if (strstr(mat->GetName(), "flashbang"))
  967. {
  968. nadeName = "flash";
  969. break;
  970. }
  971. else if (strstr(mat->GetName(), "m67_grenade") || strstr(mat->GetName(), "hegrenade"))
  972. {
  973. nadeName = "hegrenade";
  974. break;
  975. }
  976. else if (strstr(mat->GetName(), "smoke"))
  977. {
  978. nadeName = "smoke";
  979. break;
  980. }
  981. else if (strstr(mat->GetName(), "decoy"))
  982. {
  983. nadeName = "decoy";
  984. break;
  985. }
  986. else if (strstr(mat->GetName(), "incendiary") || strstr(mat->GetName(), "molotov"))
  987. {
  988. nadeName = "fire";
  989. break;
  990. }
  991. }
  992. BoxAndText(throwable, nadeName);
  993. }
  994. void CEsp::DrawGlow()
  995. {
  996. int GlowR = Options::Menu.ColorsTab.GlowR.GetValue();
  997. int GlowG = Options::Menu.ColorsTab.GlowG.GetValue();
  998. int GlowB = Options::Menu.ColorsTab.GlowB.GetValue();
  999. int GlowZ = Options::Menu.VisualsTab.GlowZ.GetValue();
  1000.  
  1001. CGlowObjectManager* GlowObjectManager = (CGlowObjectManager*)GlowManager;
  1002.  
  1003. for (int i = 0; i < GlowObjectManager->size; ++i)
  1004. {
  1005. CGlowObjectManager::GlowObjectDefinition_t* glowEntity = &GlowObjectManager->m_GlowObjectDefinitions[i];
  1006. IClientEntity* Entity = glowEntity->getEntity();
  1007.  
  1008. if (glowEntity->IsEmpty() || !Entity)
  1009. continue;
  1010.  
  1011. switch (Entity->GetClientClass()->m_ClassID)
  1012. {
  1013. case 35:
  1014. if (Options::Menu.VisualsTab.OptionsGlow.GetState())
  1015. {
  1016. if (!Options::Menu.VisualsTab.FiltersPlayers.GetState() && !(Entity->GetTeamNum() == hackManager.pLocal()->GetTeamNum()))
  1017. break;
  1018. if (Options::Menu.VisualsTab.FiltersEnemiesOnly.GetState() && (Entity->GetTeamNum() == hackManager.pLocal()->GetTeamNum()))
  1019. break;
  1020.  
  1021. if (GameUtils::IsVisible(hackManager.pLocal(), Entity, 0))
  1022. {
  1023. glowEntity->set((Entity->GetTeamNum() == hackManager.pLocal()->GetTeamNum()) ? Color(GlowR, GlowG, GlowB, GlowZ) : Color(GlowR, GlowG, GlowB, GlowZ));
  1024. }
  1025.  
  1026. else
  1027. {
  1028. glowEntity->set((Entity->GetTeamNum() == hackManager.pLocal()->GetTeamNum()) ? Color(GlowR, GlowG, GlowB, GlowZ) : Color(GlowR, GlowG, GlowB, GlowZ));
  1029. }
  1030. }
  1031. }
  1032. }
  1033. }
  1034. void CEsp::EntityGlow()
  1035. {
  1036. int GlowR = Options::Menu.ColorsTab.GlowR.GetValue();
  1037. int GlowG = Options::Menu.ColorsTab.GlowG.GetValue();
  1038. int GlowB = Options::Menu.ColorsTab.GlowB.GetValue();
  1039. int GlowZ = Options::Menu.VisualsTab.GlowZ.GetValue();
  1040.  
  1041. CGlowObjectManager* GlowObjectManager = (CGlowObjectManager*)GlowManager;
  1042.  
  1043. for (int i = 0; i < GlowObjectManager->size; ++i)
  1044. {
  1045. CGlowObjectManager::GlowObjectDefinition_t* glowEntity = &GlowObjectManager->m_GlowObjectDefinitions[i];
  1046. IClientEntity* Entity = glowEntity->getEntity();
  1047.  
  1048. if (glowEntity->IsEmpty() || !Entity)
  1049. continue;
  1050.  
  1051. switch (Entity->GetClientClass()->m_ClassID)
  1052. {
  1053. case 1:
  1054. if (Options::Menu.VisualsTab.EntityGlow.GetState())
  1055. {
  1056. if (Options::Menu.VisualsTab.EntityGlow.GetState())
  1057. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1058. }
  1059. case 9:
  1060. if (Options::Menu.VisualsTab.FiltersNades.GetState())
  1061. {
  1062. if (Options::Menu.VisualsTab.EntityGlow.GetState())
  1063. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1064. }
  1065. case 29:
  1066. if (Options::Menu.VisualsTab.EntityGlow.GetState())
  1067. {
  1068. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1069. }
  1070. case 39:
  1071. if (Options::Menu.VisualsTab.EntityGlow.GetState())
  1072. {
  1073. if (Options::Menu.VisualsTab.FiltersC4.GetState())
  1074. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1075. }
  1076. case 41:
  1077. if (Options::Menu.VisualsTab.EntityGlow.GetState())
  1078. {
  1079. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1080. }
  1081. case 66:
  1082. if (Options::Menu.VisualsTab.EntityGlow.GetState())
  1083. {
  1084. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1085. }
  1086. case 87:
  1087. if (Options::Menu.VisualsTab.FiltersNades.GetState())
  1088. {
  1089. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1090. }
  1091. case 98:
  1092. if (Options::Menu.VisualsTab.FiltersNades.GetState())
  1093. {
  1094. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1095. }
  1096. case 108:
  1097. if (Options::Menu.VisualsTab.FiltersC4.GetState())
  1098. {
  1099. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1100. }
  1101. case 130:
  1102. if (Options::Menu.VisualsTab.FiltersNades.GetState())
  1103. {
  1104. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1105. }
  1106. case 134:
  1107. if (Options::Menu.VisualsTab.FiltersNades.GetState())
  1108. {
  1109. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1110. }
  1111. default:
  1112. if (Options::Menu.VisualsTab.EntityGlow.GetState())
  1113. {
  1114. if (strstr(Entity->GetClientClass()->m_pNetworkName, "Weapon"))
  1115. glowEntity->set(Color(GlowR, GlowG, GlowB, GlowZ));
  1116. }
  1117. }
  1118. }
  1119. }
  1120.  
  1121. void CEsp::DrawBombPlanted2(IClientEntity* pEntity, ClientClass* cClass)
  1122. {
  1123. // Null it out incase bomb has been dropped or planted
  1124. BombCarrier = nullptr;
  1125.  
  1126. Vector vOrig; Vector vScreen;
  1127. vOrig = pEntity->GetOrigin();
  1128. CCSBomb* Bomb = (CCSBomb*)pEntity;
  1129.  
  1130. float flBlow = Bomb->GetC4BlowTime();
  1131. float TimeRemaining = flBlow - (Interfaces::Globals->interval_per_tick * hackManager.pLocal()->GetTickBase());
  1132. char buffer[64];
  1133. sprintf_s(buffer, "%.1fs", TimeRemaining);
  1134. Render::Text(10, 10, Color(0, 255, 0, 255), Render::Fonts::ICON, buffer);
  1135.  
  1136. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement