Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 145.89 KB | None | 0 0
  1. #include <thread>
  2. #include "Hooks.h"
  3. #include "Utils\Utils.h"
  4. #include "Features\Features.h"
  5. #include "Menu\Menu.h"
  6. #include "SDK\Hitboxes.h"
  7. #include "libloaderapi.h"
  8. #include "Features/rankchanger/rankchanger.h"
  9. #include "Fonts.h"
  10. #include "ImGui/imgui.h"
  11. #include "ImGui/imgui_internal.h"
  12. #include "ImGui/dx9/imgui_dx9.h"
  13. #include "Features/rankchanger/Protobuffs.h"
  14. #include "Features/rankchanger/IMemAlloc.h"
  15. #include "Features/rankchanger/steam.h"
  16. #include "SDK/IMDLCache.h"
  17. #include "Features/skinchanger/skinchanger.h"
  18. #include "Features/skinchanger/trashconst.h"
  19. #include "Features/customskinchanger/customskinchanger.h"
  20. #include "Features/grenadetracer/grenadetracer.h"
  21. #include "Features/logs/logs.h"
  22. #include "Features/damage esp/damageesp.h"
  23. #include "Features/clantags/clantag.h"
  24. #include "Features/Backdrop/drop.h"
  25. #include "Menu/fonts1.h"
  26. #include "Features/custommodelchanger/custommodelchanger.h"
  27. #include "Features/uselessconst.h"
  28. #include "Features/uselesshitbytes.h"
  29. #include <d3dx9core.h>
  30. #include <intrin.h>
  31. #include "Features/Visuals/SPoint.h"
  32. #include "Features/TriggerBot/TriggerBot.h"
  33. #include <array>
  34.  
  35. #include "Features/asdfshit.h"
  36. #include "Features/custom_ui/UI.h"
  37. #include "detourhooks.h"
  38. #include <string.h>
  39. #include <process.h>
  40.  
  41. #pragma comment(lib, "Winmm.lib")
  42. #pragma comment (lib, "d3dx9.lib")
  43. float lastkilltime;
  44. int gitgrp;
  45. void OffscreenESP(Color colour, IDirect3DDevice9* pDevice);
  46. static bool menu_open = false;
  47. static bool d3d_init = false;
  48. bool PressedKeys[256] = {};
  49. int kill;
  50. int killstreak;
  51. Protobuffs write;
  52. C_HookedEvents hooked_events;
  53. Misc g_Misc;
  54. Hooks g_Hooks;
  55. ImFont* Text;
  56. ImFont* Tabs;
  57. ImFont* icon;
  58. ImFont* icon2;
  59. ImFont* anti_aim;
  60. ImFont* Main;
  61. ImFont* Main1;
  62. ImFont* Main2;
  63. ImFont* Main3;
  64. ImFont* LW;
  65. ImFont* LW2;
  66. LPD3DXFONT fntVerdana10;
  67. bool input_shouldListen;
  68. ButtonCode_t* input_receivedKeyval;
  69. static char ConfigNamexd[64] = { 0 };
  70. static char* clantagname;
  71. cDetour<Hooks::PaintTraverse_t>* oPaintTraverse_t;
  72. cDetour<Hooks::LockCursor_t>* oLockCursor_t;
  73. cDetour<Hooks::EndSceneFn>* oEndSceneFn;
  74. cDetour<Hooks::EndSceneResetFn>* oEndSceneResetFn;
  75. cDetour<Hooks::D3D9FEATURES>* oD3D9FEATURES;
  76. cDetour<Hooks::SetMouseCodeState_t>* oSetMouseCodeState_t;
  77. cDetour<Hooks::SetKeyCodeState_t>* oSetKeyCodeState_t;
  78. cDetour<Hooks::SvCheatsGetBoolFn>* oSvCheatsGetBoolFn;
  79. cDetour<Hooks::FrameStageNotify_t>* oFrameStageNotify_t;
  80. cDetour<Hooks::GCSendMessage>* oGCSendMessage;
  81. cDetour<Hooks::GCRetrieveMessage>* oGCRetrieveMessage;
  82. cDetour<Hooks::CreateMove_t>* oCreateMove_t;
  83. cDetour<Hooks::OverrideView_t>* oOverrideView_t;
  84. cDetour<Hooks::DoPostScreenEffects_t>* oDoPostScreenEffects_t;
  85. cDetour<Hooks::DrawModelExecute_t>* oDrawModelExecute_t;
  86. cDetour<Hooks::FireEventClientSide>* oFireEventClientSide;
  87. cDetour<Hooks::FindMDL_t>* oFindMDL_t;
  88. cDetour<Hooks::DispatchUserMessageFn>* oDispatchUserMessageFn;
  89.  
  90.  
  91. std::string GetWeaponName3()
  92. {
  93. switch (Shonax.number)
  94. {
  95. case (int)ItemDefinitionIndex::WEAPON_DEAGLE:
  96. return (("desert eagle"));
  97. case (int)ItemDefinitionIndex::WEAPON_ELITE:
  98. return (("dual berettas"));
  99. case (int)ItemDefinitionIndex::WEAPON_FIVESEVEN:
  100. return (("five-seveN"));
  101. case (int)ItemDefinitionIndex::WEAPON_GLOCK:
  102. return (("glock-18"));
  103. case (int)ItemDefinitionIndex::WEAPON_AK47:
  104. return (("ak-47"));
  105. case (int)ItemDefinitionIndex::WEAPON_AUG:
  106. return (("aug"));
  107. case (int)ItemDefinitionIndex::WEAPON_AWP:
  108. return (("awp"));
  109. case (int)ItemDefinitionIndex::WEAPON_FAMAS:
  110. return (("famas"));
  111. case (int)ItemDefinitionIndex::WEAPON_G3SG1:
  112. return (("g3sg1"));
  113. case (int)ItemDefinitionIndex::WEAPON_GALILAR:
  114. return (("galil"));
  115. case (int)ItemDefinitionIndex::WEAPON_M249:
  116. return (("m249"));
  117. case(int)ItemDefinitionIndex::WEAPON_M4A1:
  118. return (("m4a1"));
  119. case (int)ItemDefinitionIndex::WEAPON_MAC10:
  120. return (("mac-10"));
  121. case (int)ItemDefinitionIndex::WEAPON_P90:
  122. return (("p90"));
  123. case (int)ItemDefinitionIndex::WEAPON_UMP45:
  124. return (("ump-45"));
  125. case (int)ItemDefinitionIndex::WEAPON_XM1014:
  126. return (("xm1014"));
  127. case (int)ItemDefinitionIndex::WEAPON_BIZON:
  128. return (("bizon"));
  129. case (int)ItemDefinitionIndex::WEAPON_MAG7:
  130. return (("mag-7"));
  131. case (int)ItemDefinitionIndex::WEAPON_NEGEV:
  132. return (("negev"));
  133. case (int)ItemDefinitionIndex::WEAPON_SAWEDOFF:
  134. return (("sawed-off"));
  135. case (int)ItemDefinitionIndex::WEAPON_TEC9:
  136. return (("tec-9"));
  137. case (int)ItemDefinitionIndex::WEAPON_TASER:
  138. return (("zeus"));
  139. case (int)ItemDefinitionIndex::WEAPON_HKP2000:
  140. return (("p2000"));
  141. case (int)ItemDefinitionIndex::WEAPON_MP7:
  142. return (("mp7"));
  143. case (int)ItemDefinitionIndex::WEAPON_MP9:
  144. return (("mp9"));
  145. case (int)ItemDefinitionIndex::WEAPON_NOVA:
  146. return (("nova"));
  147. case (int)ItemDefinitionIndex::WEAPON_P250:
  148. return (("p250"));
  149. case (int)ItemDefinitionIndex::WEAPON_SCAR20:
  150. return (("scar-20"));
  151. case (int)ItemDefinitionIndex::WEAPON_SG556:
  152. return (("sg 553"));
  153. case (int)ItemDefinitionIndex::WEAPON_SSG08:
  154. return (("ssg 08"));
  155. case (int)ItemDefinitionIndex::WEAPON_KNIFE:
  156. return (("knife"));
  157. case (int)ItemDefinitionIndex::WEAPON_KNIFE_T:
  158. return (("knife"));
  159. case (int)ItemDefinitionIndex::WEAPON_FLASHBANG:
  160. return (("flashbang"));
  161. case (int)ItemDefinitionIndex::WEAPON_HEGRENADE:
  162. return (("he grenade"));
  163. case (int)ItemDefinitionIndex::WEAPON_SMOKEGRENADE:
  164. return (("smoke grenade"));
  165. case (int)ItemDefinitionIndex::WEAPON_MOLOTOV:
  166. return (("molotov"));
  167. case(int)ItemDefinitionIndex::WEAPON_DECOY:
  168. return (("decoy"));
  169. case (int)ItemDefinitionIndex::WEAPON_INCGRENADE:
  170. return (("incendiary grenade"));
  171. case (int)ItemDefinitionIndex::WEAPON_C4:
  172. return (("c4"));
  173. case (int)ItemDefinitionIndex::WEAPON_M4A1_SILENCER:
  174. return (("m4a1-S"));
  175. case(int)ItemDefinitionIndex::WEAPON_USP_SILENCER:
  176. return (("usp-s"));
  177. case (int)ItemDefinitionIndex::WEAPON_CZ75A:
  178. return (("cz75-auto"));
  179. case (int)ItemDefinitionIndex::WEAPON_REVOLVER:
  180. return (("r8 revolver"));
  181. default:
  182. return (("none"));
  183. }
  184.  
  185. return ("");
  186. }
  187. namespace ImGui
  188. {
  189.  
  190. static auto vector_getterxd = [](void* vec, int idx, const char** out_text)
  191. {
  192.  
  193. auto& vector = *static_cast<std::vector<std::string>*>(vec);
  194. if (idx < 0 || idx >= static_cast<int>(vector.size())) { return false; }
  195. *out_text = vector.at(idx).c_str();
  196. return true;
  197. };
  198.  
  199. IMGUI_API bool ComboBoxArrayxd(const char* label, int* currIndex, std::vector<std::string>& values)
  200. {
  201. if (values.empty()) { return false; }
  202. return Combo(label, currIndex, vector_getterxd,
  203. static_cast<void*>(&values), values.size());
  204. }
  205. }
  206. void line(int x, int y, int x2, int y2, Color color)
  207. {
  208. g_pSurface->DrawSetColor(color);
  209. g_pSurface->DrawLine(x, y, x2, y2);
  210. }
  211.  
  212. struct hud_weapons_t
  213. {
  214. std::int32_t* get_weapon_count()
  215. {
  216. return reinterpret_cast<std::int32_t*>(std::uintptr_t(this) + 0x80);
  217. }
  218. };
  219. template<class T>
  220. static T* FindHudElement(const char* name)
  221. {
  222. static auto pThis = *reinterpret_cast<DWORD**>(Utils::FindSignature(("client_panorama.dll"), ("B9 ? ? ? ? E8 ? ? ? ? 8B 5D 08")) + 1);
  223.  
  224. static auto find_hud_element = reinterpret_cast<DWORD(__thiscall*)(void*, const char*)>(Utils::FindSignature(("client_panorama.dll"), ("55 8B EC 53 8B 5D 08 56 57 8B F9 33 F6 39 77 28")));
  225. return (T*)find_hud_element(pThis, name);
  226. }
  227. void KnifeApplyCallbk()
  228. {
  229.  
  230. static auto clear_hud_weapon_icon_fn = reinterpret_cast<std::int32_t(__thiscall*)(void*, std::int32_t)>(Utils::FindSignature(("client_panorama.dll"), ("55 8B EC 51 53 56 8B 75 08 8B D9 57 6B FE 2C")));
  231.  
  232. auto element = FindHudElement<std::uintptr_t*>(("CCSGO_HudWeaponSelection"));
  233.  
  234. auto hud_weapons = reinterpret_cast<hud_weapons_t*>(std::uintptr_t(element) - 0xA0);
  235. if (hud_weapons == nullptr)
  236. return;
  237.  
  238. if (!*hud_weapons->get_weapon_count())
  239. return;
  240.  
  241. for (std::int32_t i = 0; i < *hud_weapons->get_weapon_count(); i++)
  242. i = clear_hud_weapon_icon_fn(hud_weapons, i);
  243.  
  244. g_pClientState->ForceFullUpdate();
  245. }
  246.  
  247. static DWORD* deathNotice;
  248. static void(__thiscall *ClearDeathNotices)(DWORD);
  249. static bool fuckingcheck;
  250. static bool anotherpcheck;
  251. static bool shitchamsworkplease;
  252. static bool buybotfix;
  253. void things(IGameEvent* pEvent)
  254. {
  255. if (!strcmp(pEvent->GetName(), "round_prestart") && g_pEngine->IsInGame() && g_pEngine->IsConnected() && g::pLocalEntity)
  256. {
  257. deathNotice = nullptr;
  258. fuckingcheck = true;
  259. anotherpcheck = true;
  260. shitchamsworkplease = true;
  261. buybotfix = true;
  262. }
  263. }
  264.  
  265. bool LabelClick(const char* concatoff, const char* concaton, const char* label, bool* v, const char* unique_id)
  266. {
  267. ImGuiWindow* window = ImGui::GetCurrentWindow();
  268. if (window->SkipItems)
  269. return false;
  270.  
  271. // The concatoff/on thingies were for my weapon config system so if we're going to make that, we still need this aids.
  272. char Buf[64];
  273. _snprintf(Buf, 62, "%s%s", ((*v) ? concatoff : concaton), label);
  274.  
  275. ImGuiContext& g = *GImGui;
  276. const ImGuiStyle& style = g.Style;
  277. const ImGuiID id = window->GetID(unique_id);
  278. const ImVec2 label_size = ImGui::CalcTextSize(label, NULL, true);
  279.  
  280. const ImRect check_bb(window->DC.CursorPos, window->DC.CursorPos + ImVec2(label_size.y + style.FramePadding.y * 2, label_size.y + style.FramePadding.y * 2));
  281. ImGui::ItemSize(check_bb, style.FramePadding.y);
  282.  
  283. ImRect total_bb = check_bb;
  284. if (label_size.x > 0)
  285. ImGui::SameLine(0, style.ItemInnerSpacing.x);
  286.  
  287. const ImRect text_bb(window->DC.CursorPos + ImVec2(0, style.FramePadding.y), window->DC.CursorPos + ImVec2(0, style.FramePadding.y) + label_size);
  288. if (label_size.x > 0)
  289. {
  290. ImGui::ItemSize(ImVec2(text_bb.GetWidth(), check_bb.GetHeight()), style.FramePadding.y);
  291. total_bb = ImRect(ImMin(check_bb.Min, text_bb.Min), ImMax(check_bb.Max, text_bb.Max));
  292. }
  293.  
  294. if (!ImGui::ItemAddxd(total_bb, id))
  295. return false;
  296.  
  297. bool hovered, held;
  298. bool pressed = ImGui::ButtonBehavior(total_bb, id, &hovered, &held);
  299. if (pressed)
  300. *v = !(*v);
  301.  
  302. if (label_size.x > 0.0f)
  303. ImGui::RenderText(check_bb.GetTL(), Buf);
  304.  
  305. return pressed;
  306.  
  307. }
  308. C_BaseEntity* UTIL_PlayerByIndex(int index)
  309. {
  310. typedef C_BaseEntity*(__fastcall* PlayerByIndex)(int);
  311. static PlayerByIndex UTIL_PlayerByIndex = (PlayerByIndex)Utils::FindSignature("server.dll", "85 C9 7E 2A A1");
  312.  
  313. if (!UTIL_PlayerByIndex)
  314. return false;
  315.  
  316. return UTIL_PlayerByIndex(index);
  317. }
  318.  
  319. void LoadNamedSky(const char *sky_name)
  320. {
  321. static auto fnLoadNamedSkys = (void(__fastcall*)(const char*))Utils::FindSignature("engine.dll", "55 8B EC 81 EC ? ? ? ? 56 57 8B F9 C7 45");
  322. fnLoadNamedSkys(sky_name);
  323. anotherpcheck = false;
  324. }
  325.  
  326. ButtonCode_t tp_key1;
  327. void KeyBindButton(ButtonCode_t* key)
  328. {
  329. bool clicked = false;
  330.  
  331. std::string text = g_pInputSystem->ButtonCodeToString(*key);
  332. std::string unique_id = std::to_string((int)key);
  333.  
  334. if (*key <= BUTTON_CODE_NONE)
  335. text = ("Key not set");
  336.  
  337. if (input_shouldListen && input_receivedKeyval == key) {
  338. clicked = true;
  339. text = ("...");
  340. }
  341. text += ("]");
  342.  
  343. ImGui::SameLine();
  344. LabelClick(("["), ("["), text.c_str(), &clicked, unique_id.c_str());
  345.  
  346. if (clicked)
  347. {
  348. input_shouldListen = true;
  349. input_receivedKeyval = key;
  350. }
  351.  
  352. if (*key == KEY_DELETE)
  353. {
  354. *key = BUTTON_CODE_NONE;
  355. }
  356.  
  357. if (ImGui::IsItemHovered())
  358. ImGui::SetTooltip(("Bind the \"del\" key to remove current bind."));
  359. }
  360.  
  361.  
  362. void setviewmovelscallback()
  363. {
  364. g_pCvar->FindVar("viewmodel_fov")->fnChangeCallback.SetSize(0);
  365. g_pCvar->FindVar("viewmodel_offset_x")->fnChangeCallback.SetSize(0);
  366. g_pCvar->FindVar("viewmodel_offset_y")->fnChangeCallback.SetSize(0);
  367. g_pCvar->FindVar("viewmodel_offset_z")->fnChangeCallback.SetSize(0);
  368. }
  369.  
  370.  
  371.  
  372. bool __fastcall Hooks::Hooked_FireEventClientSide(void *ecx, void* edx, IGameEvent* pEvent)
  373. {
  374.  
  375. //static auto ofunct = g_Hooks.pEvent->GetOriginal<FireEventClientSide>(9);
  376.  
  377. if (!pEvent)
  378. return oFireEventClientSide->GetTrampoline()(ecx, pEvent);
  379.  
  380. DamageESP::HandleGameEvent(pEvent);
  381.  
  382.  
  383.  
  384. return oFireEventClientSide->GetTrampoline()(ecx, pEvent);
  385.  
  386.  
  387. }
  388.  
  389.  
  390.  
  391. #include "vfunct/vfuncthook.h"
  392. vfunc_hook gc_hook;
  393.  
  394.  
  395. EGCResultxd __fastcall hkGCRetrieveMessage(void* ecx, void*, uint32_t *punMsgType, void *pubDest, uint32_t cubDest, uint32_t *pcubMsgSize)
  396. {
  397. //static auto oGCRetrieveMessage = gc_hook.get_original<Hooks::GCRetrieveMessage>(vtable_indexes::retrieve_message);
  398. auto status = oGCRetrieveMessage->GetTrampoline()(ecx, punMsgType, pubDest, cubDest, pcubMsgSize);
  399.  
  400. if (status == k_EGCResultOK)
  401. {
  402.  
  403. void* thisPtr = nullptr;
  404. __asm mov thisPtr, ebx;
  405. auto oldEBP = *reinterpret_cast<void**>((uint32_t)_AddressOfReturnAddress() - 4);
  406.  
  407. uint32_t messageType = *punMsgType & 0x7FFFFFFF;
  408. write.ReceiveMessage(thisPtr, oldEBP, messageType, pubDest, cubDest, pcubMsgSize);
  409. if (Shonax.newfeatures.special && !g_pEngine->IsConnected() && !g_pEngine->IsInGame())
  410. {
  411. static auto SetLocalPlayerReadyFn = reinterpret_cast<bool(__stdcall*)(const char*)>(Utils::FindSignature("client_panorama.dll", "55 8B EC 83 E4 F8 8B 4D 08 BA ? ? ? ? E8 ? ? ? ? 85 C0 75 12"));
  412. if (SetLocalPlayerReadyFn)
  413. SetLocalPlayerReadyFn("");
  414. }
  415.  
  416. }
  417.  
  418.  
  419. return status;
  420. }
  421.  
  422. EGCResultxd __fastcall hkGCSendMessage(void* ecx, void*, uint32_t unMsgType, const void* pubData, uint32_t cubData)
  423. {
  424. //static auto oGCSendMessage = gc_hook.get_original<Hooks::GCSendMessage>(vtable_indexes::send_message);
  425.  
  426. EGCResult status;
  427.  
  428. bool sendMessage = write.PreSendMessage(unMsgType, const_cast<void*>(pubData), cubData);
  429.  
  430. if (!sendMessage)
  431. return k_EGCResultOKxd;
  432.  
  433. return oGCSendMessage->GetTrampoline()(ecx, unMsgType, const_cast<void*>(pubData), cubData);
  434. }
  435.  
  436.  
  437.  
  438.  
  439. bool __fastcall hkDispatchUserMessage(void* ecx, void* edx, int type, unsigned int a3, unsigned int length, bf_read &msg_data)
  440. {
  441. //static auto oDispatchUserMessage = framestage.get_original<DispatchUserMessageFn>(38);
  442. if (Shonax.newfeatures.antikick && type == static_cast<int>(46))
  443. {
  444. bf_read read = bf_read(msg_data);
  445. read.SetOffset(2);
  446. auto ent_index = read.ReadByte();
  447. auto vote_type = read.ReadByte();
  448. g_pCvar->ConsoleColorPrintf(Color(1.0f, 0.0f, 0.0f), "Anti-Kicking... \n");
  449. g_pEngine->ExecuteClientCmd("callvote swapteams");
  450. }
  451. return oDispatchUserMessageFn->GetTrampoline()(ecx, type, a3, length, msg_data);
  452. }
  453.  
  454.  
  455. void Draw_Line(int x1, int y1, int x2, int y2, Color color)
  456. {
  457. g_pSurface->DrawSetColor(color.red, color.green, color.blue, color.alpha);
  458. g_pSurface->DrawLine(x1, y1, x2, y2);
  459. }
  460. void DrawZeusRange() {
  461. if (!g_pEngine->IsConnected() || !g_pEngine->IsInGame())
  462. return;
  463.  
  464. if (!g::pLocalEntity) return;
  465.  
  466. if (!*(bool*)((uintptr_t)g_pInput + 0xAD))
  467. return;
  468.  
  469. if (!Shonax.newfeatures.drawzeus)
  470. return;
  471.  
  472. auto weapon = g::pLocalEntity->GetActiveWeapon();
  473.  
  474. if (weapon->GetItemDefinitionIndex() != ItemDefinitionIndex::WEAPON_TASER)
  475. return;
  476.  
  477. float step = M_PI * 2.0 / 1023;
  478. float rad = weapon->GetCSWpnData()->range;
  479. Vector origin = g::pLocalEntity->GetEyePosition();
  480.  
  481. static double rainbow;
  482.  
  483. Vector screenPos;
  484. static Vector prevScreenPos;
  485.  
  486. for (float rotation = 0; rotation < (M_PI * 2.0); rotation += step)
  487. {
  488. Vector pos(rad * cos(rotation) + origin.x, rad * sin(rotation) + origin.y, origin.z);
  489.  
  490.  
  491. C_Trace trace;
  492. CTraceEntity filter(g::pLocalEntity);
  493.  
  494. filter.pSkip1 = g::pLocalEntity;
  495.  
  496.  
  497. g_pTrace->TraceRay(C_Ray(origin, pos), MASK_SHOT_BRUSHONLY, &filter, &trace);
  498.  
  499. if (g_pIVDebugOverlay->ScreenPosition(trace.end, screenPos))
  500. continue;
  501.  
  502. if (!prevScreenPos.IsZero() && !screenPos.IsZero() && screenPos.DistTo(Vector(-107374176, -107374176, -107374176)) > 3.f&& prevScreenPos.DistTo(Vector(-107374176, -107374176, -107374176)) > 3.f) {
  503. rainbow += 0.00001;
  504. if (rainbow > 1.f)
  505. rainbow = 0;
  506.  
  507. Color color = Color::FromHSB(rainbow, 1.f, 1.f);
  508. Draw_Line(prevScreenPos.x, prevScreenPos.y, screenPos.x, screenPos.y, color);
  509. //DrawLine(prevScreenPos.x, prevScreenPos.y + 1, screenPos.x, screenPos.y + 1, color);
  510. //DrawLine(Vector2D(prevScreenPos.x, prevScreenPos.y - 1), Vector2D(screenPos.x, screenPos.y - 1), color);
  511. }
  512. prevScreenPos = screenPos;
  513. }
  514. }
  515.  
  516. void __fastcall Hooks::PaintTraverse(PVOID pPanels, int edx, unsigned int vguiPanel, bool forceRepaint, bool allowForce)
  517. {
  518. //static auto oPaintTraverse = g_Hooks.pPanelHook->GetOriginal<PaintTraverse_t>(vtable_indexes::paint);
  519. static unsigned int panelID, panelHudID;
  520. std::string panel_name = g_pPanel->GetName(vguiPanel);
  521. static uint32_t HudZoomPanel;
  522. if (!HudZoomPanel)
  523. if (!strcmp("HudZoom", g_pPanel->GetName(vguiPanel)))
  524. HudZoomPanel = vguiPanel;
  525. if (g::pLocalEntity)
  526. if (Shonax.Visuals.NoScope && HudZoomPanel == vguiPanel && g::pLocalEntity->IsScoped())
  527. return;
  528.  
  529.  
  530. if (panel_name == "MatSystemTopPanel")
  531. {
  532.  
  533. if (g_pEngine->IsConnected() && g_pEngine->IsInGame())
  534. {
  535. auto matpostprocess = g_pCvar->FindVar("mat_postprocess_enable");
  536. matpostprocess->fnChangeCallback.SetSize(0);
  537. matpostprocess->SetValue(Shonax.Visuals.matpostprocessenable);
  538. auto HUD = g_pCvar->FindVar("cl_draw_only_deathnotices");
  539. HUD->fnChangeCallback.SetSize(0);
  540. if (Shonax.Visuals.clearhud)
  541. HUD->SetValue(1);
  542. else
  543. HUD->SetValue(0);
  544.  
  545. DrawZeusRange();
  546. if (!Shonax.Misc.UI) g_pCvar->FindVar("cl_drawhud")->SetValue(1);
  547.  
  548. g_ESP.InstallFonts();
  549. g_ESP.Render();
  550.  
  551. if (Shonax.Misc.UI)
  552. GUI.Draw();
  553. GrenadePrediction::get().Paint();// fixed
  554.  
  555.  
  556.  
  557. if (Shonax.Visuals.NoScope && g::pLocalEntity) //fixed
  558. {
  559. int screen_x;
  560. int screen_y;
  561. int center_x;
  562. int center_y;
  563. g_pEngine->GetScreenSize(screen_x, screen_y);
  564. g_pEngine->GetScreenSize(center_x, center_y);
  565. center_x /= 2; center_y /= 2;
  566. if (g::pLocalEntity->IsScoped())
  567. {
  568. g_pSurface->Line(0, center_y, screen_x, center_y, Color(10, 10, 10, 140));
  569. g_pSurface->Line(center_x, 0, center_x, screen_y, Color(10, 10, 10, 140));
  570. g_pSurface->Line(0, center_y - 1, screen_x, center_y - 1, Color(10, 10, 10, 140));
  571. g_pSurface->Line(center_x - 1, 0, center_x - 1, screen_y, Color(10, 10, 10, 140));
  572. g_pSurface->Line(0, center_y + 1, screen_x, center_y + 1, Color(10, 10, 10, 140));
  573. g_pSurface->Line(center_x + 1, 0, center_x + 1, screen_y, Color(10, 10, 10, 140));
  574. }
  575. }
  576. for (int i = 0; i < 4; i++) {
  577. for (int j = 0; j < 4; j++)
  578. {
  579. g::w2s_matrix[i][j] = g_pEngine->WorldToScreenMatrix()[i][j];
  580.  
  581. }
  582. }
  583.  
  584.  
  585.  
  586. if (Shonax.Visuals.hitmarker[0])
  587. otheresp::get().hitmarker_paint();
  588.  
  589.  
  590. FEATURES::MISC::in_game_logger.Do();
  591.  
  592. static bool zalupa;
  593. if (Shonax.Visuals.galaxysky)
  594. {
  595. if (anotherpcheck || !zalupa)
  596. LoadNamedSky("sky_descent");
  597. zalupa = true;
  598. }
  599.  
  600.  
  601. if (Shonax.Visuals.hitmarker[1])
  602. otheresp::get().hitmarkerdynamic_paint();
  603.  
  604. if (Shonax.Visuals.killfeed)
  605. {
  606. if (g::pLocalEntity && g_pEngine->IsInGame() && g_pEngine->IsConnected())
  607. {
  608. if (g::pLocalEntity) {
  609. if (!deathNotice) deathNotice = FindHudElement<DWORD>("CCSGO_HudDeathNotice");
  610. if (deathNotice) {
  611. float* localDeathNotice = (float*)((DWORD)deathNotice + 0x50);
  612. if (localDeathNotice) *localDeathNotice = Shonax.Visuals.killfeed ? FLT_MAX : 1.5f;
  613. if (fuckingcheck && deathNotice - 20) {
  614. if (!ClearDeathNotices) ClearDeathNotices = (void(__thiscall*)(DWORD))Utils::FindSignature("client_panorama.dll", "55 8B EC 83 EC 0C 53 56 8B 71 58");
  615. if (ClearDeathNotices) { ClearDeathNotices(((DWORD)deathNotice - 20)); fuckingcheck = false; }
  616.  
  617. }
  618. }
  619. }
  620. }
  621.  
  622. }
  623.  
  624. CustomDrawmodels();
  625.  
  626.  
  627.  
  628. if (Shonax.Visuals.worldcheck)
  629. {
  630.  
  631. for (MaterialHandle_t i = g_pMaterialSys->FirstMaterial(); i != g_pMaterialSys->InvalidMaterial(); i = g_pMaterialSys->NextMaterial(i))
  632. {
  633. IMaterial *pMaterial = g_pMaterialSys->GetMaterial(i);
  634. if (!pMaterial)
  635. continue;
  636. const char* group = pMaterial->GetTextureGroupName();
  637. const char* name = pMaterial->GetName();
  638.  
  639. if (strstr(group, "World textures"))
  640. {
  641. pMaterial->ColorModulate(Shonax.Visuals.WorldColor[0], Shonax.Visuals.WorldColor[1], Shonax.Visuals.WorldColor[2]);
  642. pMaterial->AlphaModulate(Shonax.Visuals.WorldColor[3]);
  643. }
  644. }
  645. }
  646. if (Shonax.Visuals.skycheck)
  647. {
  648. for (MaterialHandle_t i = g_pMaterialSys->FirstMaterial(); i != g_pMaterialSys->InvalidMaterial(); i = g_pMaterialSys->NextMaterial(i))
  649. {
  650. IMaterial *pMaterial = g_pMaterialSys->GetMaterial(i);
  651. if (!pMaterial)
  652. continue;
  653. if (strstr(pMaterial->GetTextureGroupName(), "SkyBox"))
  654. {
  655. pMaterial->ColorModulate(Shonax.Visuals.SkyColor[0], Shonax.Visuals.SkyColor[1], Shonax.Visuals.SkyColor[2]);
  656. pMaterial->AlphaModulate(Shonax.Visuals.SkyColor[3]);
  657.  
  658. }
  659.  
  660. }
  661. }
  662.  
  663. if (false) // server hitboxes
  664. {
  665. static uintptr_t pCall = (uintptr_t)Utils::FindSignature("server.dll", "55 8B EC 81 EC ? ? ? ? 53 56 8B 35 ? ? ? ? 8B D9 57 8B CE");
  666.  
  667. float fDuration = -1.f;
  668.  
  669. PVOID pEntity = nullptr;
  670. pEntity = UTIL_PlayerByIndex(g::pLocalEntity->EntIndex());
  671.  
  672. if (pEntity)
  673. {
  674. __asm
  675. {
  676. pushad
  677. movss xmm1, fDuration
  678. push 0 //bool monoColor
  679. mov ecx, pEntity
  680. call pCall
  681. popad
  682. }
  683. }
  684. }
  685. }
  686.  
  687. //if (g_pEngine->IsActiveApp() && menu_open)
  688. //Drop::DrawBackDrop();
  689.  
  690. }
  691.  
  692. oPaintTraverse_t->GetTrampoline()(pPanels, vguiPanel, forceRepaint, allowForce);
  693.  
  694. //oPaintTraverse(pPanels, vguiPanel, forceRepaint, allowForce);
  695. //fix for skins black, dont need with drop
  696. g_pCvar->FindVar("cl_showfps")->SetValue(1);
  697. g_pCvar->FindVar("net_graph")->SetValue(1);
  698. }
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707. void Hooks::Restore()
  708. {
  709.  
  710. g_Hooks.pClientHook->Unhook(vtable_indexes::frameStage);
  711. g_Hooks.pClientModeHook->Unhook(vtable_indexes::createMove);
  712. g_Hooks.pClientModeHook->Unhook(vtable_indexes::view);
  713. g_Hooks.pSurfaceHook->Unhook(vtable_indexes::lockCursor);
  714. g_Hooks.pPanelHook->Unhook(vtable_indexes::paint);
  715. g_Hooks.pModelHook->Unhook(vtable_indexes::dme);
  716.  
  717. SetWindowLongPtr(g_Hooks.hCSGOWindow, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(g_Hooks.pOriginalWNDProc));
  718.  
  719. g_pNetvars.reset();
  720. hooked_events.RemoveSelf();
  721.  
  722. }
  723.  
  724. void Hooks::HookPlayers()
  725. {
  726. static bool Init[65];
  727. static bool Hooked[65];
  728.  
  729. for (int i = 1; i < g_pEngine->GetMaxClients(); ++i)
  730. {
  731. C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(i);
  732.  
  733. if (!pPlayerEntity
  734. || !pPlayerEntity->IsAlive()
  735. || pPlayerEntity->IsDormant())
  736. {
  737. if (Hooked[i])
  738. g_Hooks.pPlayerHook[i]->Unhook(vtable_indexes::extraBonePro);
  739.  
  740. Hooked[i] = false;
  741. continue;
  742. }
  743.  
  744. if (!Init[i])
  745. {
  746. g_Hooks.pPlayerHook[i] = std::make_unique<VMTHook>(pPlayerEntity);
  747. Init[i] = true;
  748. }
  749.  
  750. if (Hooked[i])
  751. g_Hooks.pPlayerHook[i]->Unhook(vtable_indexes::extraBonePro);
  752.  
  753. if (!Hooked[i])
  754. {
  755. //g_Hooks.pPlayerHook[i]->Setup(pPlayerEntity);
  756. g_Hooks.pPlayerHook[i]->Hook(vtable_indexes::extraBonePro, Hooks::DoExtraBonesProcessing);
  757.  
  758. Hooked[i] = true;
  759. }
  760. }
  761. }
  762.  
  763.  
  764. C_BaseCombatWeapon* xd(C_BaseEntity* xz)
  765. {
  766. if (!g_pEngine->IsConnected())
  767. return nullptr;
  768. if (!xz->IsAlive())
  769. return nullptr;
  770.  
  771. CBaseHandle weaponData = *(CBaseHandle*)((DWORD)xz + 0x2EF8); //m_hActiveWeapon
  772. return (C_BaseCombatWeapon*)g_pEntityList->GetClientEntityFromHandle(weaponData);
  773. }
  774.  
  775. short SafeWeaponID()
  776. {
  777.  
  778. if (!(g::pLocalEntity))
  779. return 0;
  780.  
  781. C_BaseCombatWeapon* WeaponC = xd(g::pLocalEntity);
  782.  
  783. if (!(WeaponC))
  784. return 0;
  785.  
  786. return *WeaponC->fixskins();
  787. }
  788. inline float FastSqrt1(float x)
  789. {
  790. unsigned int i = *(unsigned int*)&x;
  791. i += 127 << 23;
  792. i >>= 1;
  793. return *(float*)&i;
  794. }
  795. #define square1( x ) ( x * x )
  796. void SlowWalk(CUserCmd* get_cmd, float get_speed)
  797. {
  798. if (get_speed <= 0.f)
  799. return;
  800. float min_speed = (float)(FastSqrt1(square1(get_cmd->forwardmove) + square1(get_cmd->sidemove) + square1(get_cmd->upmove)));
  801. if (min_speed <= 0.f)
  802. return;
  803. if (get_cmd->buttons & IN_DUCK)
  804. get_speed *= 2.94117647f;
  805. if (min_speed <= get_speed)
  806. return;
  807. float speed = get_speed / min_speed;
  808. get_cmd->forwardmove *= speed;
  809. get_cmd->sidemove *= speed;
  810. get_cmd->upmove *= speed;
  811. }
  812.  
  813.  
  814. bool __fastcall Hooks::CreateMove(IClientMode* thisptr, void* edx, float sample_frametime, CUserCmd* pCmd)
  815. {
  816. // Call original createmove before we start screwing with it
  817. //static auto oCreateMove = g_Hooks.pClientModeHook->GetOriginal<CreateMove_t>(vtable_indexes::createMove);
  818. oCreateMove_t->GetTrampoline()(thisptr, edx, sample_frametime, pCmd);
  819.  
  820. if (!pCmd || !pCmd->command_number)
  821. return oCreateMove_t->GetTrampoline();
  822.  
  823.  
  824.  
  825. // Get globals
  826. g::pCmd = pCmd;
  827. g::pLocalEntity = g_pEntityList->GetClientEntity(g_pEngine->GetLocalPlayer());
  828. g::bSendPacket = true;
  829. Shonax.number = SafeWeaponID();
  830.  
  831. if (Shonax.Clantag.enable && g::pLocalEntity)
  832. if (g_pEngine->IsConnected() && g_pEngine->IsInGame())
  833. clantagsystem(g::pCmd);
  834.  
  835. if (!g::pLocalEntity)
  836. return oCreateMove_t->GetTrampoline();
  837.  
  838. uintptr_t *framePtr;
  839. __asm mov framePtr, ebp;
  840. if (Shonax.Misc.knifebot)
  841. g_Knifebot.Run();
  842.  
  843. g::OriginalView = g::pCmd->viewangles;
  844.  
  845. if (!g::pLocalEntity->IsAlive() || g_pGlobalVars->curtime - lastkilltime > 5.0f)
  846. killstreak = 0;
  847.  
  848. if (Shonax.Aimbot.Weapon[Shonax.number].SlowWalk && GetAsyncKeyState(VK_SHIFT))
  849. SlowWalk(g::pCmd, Shonax.Aimbot.Weapon[Shonax.number].Speed);
  850. GrenadePrediction::get().Tick(g::pCmd->buttons);
  851.  
  852. g_Misc.OnCreateMove();
  853. g_Resolver.OnCreateMove();
  854.  
  855. if (g_pInputSystem->IsButtonDown(Shonax.Misc.freecamerakey) && Shonax.Misc.freecamera)
  856. {
  857. pCmd->forwardmove = 0;
  858. pCmd->sidemove = 0;
  859. }
  860.  
  861.  
  862. if (Shonax.Misc.unlimit_duck) g::pCmd->buttons |= IN_BULLRUSH;
  863. if (Shonax.Misc.fake_crouch && g_pInputSystem->IsButtonDown(Shonax.newfeatures.fakeduckkey)) {
  864. /*static bool counter = false;
  865. if (g_pInputSystem->IsButtonDown(Shonax.newfeatures.fakeduckkey)) {
  866. static bool counter = false;
  867. static int counte = 0;
  868. if (counte == 5) {
  869. counte = 0;
  870. counter = !counter;
  871. }
  872. counte++;
  873. if (counter) {
  874. g::pCmd->buttons |= IN_DUCK;
  875. g::bSendPacket = true;
  876. }
  877. else {
  878. g::pCmd->buttons &= ~IN_DUCK;
  879. g::bSendPacket = false;
  880. }
  881. }*/
  882.  
  883. /*g::pCmd->buttons |= IN_DUCK;
  884. if (g::pCmd->buttons & IN_DUCK)
  885. {
  886. static bool counter = false;
  887. static int counters = 0;
  888. if (counters == 9)
  889. {
  890. counters = 0;
  891. counter = !counter;
  892. }
  893. counters++;
  894. if (counter)
  895. {
  896. g::pCmd->buttons |= IN_DUCK;
  897. g::bSendPacket = true;
  898. }
  899. else
  900. g::pCmd->buttons &= ~IN_DUCK;
  901. }*/
  902.  
  903. /*
  904. int choked_goal = Shonax.Antiaim.Fakelag / 2;
  905. bool should_crouch = g_pClientState->m_nChokedCommands >= choked_goal;
  906. if (g::pLocalEntity->GetFlags() & FL_ONGROUND)
  907. {
  908. g::pCmd->buttons |= IN_BULLRUSH;
  909. if (should_crouch)
  910. g::pCmd->buttons |= IN_DUCK;
  911. else
  912. g::pCmd->buttons &= ~IN_DUCK;
  913. }*/
  914.  
  915. /*int fakelag_limit = Shonax.Antiaim.Fakelag / 2;
  916. int choked_goal = fakelag_limit / 2;
  917. bool should_crouch = g_pEngine->GetNetChannel()->m_nChokedPackets >= choked_goal;
  918.  
  919. if (g::pLocalEntity->GetFlags() & FL_ONGROUND)
  920. {
  921. if (should_crouch)
  922. g::pCmd->buttons |= IN_DUCK;
  923. else
  924. g::pCmd->buttons &= ~IN_DUCK;
  925. }*/
  926. }
  927.  
  928. g_AntiAim.OnCreateMove();
  929.  
  930.  
  931. if (!Shonax.Visuals.ilovethat)
  932. engine_prediction::RunEnginePred();
  933. if (Shonax.Visuals.ilovethat)
  934. {
  935.  
  936. g_Aimbot.OnCreateMove();
  937. g_Legitbot.Run();
  938. TriggerBot.Move(pCmd);
  939. }
  940. if (!Shonax.Visuals.ilovethat)
  941. engine_prediction::EndEnginePred();
  942.  
  943.  
  944.  
  945. g_Misc.MovementFix(g::OriginalView);
  946. g_Math.Clamp(g::pCmd->viewangles);
  947.  
  948.  
  949.  
  950.  
  951. if (g::bSendPacket)
  952. g::RealAngle = g::pCmd->viewangles;
  953. //else
  954. //g::FakeAngle = g::pCmd->viewangles;
  955.  
  956. *(bool*)(*framePtr - 0x1C) = g::bSendPacket;
  957.  
  958. g::pCmd->buttons |= IN_BULLRUSH; // hehe
  959.  
  960.  
  961. if (Shonax.Visuals.show_spread)
  962. g_pCvar->FindVar("crosshair")->SetValue(0);
  963. else
  964. g_pCvar->FindVar("crosshair")->SetValue(1);
  965.  
  966. return false;
  967. }
  968. static IMaterial* Material;
  969. static IMaterial* Metallic;
  970. static IMaterial* GlowMat;
  971.  
  972.  
  973. void run_chams()
  974. {
  975.  
  976. }
  977. #include "Features/chamsmat.h"
  978.  
  979. float randnum2(int Min, int Max)
  980. {
  981. return ((rand() % (Max - Min)) + Min);
  982. }
  983. float GetDesyncDelta2()
  984. {
  985. auto animstate = uintptr_t(g::pLocalEntity->AnimState());
  986. float duckammount = *(float *)(animstate + 0xA4);
  987. float speedfraction = max(0, min(*reinterpret_cast<float*>(animstate + 0xF8), 1));
  988. float speedfactor = max(0, min(1, *reinterpret_cast<float*> (animstate + 0xFC)));
  989. float unk1 = ((*reinterpret_cast<float*> (animstate + 0x11C) * -0.30000001) - 0.19999999) * speedfraction;
  990. float unk2 = unk1 + 1.f;
  991. float unk3;
  992.  
  993. if (duckammount > 0)
  994. {
  995. unk2 += ((duckammount * speedfactor) * (0.5f - unk2));
  996. }
  997. unk3 = *(float *)(animstate + 0x334) * unk2;
  998. return unk3 + randnum2(-10, 0);
  999. }
  1000. static IMaterial* gold;
  1001. static IMaterial* crystal;
  1002. static IMaterial* gloss;
  1003. static IMaterial* crystalblue;
  1004. static IMaterial* glass;
  1005. static IMaterial* glow;
  1006. static IMaterial* predglass;
  1007. static IMaterial* dogout;
  1008.  
  1009.  
  1010. void __fastcall Hooks::DoExtraBonesProcessing(void * ECX, void * EDX, void * unkn1, void * unkn2, void * unkn3, void * unkn4, CBoneBitList & unkn5, void * unkn6)
  1011. {
  1012. C_BaseEntity* pPlayerEntity = (C_BaseEntity*)ECX;
  1013.  
  1014. if (!pPlayerEntity || pPlayerEntity == nullptr)
  1015. return;
  1016.  
  1017. if (!pPlayerEntity->IsAlive() || pPlayerEntity->IsDormant())
  1018. return;
  1019.  
  1020. if (!pPlayerEntity->AnimState())
  1021. return;
  1022.  
  1023. auto oDoExtraBonesProcessing = g_Hooks.pPlayerHook[pPlayerEntity->EntIndex()]->GetOriginal<ExtraBoneProcess_t>(vtable_indexes::extraBonePro);
  1024.  
  1025. float Backup = pPlayerEntity->AnimState()->m_flUnknownFraction;
  1026. pPlayerEntity->AnimState()->m_flUnknownFraction = 0;
  1027.  
  1028. oDoExtraBonesProcessing(ECX, unkn1, unkn2, unkn3, unkn4, unkn5, unkn6);
  1029.  
  1030. pPlayerEntity->AnimState()->m_flUnknownFraction = Backup;
  1031. }
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038. void __fastcall Hooks::SceneEnd(void *ecx, void *edx)
  1039. {
  1040. static auto oSceneEnd = g_Hooks.pRenderViewHook->GetOriginal<SceneEnd_t>(vtable_indexes::sceneEnd);
  1041. //miss chams to postscreen xd
  1042. knowledge.setup_materials();
  1043.  
  1044. if (!g_pEngine->IsInGame() || !g_pEngine->IsConnected())
  1045. {
  1046. Material = nullptr;
  1047. Metallic = nullptr;
  1048. GlowMat = nullptr;
  1049. }
  1050.  
  1051.  
  1052. if (Shonax.Visuals.Chams || Shonax.Visuals.LocalChams)
  1053. {
  1054. if (g_pEngine->IsConnected() && g_pEngine->IsInGame())
  1055. {
  1056. if (!g::pLocalEntity) return;
  1057. for (int i = 1; i < g_pEngine->GetMaxClients(); i++)
  1058. {
  1059. auto entity = (C_BaseEntity*)g_pEntityList->GetClientEntity(i);
  1060.  
  1061. if (!entity) continue;
  1062. if (!entity->IsAlive()) continue;
  1063. if (entity->IsDormant()) continue;
  1064. if (entity->GetClientClass()->ClassID != 38) continue;
  1065. if (entity)
  1066. {
  1067.  
  1068.  
  1069. if (entity == g::pLocalEntity && Shonax.Visuals.LocalChams && g_pInput->m_fCameraInThirdPerson)
  1070. {
  1071. if (entity)
  1072. {
  1073. if (Shonax.Visuals.BacktrackLocalChams)
  1074. {
  1075. typedef Vector Vector3D;
  1076. Vector3D OrigAng;
  1077. OrigAng = entity->GetEyeAngles();
  1078. entity->SetAngle2(Vector(OrigAng.x, g::FakeAngle.y, OrigAng.z)); // paste he re ur AA.y value or pLocal->GetLby() (for example)
  1079. dogout->ColorModulate(Shonax.Visuals.DesyncColor[0], Shonax.Visuals.DesyncColor[1], Shonax.Visuals.DesyncColor[2]);
  1080. dogout->AlphaModulate(Shonax.Visuals.DesyncColor[3]);
  1081. g_pModelRender->ForcedMaterialOverride(dogout);
  1082. entity->DrawModel(0x1, 255);
  1083. g_pModelRender->ForcedMaterialOverride(nullptr);
  1084. entity->SetAngle2(OrigAng);
  1085.  
  1086. }
  1087. }
  1088. if (entity)
  1089. {
  1090.  
  1091.  
  1092.  
  1093.  
  1094. if (Shonax.Visuals.LocalChamsType == 0)
  1095. {
  1096. Material->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, true);
  1097. Material->AlphaModulate(Shonax.Visuals.LocalChamsColor[3]);
  1098. Material->ColorModulate(Shonax.Visuals.LocalChamsColor[0], Shonax.Visuals.LocalChamsColor[1], Shonax.Visuals.LocalChamsColor[2]);
  1099. g_pModelRender->ForcedMaterialOverride(Material);
  1100. entity->DrawModel(0x1, entity->GetModelInstance());
  1101. g_pModelRender->ForcedMaterialOverride(nullptr);
  1102. }
  1103. else if (Shonax.Visuals.LocalChamsType == 1)
  1104. {
  1105.  
  1106. Metallic->AlphaModulate(Shonax.Visuals.LocalChamsColor[3]);
  1107. Metallic->ColorModulate(Shonax.Visuals.LocalChamsColor[0], Shonax.Visuals.LocalChamsColor[1], Shonax.Visuals.LocalChamsColor[2]);
  1108. g_pModelRender->ForcedMaterialOverride(Metallic);
  1109. entity->DrawModel(0x1, entity->GetModelInstance());
  1110. g_pModelRender->ForcedMaterialOverride(nullptr);
  1111. }
  1112. else if (Shonax.Visuals.LocalChamsType == 2)
  1113. {
  1114. crystal->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, true);
  1115. crystal->AlphaModulate(Shonax.Visuals.LocalChamsColor[3]);
  1116. crystal->ColorModulate(Shonax.Visuals.LocalChamsColor[0], Shonax.Visuals.LocalChamsColor[1], Shonax.Visuals.LocalChamsColor[2]);
  1117. g_pModelRender->ForcedMaterialOverride(crystal);
  1118. entity->DrawModel(0x1, entity->GetModelInstance());
  1119. g_pModelRender->ForcedMaterialOverride(nullptr);
  1120. }
  1121. else if (Shonax.Visuals.LocalChamsType == 3)
  1122. {
  1123. glass->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, true);
  1124. glass->AlphaModulate(Shonax.Visuals.LocalChamsColor[3]);
  1125. glass->ColorModulate(Shonax.Visuals.LocalChamsColor[0], Shonax.Visuals.LocalChamsColor[1], Shonax.Visuals.LocalChamsColor[2]);
  1126. g_pModelRender->ForcedMaterialOverride(glass);
  1127. entity->DrawModel(0x1, entity->GetModelInstance());
  1128. g_pModelRender->ForcedMaterialOverride(nullptr);
  1129. }
  1130. else if (Shonax.Visuals.LocalChamsType == 4 && !Shonax.Visuals.BacktrackLocalChams)
  1131. {
  1132. dogout->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, true);
  1133. dogout->AlphaModulate(Shonax.Visuals.LocalChamsColor[3]);
  1134. dogout->ColorModulate(Shonax.Visuals.LocalChamsColor[0], Shonax.Visuals.LocalChamsColor[1], Shonax.Visuals.LocalChamsColor[2]);
  1135. g_pModelRender->ForcedMaterialOverride(dogout);
  1136. entity->DrawModel(0x1, entity->GetModelInstance());
  1137. g_pModelRender->ForcedMaterialOverride(nullptr);
  1138. }
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144. }
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151. }
  1152. else if (entity->GetTeam() != g::pLocalEntity->GetTeam() && Shonax.Visuals.Chams && entity != g::pLocalEntity)
  1153. {
  1154.  
  1155. if (Shonax.Visuals.ChamsType == 0)
  1156. {
  1157. Material->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, true);
  1158. Material->AlphaModulate(Shonax.Visuals.LocalChamsColor[3]);
  1159. Material->ColorModulate(Shonax.Visuals.LocalChamsColor[0], Shonax.Visuals.LocalChamsColor[1], Shonax.Visuals.LocalChamsColor[2]);
  1160. g_pModelRender->ForcedMaterialOverride(Material);
  1161. entity->DrawModel(0x1, entity->GetModelInstance());
  1162. g_pModelRender->ForcedMaterialOverride(nullptr);
  1163. }
  1164. else if (Shonax.Visuals.ChamsType == 1)
  1165. {
  1166. Metallic->AlphaModulate(Shonax.Visuals.LocalChamsColor[3]);
  1167. Metallic->ColorModulate(Shonax.Visuals.LocalChamsColor[0], Shonax.Visuals.LocalChamsColor[1], Shonax.Visuals.LocalChamsColor[2]);
  1168. g_pModelRender->ForcedMaterialOverride(Metallic);
  1169. entity->DrawModel(0x1, entity->GetModelInstance());
  1170. g_pModelRender->ForcedMaterialOverride(nullptr);
  1171. }
  1172. else if (Shonax.Visuals.ChamsType == 2)
  1173. {
  1174. crystal->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, true);
  1175. crystal->AlphaModulate(Shonax.Visuals.LocalChamsColor[3]);
  1176. crystal->ColorModulate(Shonax.Visuals.LocalChamsColor[0], Shonax.Visuals.LocalChamsColor[1], Shonax.Visuals.LocalChamsColor[2]);
  1177. g_pModelRender->ForcedMaterialOverride(crystal);
  1178. entity->DrawModel(0x1, entity->GetModelInstance());
  1179. g_pModelRender->ForcedMaterialOverride(nullptr);
  1180. }
  1181. else if (Shonax.Visuals.ChamsType == 3)
  1182. {
  1183. glass->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, true);
  1184. glass->AlphaModulate(Shonax.Visuals.LocalChamsColor[3]);
  1185. glass->ColorModulate(Shonax.Visuals.LocalChamsColor[0], Shonax.Visuals.LocalChamsColor[1], Shonax.Visuals.LocalChamsColor[2]);
  1186. g_pModelRender->ForcedMaterialOverride(glass);
  1187. entity->DrawModel(0x1, entity->GetModelInstance());
  1188. g_pModelRender->ForcedMaterialOverride(nullptr);
  1189. }
  1190. else if (Shonax.Visuals.ChamsType == 4)
  1191. {
  1192. dogout->SetMaterialVarFlag(MATERIAL_VAR_IGNOREZ, true);
  1193. dogout->AlphaModulate(Shonax.Visuals.LocalChamsColor[3]);
  1194. dogout->ColorModulate(Shonax.Visuals.LocalChamsColor[0], Shonax.Visuals.LocalChamsColor[1], Shonax.Visuals.LocalChamsColor[2]);
  1195. g_pModelRender->ForcedMaterialOverride(dogout);
  1196. entity->DrawModel(0x1, entity->GetModelInstance());
  1197. g_pModelRender->ForcedMaterialOverride(nullptr);
  1198. }
  1199.  
  1200.  
  1201. }
  1202. }
  1203. }
  1204. }
  1205. }
  1206.  
  1207. oSceneEnd(ecx, edx);
  1208.  
  1209.  
  1210.  
  1211. }
  1212.  
  1213. void __fastcall Hooks::DrawModelExecute(void* ecx, void* edx, IMatRenderContext* context, const DrawModelState_t& state, const ModelRenderInfo_t& info, matrix3x4_t* matrix)
  1214. {
  1215. //static auto oDrawModelExecute = g_Hooks.pModelHook->GetOriginal<DrawModelExecute_t>(vtable_indexes::dme);
  1216.  
  1217. const char* ModelName = g_pModelInfo->GetModelName((model_t*)info.pModel);
  1218. IMaterial* health_boost_material = nullptr;
  1219. static bool zalupa = false;
  1220.  
  1221. if (g_pEngine->IsConnected() || g_pEngine->IsInGame())
  1222. zalupa = false;
  1223.  
  1224. knowledge.setup_materials();
  1225.  
  1226. if (!zalupa && Shonax.Visuals.headshoteffect)
  1227. {
  1228. health_boost_material = g_pMaterialSys->FindMaterial("effects/healthboost", "ClientEffect textures", true);
  1229. zalupa = true;
  1230. }
  1231. if (Shonax.Visuals.headshoteffect && health_boost_material)
  1232. {
  1233. auto boost_time_remaining = 1.0f;
  1234. if (boost_time_remaining > 0.f)
  1235. {
  1236. auto health_boost_material_var = health_boost_material->FindVar("$c0_x", false, true);
  1237. /*health_boost_material_var->set_float_value(boost_time_remaining);
  1238.  
  1239. auto render_context = g_MatSystem->get_render_context();
  1240. render_context->draw_screen_space_rectangle(health_boost_material, 0, 0, width, height, 0, 0, width, height, width, height, nullptr, 1, 1);
  1241. render_context->release();*/
  1242. }
  1243. }
  1244.  
  1245. C_BaseEntity* pPlayerEntity = g_pEntityList->GetClientEntity(info.index);
  1246. //setup
  1247. if (g_pEngine->IsConnected() && g_pEngine->IsInGame())
  1248. {
  1249. knowledge.is_sleeve = strstr(info.pModel->name, "sleeve") != nullptr;
  1250. knowledge.is_arm = strstr(info.pModel->name, "arms") != nullptr;
  1251. knowledge.is_weapon = (strstr(info.pModel->name, "weapons/v_") != nullptr) && (strstr(info.pModel->name, "arms") == nullptr) && (strstr(info.pModel->name, "knife") == nullptr) && !knowledge.is_sleeve;
  1252. knowledge.isplayer = strstr(info.pModel->name, "models/player") != nullptr;
  1253. knowledge.is_knife = strstr(info.pModel->name, "knife") != nullptr;
  1254. knowledge.is_knife_wep = strstr(info.pModel->name, "weapons/v_") != nullptr;
  1255.  
  1256. knowledge.draw_skins();
  1257. //oDrawModelExecute(ecx, context, state, info, matrix);
  1258. }
  1259. //end
  1260.  
  1261.  
  1262.  
  1263.  
  1264. if (!g::pLocalEntity && !g_pEngine->IsConnected())
  1265. {
  1266.  
  1267. gold = nullptr;
  1268. crystal = nullptr;
  1269. gloss = nullptr;
  1270. crystalblue = nullptr;
  1271. glass = nullptr;
  1272. glow = nullptr;
  1273. predglass = nullptr;
  1274. dogout = nullptr;
  1275. Material = nullptr;
  1276. Metallic = nullptr;
  1277. GlowMat = nullptr;
  1278. }
  1279.  
  1280.  
  1281. if (!gold || !crystal || !gloss || !crystalblue || !glass || !glow || !predglass || !dogout || !Material || !Metallic || !GlowMat)
  1282. {
  1283.  
  1284. gold = g_pMaterialSys->FindMaterial(chamsmat[0], "Model textures");
  1285. crystal = g_pMaterialSys->FindMaterial(chamsmat[1], "Model textures");
  1286. gloss = g_pMaterialSys->FindMaterial(chamsmat[2], "Model textures");
  1287. crystalblue = g_pMaterialSys->FindMaterial(chamsmat[3], "Model textures");
  1288. glass = g_pMaterialSys->FindMaterial(chamsmat[4], "Model textures");
  1289. glow = g_pMaterialSys->FindMaterial("vgui/achievements/glow", "Model textures");
  1290. predglass = g_pMaterialSys->FindMaterial("models/inventory_items/cologne_prediction/cologne_prediction_glass", "Other textures");
  1291. dogout = g_pMaterialSys->FindMaterial("models/inventory_items/dogtags/dogtags_outline", "Model textures");
  1292. Material = g_pMaterialSys->FindMaterial("FlatChams", "Model textures");
  1293. Metallic = g_pMaterialSys->FindMaterial("simple_ignorez_reflective", "Model textures");
  1294. GlowMat = g_pMaterialSys->FindMaterial("dev/glow_armsrace.vmt", nullptr, false, 0);
  1295. }
  1296.  
  1297. C_BaseEntity* Model_Entity = g_pEntityList->GetClientEntity(info.index);
  1298. if (Model_Entity && gold && crystal && gloss && crystalblue && glass && glow && predglass && dogout && Material && Metallic && GlowMat)
  1299. if (Shonax.Visuals.Chams || Shonax.Visuals.LocalChams || Shonax.Visuals.weaponchams || Shonax.Visuals.handchams)
  1300. {
  1301.  
  1302. if (knowledge.isplayer && !knowledge.is_sleeve && !knowledge.is_arm)
  1303. {
  1304. if (g::pLocalEntity)
  1305. if (Model_Entity->IsPlayer() && Model_Entity == g::pLocalEntity)
  1306. {
  1307. if (Shonax.Visuals.LocalChams && g::pLocalEntity->IsAlive() && g_Misc.in_tp)
  1308. {
  1309.  
  1310. /*if (Shonax.Visuals.LocalChamsType == 0)
  1311. {
  1312. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1313. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1314. g_pModelRender->ForcedMaterialOverride(Material);
  1315. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1316. }
  1317. if (Shonax.Visuals.LocalChamsType == 1)
  1318. {
  1319. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1320. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1321. g_pModelRender->ForcedMaterialOverride(Metallic);
  1322.  
  1323. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1324. }
  1325. if (Shonax.Visuals.LocalChamsType == 7)
  1326. {
  1327. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1328. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1329. g_pModelRender->ForcedMaterialOverride(GlowMat);
  1330. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1331. }
  1332. if (Shonax.Visuals.LocalChamsType == 2)
  1333. {
  1334. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1335. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1336. g_pModelRender->ForcedMaterialOverride(gold);
  1337. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1338. }
  1339. else if (Shonax.Visuals.LocalChamsType == 3)
  1340. {
  1341. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1342. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1343. g_pModelRender->ForcedMaterialOverride(crystal);
  1344. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1345. }
  1346. else if (Shonax.Visuals.LocalChamsType == 4)
  1347. {
  1348. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1349. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1350. g_pModelRender->ForcedMaterialOverride(gloss);
  1351. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1352. }
  1353. else if (Shonax.Visuals.LocalChamsType == 5)
  1354. {
  1355. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1356. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1357. g_pModelRender->ForcedMaterialOverride(crystalblue);
  1358. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1359. }
  1360. else if (Shonax.Visuals.LocalChamsType == 6)
  1361. {
  1362. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1363. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1364. g_pModelRender->ForcedMaterialOverride(glass);
  1365. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1366. }
  1367. else if (Shonax.Visuals.LocalChamsType == 8)
  1368. {
  1369. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1370. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1371. g_pModelRender->ForcedMaterialOverride(glow);
  1372. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1373. }
  1374. else if (Shonax.Visuals.LocalChamsType == 9)
  1375. {
  1376. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1377. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1378. g_pModelRender->ForcedMaterialOverride(predglass);
  1379. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1380. }
  1381. else if (Shonax.Visuals.LocalChamsType == 10)
  1382. {
  1383. g_pRenderView->SetColorModulation(Shonax.Visuals.LocalChamsColor);
  1384. g_pRenderView->SetBlend(Shonax.Visuals.LocalChamsColor[3]);
  1385. g_pModelRender->ForcedMaterialOverride(dogout);
  1386. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1387. }*/
  1388. }
  1389. }
  1390. if (g::pLocalEntity)
  1391. if (Shonax.Visuals.Chams && Model_Entity->GetTeam() != g::pLocalEntity->GetTeam() && Model_Entity->IsPlayer() && Model_Entity != g::pLocalEntity)
  1392. {
  1393. /*if (Shonax.Visuals.ChamsType == 0)
  1394. {
  1395. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1396. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1397. g_pModelRender->ForcedMaterialOverride(Material);
  1398. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1399. }
  1400. if (Shonax.Visuals.ChamsType == 1)
  1401. {
  1402. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1403. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1404. g_pModelRender->ForcedMaterialOverride(Metallic);
  1405. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1406. }
  1407. if (Shonax.Visuals.ChamsType == 7)
  1408. {
  1409. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1410. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1411. g_pModelRender->ForcedMaterialOverride(GlowMat);
  1412. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1413. }
  1414. if (Shonax.Visuals.ChamsType == 2)
  1415. {
  1416. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1417. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1418. g_pModelRender->ForcedMaterialOverride(gold);
  1419. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1420. }
  1421. else if (Shonax.Visuals.ChamsType == 3)
  1422. {
  1423. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1424. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1425. g_pModelRender->ForcedMaterialOverride(crystal);
  1426. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1427. }
  1428. else if (Shonax.Visuals.ChamsType == 4)
  1429. {
  1430. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1431. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1432. g_pModelRender->ForcedMaterialOverride(gloss);
  1433. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1434. }
  1435. else if (Shonax.Visuals.ChamsType == 5)
  1436. {
  1437. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1438. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1439. g_pModelRender->ForcedMaterialOverride(crystalblue);
  1440. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1441. }
  1442. else if (Shonax.Visuals.ChamsType == 6)
  1443. {
  1444. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1445. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1446. g_pModelRender->ForcedMaterialOverride(glass);
  1447. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1448. }
  1449. else if (Shonax.Visuals.ChamsType == 8)
  1450. {
  1451. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1452. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1453. g_pModelRender->ForcedMaterialOverride(glow);
  1454. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1455. }
  1456. else if (Shonax.Visuals.ChamsType == 9)
  1457. {
  1458. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1459. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1460. g_pModelRender->ForcedMaterialOverride(predglass);
  1461. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1462. }
  1463. else if (Shonax.Visuals.ChamsType == 10)
  1464. {
  1465. g_pRenderView->SetColorModulation(Shonax.Visuals.ChamsColor);
  1466. g_pRenderView->SetBlend(Shonax.Visuals.ChamsColor[3]);
  1467. g_pModelRender->ForcedMaterialOverride(dogout);
  1468. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1469. }*/
  1470. }
  1471. }
  1472.  
  1473.  
  1474.  
  1475. if (!Model_Entity->IsPlayer() && !knowledge.isplayer && !knowledge.is_sleeve && !knowledge.is_arm && knowledge.is_weapon && Shonax.Visuals.weaponchams && !g_Misc.in_tp)
  1476. {
  1477. if (Shonax.Visuals.weaponchamstype == 0)
  1478. {
  1479. g_pRenderView->SetColorModulation(Shonax.Visuals.weaponchamscolor);
  1480. g_pRenderView->SetBlend(Shonax.Visuals.weaponchamscolor[3]);
  1481. g_pModelRender->ForcedMaterialOverride(gold);
  1482.  
  1483. }
  1484. else if (Shonax.Visuals.weaponchamstype == 1)
  1485. {
  1486. g_pRenderView->SetColorModulation(Shonax.Visuals.weaponchamscolor);
  1487. g_pRenderView->SetBlend(Shonax.Visuals.weaponchamscolor[3]);
  1488. g_pModelRender->ForcedMaterialOverride(crystal);
  1489.  
  1490. }
  1491. else if (Shonax.Visuals.weaponchamstype == 2)
  1492. {
  1493. g_pRenderView->SetColorModulation(Shonax.Visuals.weaponchamscolor);
  1494. g_pRenderView->SetBlend(Shonax.Visuals.weaponchamscolor[3]);
  1495. g_pModelRender->ForcedMaterialOverride(gloss);
  1496.  
  1497. }
  1498. else if (Shonax.Visuals.weaponchamstype == 3)
  1499. {
  1500. g_pRenderView->SetColorModulation(Shonax.Visuals.weaponchamscolor);
  1501. g_pRenderView->SetBlend(Shonax.Visuals.weaponchamscolor[3]);
  1502. g_pModelRender->ForcedMaterialOverride(crystalblue);
  1503.  
  1504. }
  1505. else if (Shonax.Visuals.weaponchamstype == 4)
  1506. {
  1507. g_pRenderView->SetColorModulation(Shonax.Visuals.weaponchamscolor);
  1508. g_pRenderView->SetBlend(Shonax.Visuals.weaponchamscolor[3]);
  1509. g_pModelRender->ForcedMaterialOverride(glass);
  1510.  
  1511. }
  1512. else if (Shonax.Visuals.weaponchamstype == 5)
  1513. {
  1514. g_pRenderView->SetColorModulation(Shonax.Visuals.weaponchamscolor);
  1515. g_pRenderView->SetBlend(Shonax.Visuals.weaponchamscolor[3]);
  1516. g_pModelRender->ForcedMaterialOverride(glow);
  1517.  
  1518. }
  1519. else if (Shonax.Visuals.weaponchamstype == 6)
  1520. {
  1521. g_pRenderView->SetColorModulation(Shonax.Visuals.weaponchamscolor);
  1522. g_pRenderView->SetBlend(Shonax.Visuals.weaponchamscolor[3]);
  1523. g_pModelRender->ForcedMaterialOverride(predglass);
  1524.  
  1525. }
  1526. else if (Shonax.Visuals.weaponchamstype == 6)
  1527. {
  1528. g_pRenderView->SetColorModulation(Shonax.Visuals.weaponchamscolor);
  1529. g_pRenderView->SetBlend(Shonax.Visuals.weaponchamscolor[3]);
  1530. g_pModelRender->ForcedMaterialOverride(dogout);
  1531.  
  1532. }
  1533. }
  1534.  
  1535.  
  1536.  
  1537.  
  1538. }
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548. auto model_entity = static_cast<C_BaseEntity *>(g_pEntityList->GetClientEntity(info.index));
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554. if (pPlayerEntity && pPlayerEntity->IsAlive() && !pPlayerEntity->IsDormant() && g_Aimbot.Matrix[info.index] && strstr(ModelName, "models/player"))
  1555. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, g_Aimbot.Matrix[info.index]);
  1556. else
  1557. oDrawModelExecute_t->GetTrampoline()(ecx, context, state, info, matrix);
  1558. g_pModelRender->ForcedMaterialOverride(NULL);
  1559. }
  1560.  
  1561. void __stdcall Hooks::FrameStageNotify(ClientFrameStage_t curStage)
  1562. {
  1563. //static auto oFrameStage = g_Hooks.pClientHook->GetOriginal<FrameStageNotify_t>(vtable_indexes::frameStage);
  1564.  
  1565. //if (!Shonax.Visuals.drawteaserrange)
  1566. {
  1567. g_Misc.sv_cheats_spoof(curStage);
  1568. g_Misc.ThirdPerson(curStage);
  1569. g_Misc.KnifeCustom(curStage);
  1570. if (curStage == FRAME_NET_UPDATE_POSTDATAUPDATE_START)
  1571. skinchanger();//ez
  1572.  
  1573.  
  1574.  
  1575. g_Misc.SoundEsp(curStage);
  1576.  
  1577. if (curStage == FRAME_RENDER_START)
  1578. {
  1579. g_Misc.remose_flash();
  1580. g_Misc.remove_smoke();
  1581. g_Misc.ragdol_start();
  1582. }
  1583.  
  1584. g_Resolver.FrameStage(curStage);
  1585. }
  1586.  
  1587.  
  1588. oFrameStageNotify_t->GetTrampoline()(curStage);
  1589. }
  1590.  
  1591.  
  1592.  
  1593. void __fastcall Hooks::OverrideView(void* ecx, void* edx, CViewSetup* pSetup)
  1594. {
  1595. //static auto oOverrideView = g_Hooks.pClientModeHook->GetOriginal<OverrideView_t>(vtable_indexes::view);
  1596.  
  1597. if (g_pEngine->IsConnected() && g_pEngine->IsInGame())
  1598. {
  1599. if (!g::pLocalEntity)
  1600. return;
  1601.  
  1602. if (!g::pLocalEntity->IsAlive())
  1603. return;
  1604.  
  1605. if (Shonax.Visuals.NoRecoil)
  1606. {
  1607. Vector viewPunch = g::pLocalEntity->GetViewPunchAngle();
  1608. Vector aimPunch = g::pLocalEntity->GetAimPunchAngle();
  1609.  
  1610. pSetup->angles[0] -= (viewPunch[0] + (aimPunch[0] * 2 * 0.4499999f));
  1611. pSetup->angles[1] -= (viewPunch[1] + (aimPunch[1] * 2 * 0.4499999f));
  1612. pSetup->angles[2] -= (viewPunch[2] + (aimPunch[2] * 2 * 0.4499999f));
  1613. }
  1614.  
  1615. if (Shonax.Visuals.grenadepred)
  1616. GrenadePrediction::get().View(pSetup);
  1617.  
  1618. g_pCvar->FindVar("viewmodel_fov")->SetValue(Shonax.Visuals.viewmodel);
  1619. g_pCvar->FindVar("viewmodel_offset_x")->SetValue(Shonax.Visuals.viewmodel_x);
  1620. g_pCvar->FindVar("viewmodel_offset_y")->SetValue(Shonax.Visuals.viewmodel_y);
  1621. g_pCvar->FindVar("viewmodel_offset_z")->SetValue(Shonax.Visuals.viewmodel_z - 10);
  1622.  
  1623. if (Shonax.Visuals.Fov != 0 && !g::pLocalEntity->IsScoped())
  1624. pSetup->fov = Shonax.Visuals.Fov;
  1625.  
  1626. if (Shonax.Visuals.NoZoom && g::pLocalEntity->IsScoped())
  1627. pSetup->fov = (Shonax.Visuals.Fov == 0) ? 90 : Shonax.Visuals.Fov;
  1628.  
  1629.  
  1630. if (Shonax.Misc.freecamera)
  1631. {
  1632. static Vector newOrigin;
  1633.  
  1634. //int freecamkey = g_Options.Misc.iFreeCamKey;
  1635. float freecamspeed = Shonax.Misc.freecamspeed;
  1636.  
  1637.  
  1638. if (!g_pInputSystem->IsButtonDown(Shonax.Misc.freecamerakey))
  1639. {
  1640. newOrigin = pSetup->origin;
  1641. }
  1642. if (g_pInputSystem->IsButtonDown(Shonax.Misc.freecamerakey))
  1643. {
  1644.  
  1645. unsigned int fSpeed = freecamspeed; //5.f;
  1646. if (GetAsyncKeyState(VK_CONTROL))
  1647. fSpeed = fSpeed * 0.45;
  1648. if (GetAsyncKeyState(VK_SHIFT))
  1649. fSpeed = fSpeed * 1.65;
  1650. if (GetAsyncKeyState(0x57)) // W
  1651. {
  1652. newOrigin += pSetup->angles.Forward() * fSpeed;
  1653. }
  1654. if (GetAsyncKeyState(0x41)) // A
  1655. {
  1656. newOrigin += pSetup->angles.Right() * fSpeed;
  1657. }
  1658. if (GetAsyncKeyState(0x44)) // D
  1659. {
  1660. newOrigin -= pSetup->angles.Right() * fSpeed;
  1661. }
  1662. if (GetAsyncKeyState(0x53)) // S
  1663. {
  1664. newOrigin -= pSetup->angles.Forward() * fSpeed;
  1665.  
  1666. }
  1667. if (GetAsyncKeyState(VK_SPACE)) // Space
  1668. {
  1669. newOrigin += pSetup->angles.Up() * fSpeed;
  1670. }
  1671. pSetup->origin = newOrigin;
  1672. }
  1673. }
  1674. }
  1675.  
  1676. oOverrideView_t->GetTrampoline()(ecx, edx, pSetup);
  1677. }
  1678.  
  1679. void __fastcall Hooks::LockCursor(ISurface* thisptr, void* edx)
  1680. {
  1681. //static auto oLockCursor = g_Hooks.pSurfaceHook->GetOriginal<LockCursor_t>(vtable_indexes::lockCursor);
  1682.  
  1683. if (!menu_open)
  1684. return oLockCursor_t->GetTrampoline()(thisptr, edx);
  1685.  
  1686. g_pSurface->UnLockCursor();
  1687. }
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694. void OpenMenu()
  1695. {
  1696. static bool is_down = false;
  1697. static bool is_clicked = false;
  1698. if (GetAsyncKeyState(VK_INSERT))
  1699. {
  1700. is_clicked = false;
  1701. is_down = true;
  1702. }
  1703. else if (!GetAsyncKeyState(VK_INSERT) && is_down)
  1704. {
  1705. is_clicked = true;
  1706. is_down = false;
  1707. }
  1708. else
  1709. {
  1710. is_clicked = false;
  1711. is_down = false;
  1712. }
  1713.  
  1714. if (is_clicked)
  1715. {
  1716. menu_open = !menu_open;
  1717.  
  1718. }
  1719. }
  1720.  
  1721. LRESULT Hooks::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
  1722. {
  1723. switch (uMsg) {
  1724. case WM_LBUTTONDOWN:
  1725. PressedKeys[VK_LBUTTON] = true;
  1726. break;
  1727. case WM_LBUTTONUP:
  1728. PressedKeys[VK_LBUTTON] = false;
  1729. break;
  1730. case WM_RBUTTONDOWN:
  1731. PressedKeys[VK_RBUTTON] = true;
  1732. break;
  1733. case WM_RBUTTONUP:
  1734. PressedKeys[VK_RBUTTON] = false;
  1735. break;
  1736. case WM_MBUTTONDOWN:
  1737. PressedKeys[VK_MBUTTON] = true;
  1738. break;
  1739. case WM_MBUTTONUP:
  1740. PressedKeys[VK_MBUTTON] = false;
  1741. break;
  1742. case WM_XBUTTONDOWN:
  1743. {
  1744. UINT button = GET_XBUTTON_WPARAM(wParam);
  1745. if (button == XBUTTON1)
  1746. {
  1747. PressedKeys[VK_XBUTTON1] = true;
  1748. }
  1749. else if (button == XBUTTON2)
  1750. {
  1751. PressedKeys[VK_XBUTTON2] = true;
  1752. }
  1753. break;
  1754. }
  1755. case WM_XBUTTONUP:
  1756. {
  1757. UINT button = GET_XBUTTON_WPARAM(wParam);
  1758. if (button == XBUTTON1)
  1759. {
  1760. PressedKeys[VK_XBUTTON1] = false;
  1761. }
  1762. else if (button == XBUTTON2)
  1763. {
  1764. PressedKeys[VK_XBUTTON2] = false;
  1765. }
  1766. break;
  1767. }
  1768. case WM_KEYDOWN:
  1769. PressedKeys[wParam] = true;
  1770. break;
  1771. case WM_KEYUP:
  1772. PressedKeys[wParam] = false;
  1773. break;
  1774. default: break;
  1775. }
  1776.  
  1777. OpenMenu();
  1778.  
  1779. if (d3d_init && menu_open && ImGui_ImplDX9_WndProcHandler(hWnd, uMsg, wParam, lParam) && !input_shouldListen)
  1780. return true;
  1781.  
  1782. return CallWindowProc(g_Hooks.pOriginalWNDProc, hWnd, uMsg, wParam, lParam);
  1783. }
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789. void GUI_Init(IDirect3DDevice9* pDevice)
  1790. {
  1791. ImGui_ImplDX9_Init(g_Hooks.hCSGOWindow, pDevice);
  1792.  
  1793.  
  1794.  
  1795.  
  1796.  
  1797. ImGuiIO& io = ImGui::GetIO();
  1798.  
  1799.  
  1800.  
  1801. Text = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Verdana.ttf", 13.f);
  1802. Tabs = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Tahoma.ttf", 20.0f);
  1803. icon = io.Fonts->AddFontFromMemoryCompressedTTF(MyFont_compressed_data13, MyFont_compressed_size13, 25.f);
  1804. icon2 = io.Fonts->AddFontFromMemoryCompressedTTF(MyFont_compressed_dataxdd, MyFont_compressed_sizexdd, 25.f);
  1805. anti_aim = io.Fonts->AddFontFromMemoryCompressedTTF(MyFont_compressed_data13, MyFont_compressed_size13, 15.f);
  1806.  
  1807. Main1 = io.Fonts->AddFontFromMemoryTTF(&maintext1, sizeof maintext1, 18.0f);
  1808. Main2 = io.Fonts->AddFontFromMemoryTTF(&maintext2, sizeof maintext2, 12.0f);
  1809. Main = io.Fonts->AddFontFromMemoryTTF(&maintext1, sizeof maintext1, 22.0f);
  1810. Main3 = io.Fonts->AddFontFromMemoryTTF(&maintext1, sizeof maintext1, 15.0f);
  1811. LW = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Night Machine.ttf", 24.0f);
  1812. LW2 = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\Night Machine.ttf", 20.0f);
  1813. D3DXCreateFont(pDevice, 20, 10, FW_NORMAL, 1, 0, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, ("Choktoff"), &fntVerdana10);
  1814. ImGuiStyle &style = ImGui::GetStyle();
  1815. style.Alpha = 1.0f;
  1816. style.WindowPadding = ImVec2(8, 8);
  1817. style.WindowMinSize = ImVec2(32, 32);
  1818. style.WindowRounding = 0.0f;
  1819. style.WindowTitleAlign = ImVec2(0.5f, 0.5f);
  1820. style.ChildWindowRounding = 0.0f;
  1821. style.FramePadding = ImVec2(4, 1);
  1822. style.FrameRounding = 0.0f;
  1823. style.ItemSpacing = ImVec2(15, 4);
  1824. style.ItemInnerSpacing = ImVec2(4, 4);
  1825. style.TouchExtraPadding = ImVec2(0, 0);
  1826. style.IndentSpacing = 21.0f;
  1827. style.ColumnsMinSpacing = 3.0f;
  1828. style.ScrollbarSize = 12.0f;
  1829. style.ScrollbarRounding = 0.0f;
  1830. style.GrabMinSize = 0.1f;
  1831. style.GrabRounding = 16.0f;
  1832. style.ButtonTextAlign = ImVec2(0.5f, 0.5f);
  1833. style.DisplayWindowPadding = ImVec2(22, 22);
  1834. style.DisplaySafeAreaPadding = ImVec2(4, 4);
  1835. style.AntiAliasedLines = true;
  1836. style.AntiAliasedShapes = true;
  1837. style.CurveTessellationTol = 1.25f;
  1838.  
  1839.  
  1840. ImVec4 Color_Title_Text = ImColor(165, 75, 100);
  1841.  
  1842. int MenuRed, MenuGreen, MenuBlue;
  1843.  
  1844. MenuRed = 255;
  1845. MenuGreen = 255;
  1846. MenuBlue = 255;
  1847.  
  1848. ImColor mainColor = ImColor(MenuRed, MenuGreen, MenuBlue);
  1849. ImColor bodyColor = ImColor(24, 24, 24, 239);
  1850. ImColor fontColor = ImColor(150, 150, 150, 255);
  1851.  
  1852.  
  1853. ImVec4 mainColorHovered = ImVec4(mainColor.Value.x + 0.1f, mainColor.Value.y + 0.1f, mainColor.Value.z + 0.1f, mainColor.Value.w);
  1854. ImVec4 mainColorActive = ImVec4(mainColor.Value.x + 0.2f, mainColor.Value.y + 0.2f, mainColor.Value.z + 0.2f, mainColor.Value.w);
  1855. ImVec4 menubarColor = ImVec4(bodyColor.Value.x, bodyColor.Value.y, bodyColor.Value.z, bodyColor.Value.w - 0.8f);
  1856. ImVec4 frameBgColor = ImVec4(bodyColor.Value.x, bodyColor.Value.y, bodyColor.Value.z, bodyColor.Value.w + .1f);
  1857. ImVec4 tooltipBgColor = ImVec4(bodyColor.Value.x, bodyColor.Value.y, bodyColor.Value.z, bodyColor.Value.w + .05f);
  1858. //style.Colors[ImGuiCol_Button] = ImColor(255, 127, 39, 255);
  1859.  
  1860. style.Colors[ImGuiCol_MainTheme] = ImColor(176, 66, 244, 255);
  1861. style.Colors[ImGuiCol_MainTheme2] = ImColor(138, 6, 219, 255);
  1862.  
  1863. style.Colors[ImGuiCol_Text] = ImVec4(0.9f, 0.9f, 0.9f, 1.f);
  1864. style.Colors[ImGuiCol_TextDisabled] = ImVec4(1.f, 1.f, 1.f, 1.f);
  1865. style.Colors[ImGuiCol_WindowBg] = ImVec4(0.13f, 0.13f, 0.13f, 1.f);
  1866. style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.1f, 0.1f, 0.1f, 0.f);
  1867. style.Colors[ImGuiCol_Border] = ImColor(15, 30, 15, 255);
  1868. style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
  1869. style.Colors[ImGuiCol_FrameBg] = ImVec4(0.22f, 0.22f, 0.22f, 0.f);
  1870. style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.22f, 0.22f, 0.22f, 1.f);
  1871. style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.22f, 0.22f, 0.22f, 1.f);
  1872. style.Colors[ImGuiCol_TitleBg] = ImColor(MenuRed, MenuGreen, MenuBlue, 255);
  1873. style.Colors[ImGuiCol_TitleBgCollapsed] = ImColor(MenuRed, MenuGreen, MenuBlue, 255);
  1874. style.Colors[ImGuiCol_TitleBgActive] = ImColor(MenuRed, MenuGreen, MenuBlue, 255);
  1875. style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.24f, 0.24f, 0.24f, 1.00f);
  1876. style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(frameBgColor.x + .1f, frameBgColor.y + .1f, frameBgColor.z + .1f, frameBgColor.w);
  1877. style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.40f, 0.40f, 0.40f, 1.f);
  1878. style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.40f, 0.40f, 0.40f, 1.f);
  1879. style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.40f, 0.40f, 0.40f, 1.f);
  1880. style.Colors[ImGuiCol_ComboBg] = frameBgColor;
  1881. style.Colors[ImGuiCol_CheckMark] = ImColor(176, 66, 244, 255);
  1882. style.Colors[ImGuiCol_SliderGrab] = ImColor(68, 140, 255);
  1883. style.Colors[ImGuiCol_SliderGrabActive] = ImColor(68, 140, 255);
  1884. style.Colors[ImGuiCol_Button] = ImVec4(0.1f, 0.1f, 0.1f, 0.95f);
  1885. style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.1f, 0.1f, 0.1f, 0.95f);
  1886. style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.1f, 0.1f, 0.1f, 0.95f);
  1887. //style.Colors[ImGuiCol_Header] = mainColor;
  1888. //style.Colors[ImGuiCol_HeaderHovered] = mainColorHovered;
  1889. //style.Colors[ImGuiCol_HeaderActive] = mainColorActive;
  1890. style.Colors[ImGuiCol_Header] = ImColor(176, 66, 244, 125);
  1891. style.Colors[ImGuiCol_HeaderHovered] = ImColor(138, 6, 219, 125);
  1892. style.Colors[ImGuiCol_HeaderActive] = ImColor(138, 6, 219, 125);
  1893.  
  1894. style.Colors[ImGuiCol_Column] = ImVec4(.30f, .30f, .30f, 1.f);
  1895. style.Colors[ImGuiCol_ColumnHovered] = mainColorHovered;
  1896. style.Colors[ImGuiCol_ColumnActive] = mainColorActive;
  1897.  
  1898.  
  1899.  
  1900. d3d_init = true;
  1901. }
  1902.  
  1903.  
  1904. void morphBtnActiveTab()
  1905. {
  1906. auto& style = ImGui::GetStyle();
  1907. style.Colors[ImGuiCol_Button] = ImColor(176, 66, 244, 255);
  1908. style.Colors[ImGuiCol_ButtonHovered] = ImColor(176, 66, 244, 255);
  1909. style.Colors[ImGuiCol_ButtonActive] = ImColor(176, 66, 244, 255);
  1910. style.Colors[ImGuiCol_Text] = ImColor(255, 255, 255, 255);
  1911. }
  1912.  
  1913. void morphBtnNormalTab()
  1914. {
  1915. auto& style = ImGui::GetStyle();
  1916. style.Colors[ImGuiCol_Button] = ImColor(176, 66, 244, 255);
  1917. style.Colors[ImGuiCol_ButtonHovered] = ImColor(176, 66, 244, 255);
  1918. style.Colors[ImGuiCol_ButtonActive] = ImColor(176, 66, 244, 255);
  1919. style.Colors[ImGuiCol_Text] = ImColor(140, 140, 140, 255);
  1920.  
  1921. }
  1922.  
  1923. void Active()
  1924. {
  1925. auto& style = ImGui::GetStyle();
  1926. style.Colors[ImGuiCol_Button] = ImColor(17, 17, 17, 255);
  1927. style.Colors[ImGuiCol_ButtonHovered] = ImColor(17, 17, 17, 255);
  1928. style.Colors[ImGuiCol_ButtonActive] = ImColor(17, 17, 17, 255);
  1929. style.Colors[ImGuiCol_Text] = ImColor(176, 66, 244, 255);
  1930. }
  1931.  
  1932. void Normal()
  1933. {
  1934. auto& style = ImGui::GetStyle();
  1935. style.Colors[ImGuiCol_Button] = ImColor(17, 17, 17, 255);
  1936. style.Colors[ImGuiCol_ButtonHovered] = ImColor(17, 17, 17, 255);
  1937. style.Colors[ImGuiCol_ButtonActive] = ImColor(17, 17, 17, 255);
  1938. style.Colors[ImGuiCol_Text] = ImColor(255, 255, 255, 255);
  1939.  
  1940. }
  1941.  
  1942. void Hover()
  1943. {
  1944. auto& style = ImGui::GetStyle();
  1945. style.Colors[ImGuiCol_Button] = ImColor(17, 17, 17, 255);
  1946. style.Colors[ImGuiCol_ButtonHovered] = ImColor(17, 17, 17, 255);
  1947. style.Colors[ImGuiCol_ButtonActive] = ImColor(17, 17, 17, 255);
  1948. style.Colors[ImGuiCol_Text] = ImColor(255, 255, 255, 255);
  1949.  
  1950. }
  1951.  
  1952. static bool _visible = true;
  1953.  
  1954. void MessageSend()
  1955. {
  1956. write.SendClientHello();
  1957. write.SendMatchmakingClient2GCHello();
  1958. }
  1959.  
  1960. bool __fastcall Hooks::HookedSetupbones(void * ecx, void * edx, matrix3x4_t *bone_world_out, int max_bones, int bone_mask, float current_time) {
  1961. static auto zalupa = g_Hooks.pBones->GetOriginal<SetupBonesFn>(vtable_indexes::setupbones);
  1962. if (ecx && ((IClientRenderable*)ecx)->GetIClientUnknown()) {
  1963.  
  1964. IClientNetworkable* pNetworkable = ((IClientRenderable*)ecx)->GetIClientUnknown()->GetClientNetworkable();
  1965. if (pNetworkable && pNetworkable->GetClientClass() && pNetworkable->GetClientClass()->ClassID == 38) {
  1966. static auto host_timescale = g_pCvar->FindVar(("host_timescale"));
  1967. auto player = (C_BaseEntity*)ecx;
  1968. float OldCurTime = g_pGlobalVars->curtime;
  1969. float OldRealTime = g_pGlobalVars->realtime;
  1970. float OldFrameTime = g_pGlobalVars->frametime;
  1971. float OldAbsFrameTime = g_pGlobalVars->absoluteframetime;
  1972. float OldAbsFrameTimeStart = g_pGlobalVars->absoluteframestarttimestddev;
  1973. float OldInterpAmount = g_pGlobalVars->interpolationAmount;
  1974. int OldFrameCount = g_pGlobalVars->framecount;
  1975. int OldTickCount = g_pGlobalVars->tickcount;
  1976.  
  1977. g_pGlobalVars->curtime = player->GetSimulationTime();
  1978. g_pGlobalVars->realtime = player->GetSimulationTime();
  1979. g_pGlobalVars->frametime = g_pGlobalVars->intervalPerTick * host_timescale->GetFloat();
  1980. g_pGlobalVars->absoluteframetime = g_pGlobalVars->intervalPerTick * host_timescale->GetFloat();
  1981. g_pGlobalVars->absoluteframestarttimestddev = player->GetSimulationTime() - g_pGlobalVars->intervalPerTick * host_timescale->GetFloat();
  1982. g_pGlobalVars->interpolationAmount = 0;
  1983. g_pGlobalVars->framecount = TIME_TO_TICKS(player->GetSimulationTime());
  1984. g_pGlobalVars->tickcount = TIME_TO_TICKS(player->GetSimulationTime());
  1985.  
  1986.  
  1987. //*( int* ) ( ( int ) player + 224 ) |= 8;
  1988. *(int*)((int)player + 236) |= 8; // IsNoInterpolationFrame
  1989. bool ret_value = zalupa(player, bone_world_out, max_bones, bone_mask, g_pGlobalVars->curtime);
  1990. *(int*)((int)player + 236) &= ~8; // (1 << 3)
  1991. //*( int* ) ( ( int ) player + 224 ) &= ~8;
  1992.  
  1993. g_pGlobalVars->curtime = OldCurTime;
  1994. g_pGlobalVars->realtime = OldRealTime;
  1995. g_pGlobalVars->frametime = OldFrameTime;
  1996. g_pGlobalVars->absoluteframetime = OldAbsFrameTime;
  1997. g_pGlobalVars->absoluteframestarttimestddev = OldAbsFrameTimeStart;
  1998. g_pGlobalVars->interpolationAmount = OldInterpAmount;
  1999. g_pGlobalVars->framecount = OldFrameCount;
  2000. g_pGlobalVars->tickcount = OldTickCount;
  2001.  
  2002. return ret_value;
  2003. }
  2004. }
  2005.  
  2006. return zalupa(ecx, bone_world_out, max_bones, bone_mask, current_time);
  2007. }
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013. std::vector<int> GetObservervators(int playerId)
  2014. {
  2015. std::vector<int> SpectatorList;
  2016.  
  2017. C_BaseEntity* pPlayer = (C_BaseEntity*)g_pEntityList->GetClientEntity(playerId);
  2018.  
  2019. if (!pPlayer)
  2020. return SpectatorList;
  2021.  
  2022. if (!pPlayer->IsAlive())
  2023. {
  2024. C_BaseEntity* pObserverTarget = (C_BaseEntity*)g_pEntityList->GetClientEntityFromHandle(pPlayer->m_hObserverTarget());
  2025.  
  2026. if (!pObserverTarget)
  2027. return SpectatorList;
  2028.  
  2029. pPlayer = pObserverTarget;
  2030. }
  2031.  
  2032. for (int PlayerIndex = 0; PlayerIndex < 65; PlayerIndex++)
  2033. {
  2034. C_BaseEntity* pCheckPlayer = (C_BaseEntity*)g_pEntityList->GetClientEntity(PlayerIndex);
  2035.  
  2036. if (!pCheckPlayer)
  2037. continue;
  2038.  
  2039. if (pCheckPlayer->IsDormant() || pCheckPlayer->IsAlive())
  2040. continue;
  2041.  
  2042. C_BaseEntity* pObserverTarget = (C_BaseEntity*)g_pEntityList->GetClientEntityFromHandle(pCheckPlayer->m_hObserverTarget());
  2043.  
  2044. if (!pObserverTarget)
  2045. continue;
  2046.  
  2047. if (pPlayer != pObserverTarget)
  2048. continue;
  2049.  
  2050. SpectatorList.push_back(PlayerIndex);
  2051. }
  2052.  
  2053. return SpectatorList;
  2054. }
  2055.  
  2056. void SpectatorList()
  2057. {
  2058. if (!Shonax.Misc.spectators)
  2059. return;
  2060.  
  2061. if (!g_pEngine->IsInGame() && !g_pEngine->IsConnected())
  2062. return;
  2063.  
  2064. int specs = 0;
  2065.  
  2066. std::string spect = "";
  2067.  
  2068. int DrawIndex = 1;
  2069.  
  2070. for (int playerId : GetObservervators(g_pEngine->GetLocalPlayer()))
  2071. {
  2072. if (playerId == g_pEngine->GetLocalPlayer())
  2073. continue;
  2074.  
  2075. C_BaseEntity* pPlayer = (C_BaseEntity*)g_pEntityList->GetClientEntity(playerId);
  2076.  
  2077. if (!pPlayer)
  2078. continue;
  2079.  
  2080. PlayerInfo_s Pinfo;
  2081. g_pEngine->GetPlayerInfo(playerId, &Pinfo);
  2082.  
  2083. //if (Pinfo.fakeplayer)
  2084. // continue;
  2085.  
  2086. spect += Pinfo.szName;
  2087. spect += "\n";
  2088. specs++;
  2089.  
  2090. }
  2091. bool Spectators = true;
  2092. ImGuiStyle& style = ImGui::GetStyle();
  2093. style.Colors[ImGuiCol_WindowBg] = ImVec4(0.10f, 0.10f, 0.10f, 0.7f);
  2094. ImGui::PushStyleColor(ImGuiCol_CloseButton, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  2095. style.Colors[ImGuiCol_WindowBg] = ImVec4(0.10f, 0.10f, 0.10f, 0.7f);
  2096. ImGui::PushStyleColor(ImGuiCol_TitleBg, ImColor(176, 66, 244, 200));
  2097. ImGui::PushStyleColor(ImGuiCol_TitleBgActive, ImColor(176, 66, 244, 200));
  2098. ImGui::PushStyleColor(ImGuiCol_TitleBgCollapsed, ImColor(176, 66, 244, 200));
  2099. ImGui::PushFont(Main2);
  2100. if (ImGui::Begin("Spectators", &Spectators, ImVec2(200, 250), 1.0F, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_NoScrollbar))
  2101. {
  2102.  
  2103. if (specs > 0) spect += "\n";
  2104.  
  2105. ImVec2 size = ImGui::CalcTextSize(spect.c_str());
  2106.  
  2107. ImGui::SetWindowSize(ImVec2(200, 40 + size.y));
  2108. ImGui::Columns(1);
  2109.  
  2110.  
  2111. ImGui::Text(spect.c_str());
  2112. ImGui::Columns(1);
  2113. DrawIndex++;
  2114.  
  2115. }
  2116. ImGui::PopStyleColor(4);
  2117. ImGui::PopFont();
  2118. ImGui::End();
  2119. }
  2120.  
  2121. void DrawColors()
  2122. {
  2123. ImVec2 menu_pos;
  2124.  
  2125. ImGuiIO& io = ImGui::GetIO();
  2126. ImGuiStyle& style = ImGui::GetStyle();
  2127.  
  2128.  
  2129.  
  2130. ImVec2 pos = ImGui::GetWindowPos();
  2131.  
  2132.  
  2133. style.Colors[ImGuiCol_WindowBg] = ImColor(17, 17, 17, 255);
  2134. style.Colors[ImGuiCol_Border] = ImVec4(1.f, 1.f, 1.f, 0.f);
  2135. ImGui::PushStyleColor(ImGuiCol_TitleBg, ImColor(176, 66, 244, 200));
  2136. ImGui::PushStyleColor(ImGuiCol_TitleBgActive, ImColor(176, 66, 244, 200));
  2137. ImGui::PushStyleColor(ImGuiCol_TitleBgCollapsed, ImColor(176, 66, 244, 200));
  2138. ImGui::PushStyleColor(ImGuiCol_CloseButton, ImVec4(0.0f, 0.0f, 0.0f, 0.0f));
  2139. ImGui::PushFont(Text);
  2140. if (ImGui::Begin("Colors", &_visible, ImVec2(300, 500), 1.0F, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_NoScrollbar))
  2141. {
  2142.  
  2143.  
  2144. ImGui::BeginChildNew("", ImVec2(280, -1), true, ImGuiWindowFlags_ChildZeus);
  2145. {
  2146.  
  2147.  
  2148.  
  2149.  
  2150. ImGui::Text("ESP");
  2151. ImGui::Spacing();
  2152. ImGui::Spacing();
  2153. ImGui::MyColorEdit4("Font color", Shonax.Visuals.FontColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2154. ImGui::MyColorEdit4("Box color", Shonax.Visuals.BoxColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2155. ImGui::MyColorEdit4("Sceleton color", Shonax.Visuals.SkeletonColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2156. ImGui::MyColorEdit4("Tracer color", Shonax.Visuals.bullet_tracer_color, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2157. ImGui::MyColorEdit4("Spread color", Shonax.Visuals.show_spread_color, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2158. ImGui::MyColorEdit4("Capsule color", Shonax.Visuals.capsule_col, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2159. ImGui::MyColorEdit4("SoundEsp color", Shonax.Visuals.SoundEspColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2160. ImGui::MyColorEdit4("Local SoundEsp color", Shonax.Visuals.LocalSoundEspColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2161. ImGui::MyColorEdit4("DamageEsp color", Shonax.Visuals.damageespcolor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2162. ImGui::MyColorEdit4("Arrow color", Shonax.Visuals.povarrowcolor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2163. ImGui::MyColorEdit4("Damage group color", Shonax.Visuals.damagegroupcolor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2164.  
  2165. ImGui::MyColorEdit4("Line color", Shonax.Visuals.snapline, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2166. ImGui::MyColorEdit4("DLight color", Shonax.Visuals.dlightcolor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2167.  
  2168. ImGui::Spacing();
  2169. ImGui::Spacing();
  2170. ImGui::Text("Colored models");
  2171. ImGui::Spacing();
  2172. ImGui::Spacing();
  2173. ImGui::MyColorEdit4("Chams color", Shonax.Visuals.ChamsColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2174. ImGui::MyColorEdit4("Glow color", Shonax.Visuals.glowcolor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2175. ImGui::MyColorEdit4("Local Chams color", Shonax.Visuals.LocalChamsColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2176. ImGui::MyColorEdit4("Desync Chams color", Shonax.Visuals.DesyncColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2177. ImGui::MyColorEdit4("Local Glow color", Shonax.Visuals.glowlocal, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2178. ImGui::MyColorEdit4("Weapon Chams color", Shonax.Visuals.weaponchamscolor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2179. ImGui::MyColorEdit4("Hand Chams color", Shonax.Visuals.handchamscolor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2180. ImGui::MyColorEdit4("Knife Chams color", Shonax.Visuals.knifechamcolor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2181. ImGui::MyColorEdit4("Droped weapon Chams color", Shonax.Visuals.WeaponsWorldColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2182. ImGui::MyColorEdit4("Weapon droped Glow color", Shonax.Visuals.weaponglowcolor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders);
  2183. ImGui::Spacing();
  2184. ImGui::Spacing();
  2185. ImGui::Text("Misc");
  2186. if (ImGui::MyColorEdit4("Sky color", Shonax.Visuals.SkyColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders)) Shonax.Visuals.skycheck = true; else Shonax.Visuals.skycheck = false;
  2187. if (ImGui::MyColorEdit4("World color", Shonax.Visuals.WorldColor, ImGuiColorEditFlags_Alpha | ImGuiColorEditFlags_NoSliders)) Shonax.Visuals.worldcheck = true; else Shonax.Visuals.worldcheck = false;
  2188.  
  2189.  
  2190. }
  2191. ImGui::EndChild();
  2192.  
  2193. ImGui::PopFont();
  2194. }
  2195. ImGui::PopStyleColor(4);
  2196. ImGui::End();
  2197. }
  2198.  
  2199. C_BaseCombatWeapon* GetActiveBaseCombatWeaponxd(C_BaseEntity *entity)
  2200. {
  2201. unsigned long pWeepEhandle = *reinterpret_cast<unsigned long*>(uintptr_t(entity) + 0x2EF8);
  2202. return (C_BaseCombatWeapon*)(g_pEntityList->GetClientEntityFromHandle(pWeepEhandle));
  2203. }
  2204.  
  2205. void RenderMonitor()
  2206. {
  2207. if (!Shonax.Misc.monitor)
  2208. return;
  2209.  
  2210. if (!g_pEngine->IsConnected())
  2211. return;
  2212.  
  2213. if (!g_pEngine->IsInGame())
  2214. return;
  2215.  
  2216. if (!g::pLocalEntity)
  2217. return;
  2218.  
  2219. auto pLocal = g::pLocalEntity;
  2220.  
  2221. if (!pLocal)
  2222. return;
  2223.  
  2224. if (!pLocal->IsAlive())
  2225. return;
  2226.  
  2227. if (!pLocal->IsDormant())
  2228. return;
  2229.  
  2230. ImGui::PushFont(Main2);
  2231. ImGuiStyle& style = ImGui::GetStyle();
  2232. style.Colors[ImGuiCol_WindowBg] = ImVec4(0.10f, 0.10f, 0.10f, 0.7f);
  2233. if (ImGui::Begin(("Monitor"), &Shonax.Misc.monitor, ImVec2(200, 250), 1.0F, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_NoScrollbar))
  2234. {
  2235. ImDrawList* windowDrawList = ImGui::GetWindowDrawList();
  2236.  
  2237. ImVec2 siz = ImGui::GetWindowSize();
  2238. ImVec2 pos = ImGui::GetWindowPos();
  2239. if (pLocal)
  2240. {
  2241. C_BaseCombatWeapon* pWeapon = GetActiveBaseCombatWeaponxd(pLocal);
  2242. if (pWeapon)
  2243. {
  2244. float accuracy = pWeapon->GetInaccuracy() * 550.f;
  2245.  
  2246. if (accuracy > 179)
  2247. accuracy = 179;
  2248.  
  2249. int iSpeed = 0;
  2250. Vector vSpeed = pLocal->GetVelocity();
  2251. iSpeed = (int)vSpeed.Length2D();
  2252.  
  2253. int iBoost = 0;
  2254. Vector vBoost = pLocal->GetVelocity();
  2255. iBoost = (int)vBoost.Length2D() - 300;
  2256.  
  2257. float flPunch = 0.0f;
  2258. Vector vRecoil = pLocal->GetAimPunchAngle();
  2259. flPunch = (float)vRecoil.Length();
  2260.  
  2261. if (iSpeed < 300)
  2262. windowDrawList->AddText(ImVec2(pos.x + 25, pos.y + 1 + 217), Color(255, 255, 255, 255).GetU32(), ("Speed"));
  2263. if (iSpeed > 300)
  2264. windowDrawList->AddText(ImVec2(pos.x + 25, pos.y + 1 + 217), Color(255, 0, 0, 255).GetU32(), ("Boost"));
  2265. windowDrawList->AddText(ImVec2(pos.x + 85, pos.y + 1 + 217), Color(255, 255, 255, 255).GetU32(), ("Recoil"));
  2266. windowDrawList->AddText(ImVec2(pos.x + 145, pos.y + 1 + 217), Color(255, 255, 255, 255).GetU32(), ("Spread"));
  2267.  
  2268. windowDrawList->AddRect(ImVec2(pos.x + 147, pos.y + 35), ImVec2(pos.x + 147 + 25, pos.y + 35 + 180), Color(0, 0, 0, 255).GetU32());
  2269. windowDrawList->AddRect(ImVec2(pos.x + 87, pos.y + 35), ImVec2(pos.x + 87 + 25, pos.y + 35 + 180), Color(0, 0, 0, 255).GetU32());
  2270. windowDrawList->AddRect(ImVec2(pos.x + 28, pos.y + 35), ImVec2(pos.x + 28 + 25, pos.y + 35 + 180), Color(0, 0, 0, 255).GetU32());
  2271.  
  2272. if (iSpeed < 300)
  2273. windowDrawList->AddRectFilled(ImVec2(pos.x + 28, pos.y + 35 + 180 - (iSpeed * 0.6)), ImVec2(pos.x + 28 + 25, pos.y + 35 + 180), Color(255, 255, 255, 255).GetU32());
  2274.  
  2275. if (iSpeed > 300)
  2276. windowDrawList->AddRectFilled(ImVec2(pos.x + 28, pos.y + 35 + 180 - (iBoost * 0.2)), ImVec2(pos.x + 28 + 25, pos.y + 35 + 180), Color(255, 0, 0, 255).GetU32());
  2277.  
  2278. windowDrawList->AddRectFilled(ImVec2(pos.x + 147, pos.y + 35 + 180 - accuracy), ImVec2(pos.x + 147 + 25, pos.y + 35 + 180), Color(255, 255, 255, 255).GetU32());
  2279. windowDrawList->AddRectFilled(ImVec2(pos.x + 87, pos.y + 35 + 180 - flPunch * 30), ImVec2(pos.x + 87 + 25, pos.y + 35 + 180), Color(255, 255, 255, 255).GetU32());
  2280.  
  2281.  
  2282. }
  2283. }
  2284.  
  2285.  
  2286.  
  2287.  
  2288. }
  2289. ImGui::PopFont();
  2290. ImGui::End();
  2291. }
  2292.  
  2293.  
  2294.  
  2295.  
  2296. int givemeshit(int v)
  2297. {
  2298. int x, y;
  2299. g_pEngine->GetScreenSize(x, y);
  2300. if (v == 0)
  2301. return x;
  2302. else
  2303. return y;
  2304. }
  2305.  
  2306. void DrawMenu()
  2307. {
  2308. ImVec2 menu_pos;
  2309.  
  2310. ImGuiIO& io = ImGui::GetIO();
  2311. ImGuiStyle& style = ImGui::GetStyle();
  2312.  
  2313.  
  2314.  
  2315. ImVec2 pos = ImGui::GetWindowPos();
  2316.  
  2317. static int tab = -1;
  2318. style.Colors[ImGuiCol_WindowBg] = ImColor(17, 17, 17, 255);
  2319. style.Colors[ImGuiCol_Border] = ImVec4(1.f, 1.f, 1.f, 0.f);
  2320. ImGui::SetNextWindowSize(ImVec2(880, 520));
  2321.  
  2322. ImGui::Begin("LegendWare", &_visible, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_ShowBorders | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoTitleBar);
  2323. {
  2324. style.Colors[ImGuiCol_ChildWindowBg] = ImColor(17, 17, 17, 255);
  2325.  
  2326.  
  2327. ImGui::BeginChild("##Content", ImVec2(860, -1), false);
  2328. {
  2329. style.ItemSpacing = ImVec2(5, 4);
  2330. style.ButtonTextAlign = ImVec2(0.5f, 0.0f);
  2331.  
  2332. ImGui::PushFont(LW);
  2333. ImGui::Spacing();
  2334. ImGui::Spacing();
  2335. ImGui::BeginGroup();
  2336. ImGui::SameLine(20);
  2337. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(255, 255, 255, 255));
  2338. ImGui::Text("LegendWare");
  2339. ImGui::PopStyleColor();
  2340. ImGui::SameLine(220);
  2341. ImGui::PopFont();
  2342. ImGui::BeginGroup();
  2343. ImGui::PushFont(LW2);
  2344.  
  2345.  
  2346. if (tab == 1) Active(); else Normal();
  2347.  
  2348. if (ImGui::Button("Ragebot", ImVec2(100, 50))) tab = 1;
  2349.  
  2350.  
  2351.  
  2352.  
  2353. ImGui::SameLine();
  2354.  
  2355.  
  2356. if (tab == 0) Active(); else Normal();
  2357.  
  2358. if (ImGui::Button("Legitbot", ImVec2(100, 50))) tab = 0;
  2359.  
  2360.  
  2361. ImGui::SameLine();
  2362.  
  2363.  
  2364. if (tab == 2) Active(); else Normal();
  2365.  
  2366. if (ImGui::Button(" Visuals", ImVec2(100, 50))) tab = 2;
  2367.  
  2368.  
  2369.  
  2370. ImGui::SameLine();
  2371.  
  2372.  
  2373. if (tab == 3) Active(); else Normal();
  2374.  
  2375. if (ImGui::Button(" Misc", ImVec2(100, 50))) tab = 3;
  2376.  
  2377.  
  2378. ImGui::SameLine();
  2379.  
  2380.  
  2381. if (tab == 4) Active(); else Normal();
  2382.  
  2383. if (ImGui::Button("Skins", ImVec2(100, 50))) tab = 4;
  2384.  
  2385.  
  2386.  
  2387.  
  2388. ImGui::SameLine();
  2389.  
  2390.  
  2391. if (tab == 5) Active(); else Normal();
  2392.  
  2393. if (ImGui::Button("Presets", ImVec2(100, 50))) tab = 5;
  2394. style.Colors[ImGuiCol_Text] = ImColor(255, 255, 255, 255);
  2395.  
  2396. ImGui::PopFont();
  2397.  
  2398. ImGui::EndGroup();
  2399. ImGui::EndGroup();
  2400. style.Colors[ImGuiCol_Border] = ImColor(176, 66, 244, 240);
  2401. style.ItemSpacing = ImVec2(5, 1);
  2402. ImGui::Separator();
  2403. style.Colors[ImGuiCol_Border] = ImVec4(1.f, 1.f, 1.f, 0.f);
  2404. ImGui::PushFont(Text);
  2405. style.ItemSpacing = ImVec2(15, 4);
  2406. style.ButtonTextAlign = ImVec2(0.5f, 0.5f);
  2407. if (tab == -1)
  2408. {
  2409. ImGui::Spacing();
  2410. ImGui::Spacing();
  2411. ImGui::Text("");
  2412.  
  2413.  
  2414.  
  2415.  
  2416.  
  2417. ImGui::Text("Weclome!");
  2418.  
  2419.  
  2420.  
  2421.  
  2422.  
  2423. }
  2424.  
  2425.  
  2426.  
  2427.  
  2428. if (tab == 0)
  2429. {
  2430.  
  2431. ImGui::Spacing();
  2432. ImGui::Spacing();
  2433. ImGui::Text("");
  2434.  
  2435. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2436. ImGui::BeginChildNew("Legitbot", ImVec2(400, 375), true, ImGuiWindowFlags_ChildZeus);
  2437. {
  2438.  
  2439. ImGui::PopStyleColor();
  2440.  
  2441.  
  2442. ImGui::Text("Settings for %s", GetWeaponName3().c_str());
  2443. ImGui::Checkbox("Legitbot enable", &Shonax.Aimbot.legitbot[Shonax.number].enable);
  2444. ImGui::Text("Legit Key");
  2445. KeyBindButton(&Shonax.Aimbot.legitbot[Shonax.number].keyxd);
  2446. ImGui::SliderFloat("Fov", &Shonax.Aimbot.legitbot[Shonax.number].fov, 0.0f, 10.0f);
  2447. ImGui::Checkbox("Psilent", &Shonax.Aimbot.legitbot[Shonax.number].psilent);
  2448. ImGui::Checkbox("Backtrack##leg", &Shonax.Aimbot.legitbot[Shonax.number].LegitBacktrack);
  2449. ImGui::Checkbox("Fast zoom", &Shonax.newfeatures.fastzoom);
  2450. ImGui::Checkbox("Switch after zoom", &Shonax.newfeatures.switchfast);
  2451.  
  2452. }
  2453. ImGui::EndChild();
  2454. ImGui::SameLine();
  2455.  
  2456. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2457.  
  2458.  
  2459. ImGui::BeginChildNew("TriggerBot", ImVec2(460, 375), true, ImGuiWindowFlags_ChildZeus);
  2460. {
  2461.  
  2462.  
  2463. ImGui::PopStyleColor();
  2464.  
  2465.  
  2466.  
  2467. {
  2468. ImGui::Text("Settings for %s", GetWeaponName3().c_str());
  2469. ImGui::Checkbox("Triggerbot Enable", &Shonax.TriggerBot.weapon[Shonax.number].trigetbot_enable);
  2470.  
  2471. ImGui::Text("TriggerKey");
  2472. KeyBindButton(&Shonax.TriggerBot.weapon[Shonax.number].TrigerKey);
  2473. ImGui::Checkbox("Triggerbot Recoil", &Shonax.TriggerBot.weapon[Shonax.number].triggerbot_recoil);
  2474. ImGui::Checkbox("Triggerbot FriendlyFire", &Shonax.TriggerBot.weapon[Shonax.number].triggerbot_deadmatch);
  2475. const char* hitboxtriger[] = { "head", "chest", "stomack", "arms", "legs" };
  2476. ImGui::Text("Hitbox");
  2477. ImGui::BeginChild("##shitadgadg");
  2478. {
  2479. for (int i = 0; i <= 4; i++)
  2480. ImGui::Selectable(hitboxtriger[i], &Shonax.TriggerBot.weapon[Shonax.number].triggerbotbox[i]);
  2481. }
  2482.  
  2483. ImGui::EndChild();
  2484.  
  2485. //Shonax.TriggerBot.weapon[Shonax.number].triggerbot_recoil
  2486.  
  2487. }
  2488.  
  2489.  
  2490. }
  2491. ImGui::EndChild();
  2492. }
  2493.  
  2494. if (tab == 1)
  2495. {
  2496.  
  2497. ImGui::Spacing();
  2498. ImGui::Spacing();
  2499. ImGui::Text("");
  2500.  
  2501.  
  2502. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2503.  
  2504.  
  2505. ImGui::BeginChildNew("Ragebot", ImVec2(290, -1), true, ImGuiWindowFlags_ChildZeus);
  2506. {
  2507.  
  2508.  
  2509. ImGui::PopStyleColor();
  2510.  
  2511.  
  2512. ImGui::Checkbox("Ragebot enabled", &Shonax.Aimbot.enable);
  2513. ImGui::Checkbox("Resolver", &Shonax.Aimbot.Resolver);
  2514. ImGui::Checkbox("Shot backtrack", &Shonax.Aimbot.ShotBacktrack);
  2515. ImGui::Checkbox("Position backtrack", &Shonax.Aimbot.PosBacktrack);
  2516. ImGui::Checkbox("Fix shot pitch", &Shonax.Aimbot.FixShotPitch);
  2517.  
  2518. }
  2519. ImGui::EndChild();
  2520. ImGui::SameLine();
  2521.  
  2522. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2523.  
  2524. ImGui::BeginChildNew("Weapon", ImVec2(270, -1), true, ImGuiWindowFlags_ChildZeus);
  2525. {
  2526.  
  2527.  
  2528. ImGui::PopStyleColor();
  2529.  
  2530.  
  2531. ImGui::Text("Settings for %s", GetWeaponName3().c_str());
  2532. ImGui::SliderInt("Min dmg", &Shonax.Aimbot.Weapon[Shonax.number].Mindmg, 0, 100);
  2533. ImGui::Checkbox("Autostop", &Shonax.Aimbot.Weapon[Shonax.number].Autostop);
  2534. const char* type[] = { "off", "extra", "normal" };
  2535. ImGui::Combo("Hitchance", &Shonax.Aimbot.Weapon[Shonax.number].Hitchance, type, 3);
  2536. if (Shonax.Aimbot.Weapon[Shonax.number].Hitchance != 0)
  2537. ImGui::SliderInt("Hit value", &Shonax.Aimbot.Weapon[Shonax.number].HitchanceValue, 0, 100);
  2538.  
  2539. ImGui::Checkbox("SlowWalk", &Shonax.Aimbot.Weapon[Shonax.number].SlowWalk);
  2540. if (Shonax.Aimbot.Weapon[Shonax.number].SlowWalk)
  2541. ImGui::SliderFloat("Speed", &Shonax.Aimbot.Weapon[Shonax.number].Speed, 0, 150);
  2542. ImGui::Checkbox("Multipoint", &Shonax.Aimbot.Weapon[Shonax.number].MultiPoint);
  2543. if (Shonax.Aimbot.Weapon[Shonax.number].MultiPoint)
  2544. {
  2545. ImGui::SliderInt("Head scale", &Shonax.Aimbot.Weapon[Shonax.number].HeadScale, 0, 100);
  2546. ImGui::SliderInt("Body scale", &Shonax.Aimbot.Weapon[Shonax.number].BodyScale, 0, 100);
  2547. }
  2548. ImGui::Checkbox("Delay shot", &Shonax.Aimbot.Weapon[Shonax.number].DelayShot);
  2549. ImGui::Checkbox("Ignore limbs", &Shonax.Aimbot.Weapon[Shonax.number].IgnoreLimbs);
  2550. ImGui::Checkbox("Baim if lethal", &Shonax.Aimbot.Weapon[Shonax.number].BaimLethal);
  2551. ImGui::Checkbox("Baim bad pitch", &Shonax.Aimbot.Weapon[Shonax.number].BaimPitch);
  2552. ImGui::Checkbox("Baim in air", &Shonax.Aimbot.Weapon[Shonax.number].BaimInAir);
  2553.  
  2554. }
  2555. ImGui::EndChild();
  2556.  
  2557.  
  2558. ImGui::SameLine();
  2559.  
  2560. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2561.  
  2562.  
  2563. ImGui::BeginChildNew("Anti-aimbot", ImVec2(290, -1), true, ImGuiWindowFlags_ChildZeus);
  2564. {
  2565.  
  2566.  
  2567. ImGui::PopStyleColor();
  2568.  
  2569.  
  2570.  
  2571. static int ragebutton = 1;
  2572.  
  2573. static bool againrbal1, againrbal2, againrbal3 = false;
  2574.  
  2575.  
  2576.  
  2577.  
  2578.  
  2579.  
  2580. if (ragebutton == 1) morphBtnActiveTab(); else morphBtnNormalTab();
  2581. if (againrbal1)
  2582. {
  2583. style.Colors[ImGuiCol_Button] = ImColor(176, 66, 244, 255);
  2584. style.Colors[ImGuiCol_Text] = ImColor(176, 66, 244, 255);
  2585.  
  2586. }
  2587. if (ImGui::MyButton("Stand/Slow", true, ImVec2(65.f, 30.f))) ragebutton = 1;
  2588. if (ImGui::IsItemHovered())
  2589. {
  2590. againrbal1 = true;
  2591. }
  2592. else
  2593. againrbal1 = false;
  2594.  
  2595.  
  2596.  
  2597.  
  2598. if (ragebutton == 2) morphBtnActiveTab(); else morphBtnNormalTab();
  2599. ImGui::SameLine();
  2600. if (againrbal2)
  2601. {
  2602. style.Colors[ImGuiCol_Button] = ImColor(176, 66, 244, 255);
  2603. style.Colors[ImGuiCol_Text] = ImColor(176, 66, 244, 255);
  2604.  
  2605. }
  2606. if (ImGui::MyButton("Move/Air" , true, ImVec2(65.f, 30.f))) ragebutton = 2;
  2607. if (ImGui::IsItemHovered())
  2608. {
  2609. againrbal2 = true;
  2610. }
  2611. else
  2612. againrbal2 = false;
  2613.  
  2614.  
  2615.  
  2616. if (ragebutton == 3) morphBtnActiveTab(); else morphBtnNormalTab();
  2617. ImGui::SameLine();
  2618. if (againrbal3)
  2619. {
  2620. style.Colors[ImGuiCol_Button] = ImColor(176, 66, 244, 255);
  2621. style.Colors[ImGuiCol_Text] = ImColor(176, 66, 244, 255);
  2622.  
  2623. }
  2624. if (ImGui::MyButton("Adjust", true, ImVec2(65.f, 30.f))) ragebutton = 3;
  2625. if (ImGui::IsItemHovered())
  2626. {
  2627. againrbal3 = true;
  2628. }
  2629. else
  2630. againrbal3 = false;
  2631.  
  2632. if (ragebutton == 4) morphBtnActiveTab(); else morphBtnNormalTab();
  2633.  
  2634.  
  2635.  
  2636. if (ragebutton == 1) againrbal1 = true;
  2637. if (ragebutton == 2) againrbal2 = true;
  2638. if (ragebutton == 3) againrbal3 = true;
  2639.  
  2640.  
  2641. ImGui::Spacing();
  2642. ImGui::Spacing();
  2643. //ImGui::Checkbox("Enabled", &yakuza::config.AAenabled);
  2644. const char* pitchtype[] = { "zero", "down", "up", "minimal", "fake zero", "fake down", "fake up", "switched" };
  2645. const char* yawtype[] = { "sideways", "backwards", "rotate", "jitter", "local view", "lowerbody", "auto direction", "180z", "soon" };
  2646.  
  2647. if (ragebutton == 1)
  2648. {
  2649. ImGui::Checkbox("Enabled", &Shonax.Antiaim.enable);
  2650. if (Shonax.Antiaim.enable)
  2651. {
  2652. ImGui::Text("Stand");
  2653. ImGui::Combo("Pitch##stand", &Shonax.Antiaim.pitch[0], pitchtype, ARRAYSIZE(pitchtype));
  2654. ImGui::Combo("Yaw##stand", &Shonax.Antiaim.yaw[0], yawtype, ARRAYSIZE(yawtype));
  2655. ImGui::SliderFloat("Offset##yaw1", &Shonax.Antiaim.yawoffset[0], -180, 180);
  2656. ImGui::Text("Slow");
  2657. ImGui::Combo("Pitch##slow", &Shonax.newfeatures.slowpitch, pitchtype, ARRAYSIZE(pitchtype));
  2658. ImGui::Combo("Yaw##slow", &Shonax.newfeatures.slowyaw, yawtype, ARRAYSIZE(yawtype));
  2659. ImGui::SliderFloat("Offset##slow", &Shonax.newfeatures.yawoffset, -180, 180);
  2660. }
  2661.  
  2662. }
  2663. if (ragebutton == 2)
  2664. {
  2665. if (Shonax.Antiaim.enable)
  2666. {
  2667. ImGui::Text("Move");
  2668. ImGui::Combo("Pitch##move", &Shonax.Antiaim.pitch[1], pitchtype, ARRAYSIZE(pitchtype));
  2669. ImGui::Combo("Yaw##move", &Shonax.Antiaim.yaw[1], yawtype, ARRAYSIZE(yawtype));
  2670. ImGui::SliderFloat("Offset##yaw2", &Shonax.Antiaim.yawoffset[1], -180, 180);
  2671. ImGui::Text("Air");
  2672. ImGui::Combo("Pitch##air", &Shonax.Antiaim.pitch[2], pitchtype, ARRAYSIZE(pitchtype));
  2673. ImGui::Combo("Yaw##air", &Shonax.Antiaim.yaw[2], yawtype, ARRAYSIZE(yawtype));
  2674. ImGui::SliderFloat("Offset##yaw3", &Shonax.Antiaim.yawoffset[2], -180, 180);
  2675. }
  2676. }
  2677. if (ragebutton == 3)
  2678. {
  2679. if (Shonax.Antiaim.enable)
  2680. {
  2681. ImGui::Checkbox("Desync angle", &Shonax.Antiaim.DesyncAngle);
  2682. ImGui::Checkbox("Random jitter", &Shonax.Antiaim.RandJitterInRange);
  2683. ImGui::SliderInt("jitter range", &Shonax.Antiaim.JitterRange, 0, 360);
  2684. ImGui::SliderInt("Fakelag", &Shonax.Antiaim.Fakelag, 0, 14);
  2685. ImGui::Checkbox("Flag on peek", &Shonax.Antiaim.FakelagOnPeek);
  2686. if (Shonax.Antiaim.FakelagOnPeek)
  2687. ImGui::Checkbox("Choke shot", &Shonax.Antiaim.ChokeShotOnPeek);
  2688. }
  2689.  
  2690.  
  2691. }
  2692.  
  2693.  
  2694. }
  2695. ImGui::EndChild();
  2696. }
  2697.  
  2698. if (tab == 2)
  2699. {
  2700. ImGui::Spacing();
  2701. ImGui::Spacing();
  2702.  
  2703.  
  2704. ImGui::Text("");
  2705.  
  2706. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2707.  
  2708.  
  2709. ImGui::BeginChildNew("Player ESP", ImVec2(285, -1), true, ImGuiWindowFlags_ChildZeus);
  2710. {
  2711.  
  2712.  
  2713. ImGui::PopStyleColor();
  2714.  
  2715.  
  2716. static bool vis = false;
  2717. const char* xdez[] = { "old", "new" };
  2718. //ImGui::Checkbox("New Visuals", &vis);
  2719. ImGui::Checkbox("Enable", &Shonax.Visuals.Esp);
  2720. Shonax.Visuals.Font = 1;
  2721. ImGui::Checkbox("Box", &Shonax.Visuals.Box);
  2722. ImGui::Checkbox("Health bar", &Shonax.Visuals.HealthBar);
  2723.  
  2724. const char* type_name[] = { "Disable", "Enable" };
  2725. ImGui::Combo("Name", &Shonax.Visuals.Name, type_name, 2);
  2726. const char* type_health[] = { "Disable", "Enable" };
  2727. ImGui::Combo("Health", &Shonax.Visuals.HealthVal, type_health, 2);
  2728. const char* typeweapon[] = { "Disable", "Bot", "Right" };
  2729. ImGui::Combo("Weapon", &Shonax.Visuals.Weapon, typeweapon, 3);
  2730.  
  2731.  
  2732. const char* skeletontype[] = { "Enable Skeleton" };
  2733. //ImGui::Text("Skeleton");
  2734. ImGui::BeginChild("##asdgsadg");
  2735. {
  2736. for (int i = 0; i <= 0; i++)
  2737. ImGui::Selectable(skeletontype[i], &Shonax.Visuals.Skeleton[i]);
  2738. }
  2739. //ImGui::Checkbox("Line", &Shonax.Visuals.snapline_esp);
  2740. //ImGui::Checkbox("DLight", &Shonax.Visuals.dlight);
  2741.  
  2742. //ImGui::Checkbox("Capsule", &Shonax.Visuals.drawcapsule);
  2743. //ImGui::Checkbox("Damage esp", &Shonax.Visuals.damageesp);
  2744. //ImGui::Checkbox("Damage group esp", &Shonax.Visuals.damagegroup);
  2745. //ImGui::Checkbox("Sound esp", &Shonax.Visuals.SoundEsp);
  2746. //if (Shonax.Visuals.SoundEsp)
  2747. //ImGui::Checkbox("Local Sound esp", &Shonax.Visuals.LocalSoundEsp);
  2748.  
  2749. ImGui::Checkbox("Offscrean Esp", &Shonax.Visuals.povarrows);
  2750.  
  2751.  
  2752.  
  2753. //Shonax.Visuals.dlight
  2754.  
  2755. ImGui::EndChild();
  2756. }
  2757. ImGui::EndChild();
  2758. ImGui::SameLine();
  2759.  
  2760. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2761.  
  2762.  
  2763. ImGui::BeginChildNew("Models", ImVec2(285, -1), true, ImGuiWindowFlags_ChildZeus);
  2764. {
  2765.  
  2766.  
  2767. ImGui::PopStyleColor();
  2768.  
  2769.  
  2770. ImGui::Checkbox("Enemy chams##shit", &Shonax.Visuals.Chams);
  2771. const char* type_mat2[] = { "flat", "metallic", "gold", "crystal", "gloss", "crystal blue", "glass", "pulse", "glow", "predglass", "dgoutline" };
  2772. const char* local_mat2[] = { "flat", "metallic", "gold", "crystal", "gloss", "crystal blue", "glass", "pulse", "glow", "predglass", "dgoutline" };
  2773. const char* local_mat[] = { "Flat", "Metallic", "Glass typ", "Glass cry", "Pulse"};
  2774. const char* type_mat[] = { "Flat", "Metallic", "Glass typ", "Glass cry", "Pulse" };
  2775. const char* type_mat_anoth[] = { "gold", "crystal", "gloss", "crystal blue", "glass", "pulse", "glow","predglass", "dgoutline" };
  2776. ImGui::Combo("Enemy chams type", &Shonax.Visuals.ChamsType, type_mat, ARRAYSIZE(type_mat));
  2777. ImGui::Checkbox("Enemy glow", &Shonax.Visuals.glow);
  2778. if (Shonax.Visuals.glow)
  2779. Shonax.Visuals.glowtype = 0;
  2780. //const char* type_name[] = { "Regular", "light", "oppac" };
  2781. //ImGui::Combo("Enemy glow type", &Shonax.Visuals.glowtype, type_name, 3);
  2782.  
  2783. ImGui::Checkbox("Local chams##local", &Shonax.Visuals.LocalChams);
  2784. ImGui::Checkbox("Desync angle", &Shonax.Visuals.BacktrackLocalChams);
  2785. //ImGui::Checkbox("Fakelag Chams##local", &Shonax.Visuals.BacktrackLocalChams);
  2786. ImGui::Combo("Chams type local##local", &Shonax.Visuals.LocalChamsType, local_mat, ARRAYSIZE(local_mat));
  2787. ImGui::Checkbox("Weapon chams##local", &Shonax.Visuals.weaponchams);
  2788. ImGui::Combo("Weapon type##local", &Shonax.Visuals.weaponchamstype, type_mat_anoth, ARRAYSIZE(type_mat_anoth));
  2789. ImGui::Checkbox("Glow local##local", &Shonax.Visuals.localglow);
  2790. if (Shonax.Visuals.localglow)
  2791. Shonax.Visuals.glowlocaltype = 0;
  2792. //ImGui::Combo("Glow type##local", &Shonax.Visuals.glowlocaltype, type_name, 3);
  2793.  
  2794. }
  2795. ImGui::EndChild();
  2796.  
  2797.  
  2798. ImGui::SameLine();
  2799.  
  2800. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2801.  
  2802.  
  2803. ImGui::BeginChildNew("Others", ImVec2(285, -1), true, ImGuiWindowFlags_ChildZeus);
  2804. {
  2805.  
  2806.  
  2807.  
  2808. ImGui::PopStyleColor();
  2809.  
  2810. const char* key_binds[] = { "none", "mouse1", "mouse2", "mouse3", "mouse4", "mouse5", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", "f8", "f9", "f10", "f11", "f12" };
  2811.  
  2812.  
  2813. ImGui::Text("Thirdperson");
  2814. KeyBindButton(&Shonax.Visuals.tp_key);
  2815.  
  2816. //ImGui::Checkbox("Hitbox points", &Shonax.Visuals.HitboxPoints);
  2817. ImGui::Checkbox("No zoom", &Shonax.Visuals.NoZoom);
  2818. ImGui::Checkbox("No scope", &Shonax.Visuals.NoScope);
  2819. ImGui::Checkbox("No recoil", &Shonax.Visuals.NoRecoil);
  2820. ImGui::Checkbox("No flash", &Shonax.Visuals.noflash);
  2821. ImGui::Checkbox("No smoke", &Shonax.Visuals.nosmoke);
  2822. ImGui::Checkbox("Bullet trcer", &Shonax.Visuals.bullet_tracer);
  2823. ImGui::Checkbox(("Show spread"), &Shonax.Visuals.show_spread);
  2824. const char* spreadtype[] = { "standart", "rainbow" };
  2825. ImGui::Combo(("Spread type"), &Shonax.Visuals.show_spread_type, spreadtype, ARRAYSIZE(spreadtype));
  2826. ImGui::Checkbox("Killfeed", &Shonax.Visuals.killfeed);
  2827. ImGui::Checkbox("Grenade prediction", &Shonax.Visuals.grenadepred);
  2828. //ImGui::Checkbox("Grenade throwed", &Shonax.Visuals.grenadethrowed);
  2829. ImGui::Checkbox("Galaxy sky", &Shonax.Visuals.galaxysky);
  2830. ImGui::Checkbox("Enable postprocessing", &Shonax.Visuals.matpostprocessenable);
  2831. //ImGui::Checkbox("Clear HUD", &Shonax.Visuals.clearhud);
  2832. ImGui::Checkbox("Zeus range", &Shonax.newfeatures.drawzeus);
  2833. //Shonax.newfeatures.drawzeus
  2834. const char* hittype[] = { "Static", "Dynamic+" };
  2835. ImGui::Text("Hitmarker");
  2836. ImGui::BeginChild("##hitmarker");
  2837. {
  2838. for (int i = 0; i <= 1; i++)
  2839. ImGui::Selectable(hittype[i], &Shonax.Visuals.hitmarker[i]);
  2840. }
  2841. ImGui::EndChild();
  2842.  
  2843.  
  2844.  
  2845. }
  2846. ImGui::EndChild();
  2847. }
  2848.  
  2849.  
  2850. if (tab == 3)
  2851. {
  2852. ImGui::Spacing();
  2853. ImGui::Spacing();
  2854.  
  2855. ImGui::Text("");
  2856.  
  2857. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2858.  
  2859.  
  2860. ImGui::BeginChildNew("Misc", ImVec2(500, 475), true, ImGuiWindowFlags_ChildZeus);
  2861. {
  2862.  
  2863.  
  2864. ImGui::PopStyleColor();
  2865.  
  2866.  
  2867. ImGui::Checkbox("Bhop", &Shonax.Misc.Bhop);
  2868. ImGui::Checkbox("Autostrafe", &Shonax.Misc.AutoStrafe);
  2869. ImGui::Checkbox("Unlimited duck", &Shonax.Misc.unlimit_duck);
  2870. ImGui::Checkbox("Fake duck", &Shonax.Misc.fake_crouch);
  2871. ImGui::Text("Fake duck key"); KeyBindButton(&Shonax.newfeatures.fakeduckkey);
  2872. ImGui::Checkbox("Ragdolls", &Shonax.Misc.exaggeratedragdolls);
  2873. ImGui::Checkbox("Trashtalk", &Shonax.Misc.trashtalk);
  2874. ImGui::Checkbox("Buybot enable", &Shonax.BuyBot.enable);
  2875. if (Shonax.BuyBot.enable)
  2876. {
  2877.  
  2878. const char* main[] = { "Auto", "Awp", "Scout" };
  2879. const char* second[] = { "Deagle&Revolver", "Dual" };
  2880. const char* other[] = { "VestHelm" };
  2881. const char* grenade[] = { "None", "All" };
  2882.  
  2883. ImGui::Combo("Main", &Shonax.BuyBot.main, main, ARRAYSIZE(main));
  2884. ImGui::Combo("Second", &Shonax.BuyBot.second, second, ARRAYSIZE(second));
  2885. ImGui::Combo("Helmet", &Shonax.BuyBot.ammo, other, ARRAYSIZE(other));
  2886. ImGui::Combo("Grenade", &Shonax.BuyBot.grenade, grenade, ARRAYSIZE(grenade));
  2887. }
  2888. ImGui::Checkbox("Clantag enable", &Shonax.Clantag.enable);
  2889. if (Shonax.Clantag.enable)
  2890. {
  2891.  
  2892. auto applyxd = [](const char * name) -> void {
  2893. using Fn = int(__fastcall *)(const char *, const char *);
  2894. static auto fn = reinterpret_cast<Fn>(Utils::FindSignature("engine.dll", "53 56 57 8B DA 8B F9 FF 15"));
  2895. fn(name, name);
  2896. };
  2897.  
  2898.  
  2899. static char buffer[16];
  2900. ImGui::InputText("custom", buffer, IM_ARRAYSIZE(buffer));
  2901. if (ImGui::Button("Set custom")) {
  2902. applyxd(buffer);
  2903.  
  2904. }
  2905.  
  2906. }
  2907. /*ImGui::Checkbox("Modelchanger enable", &Shonax.Modelchanger.enable);
  2908. if (Shonax.Modelchanger.enable)
  2909. {
  2910.  
  2911. ImGui::Combo(("ct model"), &Shonax.Modelchanger.ctmodel, playermodels, ARRAYSIZE(playermodels));
  2912. ImGui::Combo(("t model"), &Shonax.Modelchanger.tmodel, playermodels, ARRAYSIZE(playermodels));
  2913. ImGui::Combo(("knife model"), &Shonax.Modelchanger.knifemodel, knifecustommodels, ARRAYSIZE(knifecustommodels));
  2914.  
  2915. if (ImGui::Button("Force Update"))
  2916. KnifeApplyCallbk();
  2917. }*/
  2918. ImGui::Checkbox("Hitsounds", &Shonax.Misc.hitsound);
  2919. const char* hits[] = { "Gamesense","Bubble" };
  2920. if (Shonax.Misc.hitsound)
  2921. ImGui::Combo(("Hit"), &Shonax.Misc.hit, hits, ARRAYSIZE(hits));
  2922. ImGui::Checkbox("KnifeBot", &Shonax.Misc.knifebot);
  2923. ImGui::Checkbox("AutoAccept", &Shonax.newfeatures.special);
  2924.  
  2925. }
  2926. ImGui::EndChild();
  2927. ImGui::SameLine();
  2928.  
  2929. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2930.  
  2931.  
  2932. ImGui::BeginChildNew("Other", ImVec2(360, 475), true, ImGuiWindowFlags_ChildZeus);
  2933. {
  2934.  
  2935.  
  2936. ImGui::PopStyleColor();
  2937.  
  2938.  
  2939. ImGui::SliderInt("Fov", &Shonax.Visuals.Fov, 0, 150);
  2940. ImGui::SliderInt("Fov weapon", &Shonax.Visuals.viewmodel, 0, 150);
  2941. ImGui::SliderInt("Fov x", &Shonax.Visuals.viewmodel_x, 0, 10);
  2942. ImGui::SliderInt("Fov y", &Shonax.Visuals.viewmodel_y, 0, 10);
  2943. ImGui::SliderInt("Fov z", &Shonax.Visuals.viewmodel_z, 0, 20);
  2944.  
  2945.  
  2946.  
  2947. ImGui::Checkbox("Spectators", &Shonax.Misc.spectators);
  2948.  
  2949.  
  2950. ImGui::Text("EventLog");
  2951. const char* eventlogxd[] = { "Hits", "Buys" };
  2952. ImGui::BeginChild("##ergdg");
  2953. {
  2954. for (int i = 0; i <= 1; i++)
  2955. ImGui::Selectable(eventlogxd[i], &Shonax.Misc.eventlog[i]);
  2956. //ImGui::Selectable("killstreaklog", &Shonax.Visuals.eventkilling);
  2957. }
  2958.  
  2959. ImGui::EndChild();
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968.  
  2969.  
  2970. }
  2971. ImGui::EndChild();
  2972.  
  2973. }
  2974.  
  2975.  
  2976.  
  2977. if (tab == 4)
  2978. {
  2979.  
  2980. ImGui::Spacing();
  2981. ImGui::Spacing();
  2982. ImGui::Text("");
  2983.  
  2984. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  2985.  
  2986.  
  2987. ImGui::BeginChildNew("Rankchanger", ImVec2(400, 375), true, ImGuiWindowFlags_ChildZeus);
  2988. {
  2989.  
  2990.  
  2991. ImGui::PopStyleColor();
  2992.  
  2993.  
  2994.  
  2995.  
  2996. ImGui::Checkbox("Rackchanger", &Shonax.RankChanger.enabled);
  2997. const char* xdxdranks[] = {
  2998. "off",
  2999. "silver 1",
  3000. "silver 2",
  3001. "silver 3",
  3002. "silver 4",
  3003. "silver elite",
  3004. "silver elite master",
  3005. "gold nova 1",
  3006. "gold nova 2",
  3007. "gold nova 3",
  3008. "gold nova master",
  3009. "master guardian 1",
  3010. "master guardian 2",
  3011. "master guardian elite",
  3012. "distinguished master guardian",
  3013. "legendary eagle",
  3014. "legendary eagle master",
  3015. "supreme master first class",
  3016. "the global elite"
  3017. };
  3018. ImGui::Combo(("Rank"), &Shonax.RankChanger.rank_id, xdxdranks, ARRAYSIZE(xdxdranks));
  3019. ImGui::PushItemWidth(150.0f);
  3020. ImGui::SliderInt("Level", &Shonax.RankChanger.player_level, 0, 40);
  3021. ImGui::InputInt("Xp##level", &Shonax.RankChanger.player_level_xp);
  3022. ImGui::PushItemWidth(150.0f);
  3023. ImGui::InputInt("Wins", &Shonax.RankChanger.wins);
  3024. ImGui::PushItemWidth(150.0f);
  3025. ImGui::InputInt("Friend", &Shonax.RankChanger.cmd_friendly);
  3026. ImGui::PushItemWidth(150.0f);
  3027. ImGui::InputInt("Teach", &Shonax.RankChanger.cmd_teaching);
  3028. ImGui::PushItemWidth(150.0f);
  3029. ImGui::InputInt("Leader", &Shonax.RankChanger.cmd_leader);
  3030. static const char* bans[] =
  3031. {
  3032. "none",
  3033. "you were kicked from the last match (competitive cooldown)",
  3034. "you killed too many teammates (competitive cooldown)",
  3035. "you killed a teammate at round start (competitive cooldown)",
  3036. "you failed to reconnect to the last match (competitive cooldown)",
  3037. "you abandoned the last match (competitive cooldown)",
  3038. "you did too much damage to your teammates (competitive cooldown)",
  3039. "you did too much damage to your teammates at round start (competitive cooldown)",
  3040. "this account is permanently untrusted (global cooldown)",
  3041. "you were kicked from too many recent matches (competitive cooldown)",
  3042. "convicted by overwatch - majorly disruptive (global cooldown)",
  3043. "convicted by overwatch - minorly disruptive (global cooldown)",
  3044. "resolving matchmaking state for your account (temporary cooldown)",
  3045. "resolving matchmaking state after the last match (temporary cooldown)",
  3046. "this account is permanently untrusted (global cooldown)",
  3047. "(global cooldown)",
  3048. "you failed to connect by match start. (competitive cooldown)",
  3049. "you have kicked too many teammates in recent matches (competitive cooldown)",
  3050. "congratulations on your recent competitive wins! before you play competitive matches further please wait for matchmaking servers to calibrate your skill group placement based on your lastest performance. (temporary cooldown)",
  3051. "a server using your game server login token has been banned. your account is now permanently banned from operating game servers, and you have a cooldown from connecting to game servers. (global cooldown)"
  3052. };
  3053. ImGui::Combo("Ban", &Shonax.RankChanger.ban, bans, IM_ARRAYSIZE(bans));
  3054. ImGui::InputInt("Time##ban", &Shonax.RankChanger.time);
  3055. if (ImGui::Button(("Update##egfa")))
  3056. {
  3057. write.SendClientHello();
  3058. write.SendMatchmakingClient2GCHello();
  3059.  
  3060. }
  3061.  
  3062.  
  3063.  
  3064. }
  3065. ImGui::EndChild();
  3066. ImGui::SameLine();
  3067.  
  3068. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  3069.  
  3070.  
  3071. ImGui::BeginChildNew("Skinchanger", ImVec2(460, 375), true, ImGuiWindowFlags_ChildZeus);
  3072. {
  3073.  
  3074. ImGui::PopStyleColor();
  3075.  
  3076.  
  3077. if (ImGui::Button("Force Update", ImVec2(-1, 20)))
  3078. KnifeApplyCallbk();
  3079.  
  3080.  
  3081. if (ImGui::Checkbox("Skinchanger", &Shonax.Skinchanger.skinenabled)) KnifeApplyCallbk();
  3082. if (ImGui::Checkbox("Stickerchanger", &Shonax.Skinchanger.stickers)) KnifeApplyCallbk();
  3083. ImGui::Checkbox("Custom skinchanger", &Shonax.Skinchanger.customchams);
  3084. if (ImGui::IsItemHovered())
  3085. ImGui::SetTooltip(("Bind the \"del\" key to remove current bind."));
  3086. if (!Shonax.Skinchanger.customchams && Shonax.Skinchanger.skinenabled)
  3087. {
  3088. if (ImGui::Combo("Model##knife", &Shonax.Skinchanger.Knife, knifemodels, ARRAYSIZE(knifemodels))) KnifeApplyCallbk();
  3089. if (ImGui::Combo("Skins##knife", &Shonax.Skinchanger.KnifeSkin, knifeskin, ARRAYSIZE(knifeskin))) KnifeApplyCallbk();
  3090.  
  3091. ImGui::Combo("Awp", &Shonax.Skinchanger.AWPSkin, awp, ARRAYSIZE(awp));
  3092. ImGui::Combo("Scout", &Shonax.Skinchanger.SSG08Skin, scout, ARRAYSIZE(scout));
  3093. ImGui::Combo("Scar", &Shonax.Skinchanger.SCAR20Skin, scars, ARRAYSIZE(scars));
  3094. ImGui::Combo("Glock", &Shonax.Skinchanger.GlockSkin, glock, ARRAYSIZE(glock));
  3095. ImGui::Combo("G3sg1", &Shonax.Skinchanger.G3sg1Skin, g3sg1, ARRAYSIZE(g3sg1));
  3096. ImGui::Combo("Duals", &Shonax.Skinchanger.DualSkin, duals, ARRAYSIZE(duals));
  3097. ImGui::Combo("Deagle", &Shonax.Skinchanger.DeagleSkin, deagle, ARRAYSIZE(deagle));
  3098. ImGui::Combo("Usp-s", &Shonax.Skinchanger.USPSkin, usp, ARRAYSIZE(usp));
  3099. ImGui::Combo("Ak-47", &Shonax.Skinchanger.AK47Skin, ak, ARRAYSIZE(ak));
  3100. ImGui::Combo("P2000", &Shonax.Skinchanger.P2000Skin, p2000, ARRAYSIZE(p2000));
  3101. ImGui::Combo("Revolver", &Shonax.Skinchanger.RevolverSkin, revolver, ARRAYSIZE(revolver));
  3102. if (Shonax.Skinchanger.stickers)
  3103. {
  3104. ImGui::Combo("Sticker 1", &Shonax.Skinchanger.allin1skins[Shonax.number].Stikers1, ids, ARRAYSIZE(ids));
  3105. ImGui::Combo("Sticker 2", &Shonax.Skinchanger.allin1skins[Shonax.number].Stikers2, ids, ARRAYSIZE(ids));
  3106. ImGui::Combo("Sticker 3", &Shonax.Skinchanger.allin1skins[Shonax.number].Stikers3, ids, ARRAYSIZE(ids));
  3107. ImGui::Combo("Sticker 4", &Shonax.Skinchanger.allin1skins[Shonax.number].Stikers4, ids, ARRAYSIZE(ids));
  3108. }
  3109.  
  3110. }
  3111. else
  3112. {
  3113. const char* awpcustom[] = { "none", "tokyo ghoul", "miku", "frost", "jinx", "snaked", "colorich", "blackrockshooter", "stars", "thunder" };
  3114. ImGui::Combo(("Awp##custom"), &Shonax.Skinchanger.awpcustom, awpcustom, ARRAYSIZE(awpcustom));
  3115. const char* ak47custom[] = { "none", "gladiator", "vanish", "sport", "green" };
  3116. ImGui::Combo(("ak47##custom"), &Shonax.Skinchanger.ak47custom, ak47custom, ARRAYSIZE(ak47custom));
  3117. const char* m4a1scustom[] = { "none", "EnergyEagle", "Blue Force", "Freeze" };
  3118. ImGui::Combo(("m4a1##custom"), &Shonax.Skinchanger.m4a1scustom, m4a1scustom, ARRAYSIZE(m4a1scustom));
  3119. const char* scarcustom[] = { "none", "blue" };
  3120. ImGui::Combo(("scar##custom"), &Shonax.Skinchanger.scarcustom, scarcustom, ARRAYSIZE(scarcustom));
  3121. const char* ssgcustom[] = { "none", "tatoo" };
  3122. ImGui::Combo(("ssg##custom"), &Shonax.Skinchanger.ssgcustom, ssgcustom, ARRAYSIZE(ssgcustom));
  3123. const char* customknife[] = { "none", "m9 grafit", "color bayonet", "flip galaxy", "karambit purpel", "m9 evolve", "karambit spectrum", "karambit hyper", "karambit beast", "karambit aquamarine", "m9 crystal", "M9 Space", "Falchion Pearl", "Butterfly Disarray", "Falchion Fade", "tactical fade" };
  3124. if (ImGui::Combo(("knifes##custom"), &Shonax.Skinchanger.knifecustom, customknife, ARRAYSIZE(customknife))) KnifeApplyCallbk();
  3125.  
  3126.  
  3127. ImGui::Text("Custom knife skins on your current weapon");
  3128. ImGui::Combo(("-> %s", GetWeaponName3().c_str()), &Shonax.newfeatures.allcustomskins[Shonax.number], customknife, ARRAYSIZE(customknife));
  3129.  
  3130. }
  3131.  
  3132.  
  3133.  
  3134.  
  3135.  
  3136. }
  3137. ImGui::EndChild();
  3138.  
  3139.  
  3140.  
  3141.  
  3142. }
  3143.  
  3144. if (tab == 5)
  3145. {
  3146. ImGui::Spacing();
  3147. ImGui::Spacing();
  3148. ImGui::Text("");
  3149.  
  3150.  
  3151.  
  3152. ImGui::PushStyleColor(ImGuiCol_Text, ImColor(176, 66, 244, 255));
  3153.  
  3154.  
  3155. ImGui::BeginChildNew("", ImVec2(-1, 0), true, ImGuiWindowFlags_ChildZeus);
  3156. {
  3157.  
  3158.  
  3159. ImGui::PopStyleColor();
  3160.  
  3161.  
  3162. ImGui::InputText(("CFG name"), ConfigNamexd, 64);
  3163. static int sel;
  3164. std::string config;
  3165. std::vector<std::string> configs = Shonax.Config.GetConfigs();
  3166. if (configs.size() > 0) {
  3167. ImGui::ComboBoxArrayxd(("Configs"), &sel, configs);
  3168. ImGui::Spacing();
  3169. ImGui::Separator();
  3170. ImGui::Spacing();
  3171. ImGui::PushItemWidth(220.f);
  3172. config = configs[Shonax.Config.counts];
  3173. }
  3174. Shonax.Config.counts = sel;
  3175.  
  3176. if (configs.size() > 0) {
  3177. if (ImGui::Button(("Load"), ImVec2(50, 20)))
  3178. {
  3179.  
  3180. Shonax.Config.Load(config);
  3181.  
  3182. }
  3183. }
  3184. ImGui::SameLine();
  3185.  
  3186. if (configs.size() >= 1) {
  3187. if (ImGui::Button(("Save"), ImVec2(50, 20)))
  3188. {
  3189. Shonax.Config.Save(config);
  3190.  
  3191. }
  3192. }
  3193. ImGui::SameLine();
  3194. if (ImGui::Button(("Create"), ImVec2(50, 20)))
  3195. {
  3196. std::string ConfigFileName = ConfigNamexd;
  3197. if (ConfigFileName.size() < 1)
  3198. {
  3199. ConfigFileName = ("settings");
  3200. }
  3201. Shonax.Config.CreateConfig(ConfigFileName);
  3202.  
  3203. }
  3204. ImGui::SameLine();
  3205. if (config.size() >= 1) {
  3206. if (ImGui::Button(("Delete"), ImVec2(50, 20)))
  3207. {
  3208. Shonax.Config.Remove(config);
  3209.  
  3210. }
  3211. }
  3212. }
  3213.  
  3214.  
  3215.  
  3216.  
  3217. ImGui::EndChild();
  3218. ImGui::Columns(1);
  3219. }
  3220.  
  3221. ImGui::PopFont();
  3222. }
  3223. ImGui::EndChild();
  3224. }
  3225. ImGui::End();
  3226. }
  3227.  
  3228. void __stdcall Hooks::Hooked_EndScene(IDirect3DDevice9* pDevice)
  3229. {
  3230. //static auto ofunc = g_Hooks.pD3d9Hook->GetOriginal<EndSceneFn>(vtable_indexes::d3d9menu);
  3231. ImGuiStyle& style = ImGui::GetStyle();
  3232. if (!d3d_init)
  3233. GUI_Init(pDevice);
  3234.  
  3235.  
  3236. ImGui::GetIO().MouseDrawCursor = menu_open;
  3237. //if (g_pEngine->IsConnected())
  3238. // ImGui::FinalFix(pDevice);
  3239.  
  3240. ImGui_ImplDX9_NewFrame();
  3241.  
  3242.  
  3243. POINT mp;
  3244. GetCursorPos(&mp);
  3245. ImGuiIO& io = ImGui::GetIO();
  3246. io.MousePos.x = mp.x;
  3247. io.MousePos.y = mp.y;
  3248.  
  3249. if (g_pEngine->IsConnected())
  3250. ImGui::StageFix(pDevice);
  3251.  
  3252. if (menu_open)
  3253. {
  3254. DrawMenu();
  3255. DrawColors();
  3256. }
  3257.  
  3258.  
  3259. SpectatorList();
  3260.  
  3261.  
  3262. ImGui::Render();
  3263.  
  3264. //if (g_pEngine->IsConnected())
  3265. // ImGui::ClearFix(pDevice);
  3266.  
  3267.  
  3268. return oEndSceneFn->GetTrampoline()(pDevice);
  3269. }
  3270.  
  3271. void __stdcall Hooks::Hooked_EndScene_Reset(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS* pPresentationParameters)
  3272. {
  3273. //static auto ofunc = g_Hooks.pD3d9Hook->GetOriginal<EndSceneResetFn>(vtable_indexes::d3d9reset);
  3274.  
  3275. if (!d3d_init)
  3276. return oEndSceneResetFn->GetTrampoline()(pDevice, pPresentationParameters);
  3277.  
  3278. ImGui_ImplDX9_InvalidateDeviceObjects();
  3279. ImGui::DestroyFix();
  3280. ImGui_ImplDX9_CreateDeviceObjects();
  3281.  
  3282. return oEndSceneResetFn->GetTrampoline()(pDevice, pPresentationParameters);
  3283. }
  3284.  
  3285. void __stdcall Hooks::Hooked_features(IDirect3DDevice9* m_device, const RECT* source_rect, const RECT* dest_rect, HWND dest_window_override, const RGNDATA* dirty_region)
  3286. {
  3287.  
  3288. //static auto ofunc = g_Hooks.pD3d9Hook->GetOriginal<D3D9FEATURES>(vtable_indexes::d3d9features);
  3289.  
  3290.  
  3291.  
  3292.  
  3293. static const D3DRENDERSTATETYPE backupStates[] = { D3DRS_COLORWRITEENABLE, D3DRS_ALPHABLENDENABLE, D3DRS_SRCBLEND, D3DRS_DESTBLEND, D3DRS_BLENDOP, D3DRS_FOGENABLE };
  3294. static const int size = sizeof(backupStates) / sizeof(DWORD);
  3295.  
  3296. DWORD oldStates[size] = { 0 };
  3297.  
  3298. for (int i = 0; i < size; i++)
  3299. m_device->GetRenderState(backupStates[i], &oldStates[i]);
  3300.  
  3301. m_device->SetRenderState(D3DRS_COLORWRITEENABLE, 0xFFFFFFFF);
  3302.  
  3303. if (g_pEngine->IsConnected() && g_pEngine->IsInGame())
  3304. otheresp::get().spread_crosshair(m_device);
  3305.  
  3306.  
  3307.  
  3308. if (g_pEngine->IsConnected() && g_pEngine->IsInGame())
  3309. DamageESP::Draw();
  3310.  
  3311. if (Shonax.Visuals.povarrows)
  3312. OffscreenESP(Color(Shonax.Visuals.povarrowcolor[0]*255, Shonax.Visuals.povarrowcolor[1] * 255, Shonax.Visuals.povarrowcolor[2] * 255, Shonax.Visuals.povarrowcolor[3] * 255), m_device);
  3313.  
  3314.  
  3315.  
  3316.  
  3317. if (g_pEngine->IsConnected() && g_pEngine->IsInGame() && Shonax.NewVisuals.enable && !Shonax.Visuals.Esp)
  3318. {
  3319.  
  3320. }
  3321.  
  3322.  
  3323. for (int i = 0; i < size; i++)
  3324. m_device->SetRenderState(backupStates[i], oldStates[i]);
  3325.  
  3326.  
  3327.  
  3328.  
  3329.  
  3330. oD3D9FEATURES->GetTrampoline()(m_device, source_rect, dest_rect, dest_window_override, dirty_region);
  3331. }
  3332.  
  3333. void __fastcall Hooks::SetMouseCodeState_h(void* thisptr, void* EDX, ButtonCode_t code, MouseCodeState_t state)
  3334. {
  3335. //static auto o_SetMouseCodeState = g_Hooks.keyset->GetOriginal<SetMouseCodeState_t>(vtable_indexes::mousecode);
  3336. if (input_shouldListen && state == BUTTON_PRESSED)
  3337. {
  3338. input_shouldListen = false;
  3339. if (input_receivedKeyval)
  3340. *input_receivedKeyval = code;
  3341. }
  3342.  
  3343. return oSetMouseCodeState_t->GetTrampoline()(thisptr, code, state);
  3344. }
  3345.  
  3346. void __fastcall Hooks::SetKeyCodeState_h(void* thisptr, void* EDX, ButtonCode_t code, bool bDown)
  3347. {
  3348. //static auto o_SetKeyCodeState = g_Hooks.keyset->GetOriginal<SetKeyCodeState_t>(vtable_indexes::keycode);
  3349. if (input_shouldListen && bDown)
  3350. {
  3351. input_shouldListen = false;
  3352. if (input_receivedKeyval)
  3353. *input_receivedKeyval = code;
  3354. }
  3355.  
  3356. return oSetKeyCodeState_t->GetTrampoline()(thisptr, code, bDown);
  3357. }
  3358.  
  3359.  
  3360. const char* GetHitgroupName(int hitgroup)
  3361. {
  3362. switch (hitgroup)
  3363. {
  3364. case 1:
  3365. return "Head";
  3366. case 2:
  3367. return "Chest";
  3368. case 3:
  3369. return "Pelvis";
  3370. case 4:
  3371. return "Left Arm";
  3372. case 5:
  3373. return "Right Arm";
  3374. case 6:
  3375. return "Left Leg";
  3376. case 7:
  3377. return "Right Leg";
  3378. default:
  3379. return "";
  3380. }
  3381. }
  3382.  
  3383. float dot_product(const Vector & a, const Vector & b) {
  3384. return (a.x * b.x
  3385. + a.y * b.y
  3386. + a.z * b.z);
  3387. }
  3388. static void CapsuleOverlay(C_BaseEntity* pPlayer, Color col, float duration)
  3389. {
  3390. if (!pPlayer)
  3391. return;
  3392.  
  3393. studiohdr_t* pStudioModel = g_pModelInfo->GetStudiomodel((model_t*)pPlayer->GetModel());
  3394. if (!pStudioModel)
  3395. return;
  3396.  
  3397. static matrix3x4_t pBoneToWorldOut[128];
  3398. if (!pPlayer->SetupBones(pBoneToWorldOut, 128, 256, 0))
  3399. return;
  3400.  
  3401. mstudiohitboxset_t* pHitboxSet = pStudioModel->GetHitboxSet(0);
  3402. if (!pHitboxSet)
  3403. return;
  3404.  
  3405. auto VectorTransform2 = [](const Vector in1, matrix3x4_t in2, Vector& out)
  3406. {
  3407.  
  3408. out[0] = dot_product(in1, Vector(in2[0][0], in2[0][1], in2[0][2])) + in2[0][3];
  3409. out[1] = dot_product(in1, Vector(in2[1][0], in2[1][1], in2[1][2])) + in2[1][3];
  3410. out[2] = dot_product(in1, Vector(in2[2][0], in2[2][1], in2[2][2])) + in2[2][3];
  3411. };
  3412.  
  3413. for (int i = 0; i < pHitboxSet->numhitboxes; i++)
  3414. {
  3415. mstudiobbox_t* pHitbox = pHitboxSet->GetHitbox(i);
  3416. if (!pHitbox)
  3417. continue;
  3418.  
  3419. Vector vMin, vMax;
  3420. VectorTransform2(pHitbox->min, pBoneToWorldOut[pHitbox->bone], vMin); //nullptr???
  3421. VectorTransform2(pHitbox->max, pBoneToWorldOut[pHitbox->bone], vMax);
  3422.  
  3423. if (pHitbox->radius > -1)
  3424. {
  3425. g_pIVDebugOverlay->AddCapsuleOverlay(vMin, vMax, pHitbox->radius, col.red, col.green, col.blue, col.alpha, duration);
  3426. }
  3427. }
  3428. }
  3429.  
  3430.  
  3431. void C_HookedEvents::FireGameEvent(IGameEvent* event)
  3432. {
  3433. auto event_name = event->GetName();
  3434.  
  3435. //auto attacker = event->GetInt("attacker");
  3436. //auto user = event->GetInt("userid");
  3437. static bool newkillstreak;
  3438. if (strcmp(event_name, "round_prestart"))
  3439. {
  3440. g::newround = true;
  3441. newkillstreak = true;
  3442. }
  3443.  
  3444.  
  3445.  
  3446.  
  3447. if (buybotfix)
  3448. {
  3449. if (Shonax.BuyBot.enable)
  3450. {
  3451. //ammo
  3452. if (Shonax.BuyBot.ammo == 0)
  3453. g_pEngine->ExecuteClientCmd("buy vesthelm");
  3454. //main
  3455. if (Shonax.BuyBot.main == 0)
  3456. g_pEngine->ExecuteClientCmd("buy g3sg1; buy scar20");
  3457. if (Shonax.BuyBot.main == 1)
  3458. g_pEngine->ExecuteClientCmd("buy awp");
  3459. if (Shonax.BuyBot.main == 2)
  3460. g_pEngine->ExecuteClientCmd("buy ssg08");
  3461. //second
  3462. if (Shonax.BuyBot.second == 0)
  3463. g_pEngine->ExecuteClientCmd("buy deagle; buy revolver");
  3464. if (Shonax.BuyBot.second == 1)
  3465. g_pEngine->ExecuteClientCmd("buy elite");
  3466. //grenade
  3467. if (Shonax.BuyBot.grenade == 0)
  3468. g_pEngine->ExecuteClientCmd("");
  3469. if (Shonax.BuyBot.grenade == 1)
  3470. g_pEngine->ExecuteClientCmd("buy hegrenade; buy molotov; buy smokegrenade; buy incgrenade;");
  3471.  
  3472. }
  3473. buybotfix = false;
  3474. }
  3475.  
  3476.  
  3477. if (Shonax.Visuals.hitmarker[0] || Shonax.Visuals.hitmarker[1])
  3478. otheresp::get().hitmarker_event(event);
  3479.  
  3480.  
  3481. const char* fuckthattrash;
  3482.  
  3483. if (strstr(event->GetName(), "player_hurt"))
  3484. {
  3485.  
  3486. if (!event)
  3487. return;
  3488.  
  3489. if (!g::pLocalEntity)
  3490. return;
  3491.  
  3492. auto* attacker = (C_BaseEntity*)g_pEntityList->GetClientEntity(g_pEngine->GetPlayerForUserID(event->GetInt("attacker")));
  3493. if (!attacker)
  3494. return;
  3495.  
  3496. if (attacker != g::pLocalEntity)
  3497. return;
  3498.  
  3499. PlayerInfo_s player_info;
  3500. g_pEngine->GetPlayerInfo(g_pEngine->GetPlayerForUserID(event->GetInt("userid")), &player_info);
  3501. //dont edit or gay, please :(
  3502. FEATURES::MISC::InGameLogger::Log log;
  3503.  
  3504.  
  3505. log.color_line.PushBack(("LegendWare"), Color(138, 6, 219, 255));
  3506. log.color_line.PushBack(("-> "), Color(176, 66, 244, 255));
  3507. log.color_line.PushBack("hit ", Color(230, 230, 230, 255));
  3508. log.color_line.PushBack(player_info.szName, Color(176, 66, 244, 255));
  3509.  
  3510.  
  3511. int hitgroup = event->GetInt("hitgroup");
  3512. if (hitgroup > 0 && hitgroup <= 7)
  3513. {
  3514. log.color_line.PushBack(" in the ", Color(230, 230, 230, 255));
  3515. log.color_line.PushBack(GetHitgroupName(hitgroup), Color(230, 230, 230, 255));
  3516. gitgrp = hitgroup;
  3517. fuckthattrash = GetHitgroupName(hitgroup);
  3518. }
  3519.  
  3520. log.color_line.PushBack(" for ", Color(230, 230, 230, 255));
  3521. log.color_line.PushBack(std::to_string(event->GetInt("dmg_health")), Color(176, 66, 244, 255));
  3522. log.color_line.PushBack(" damage", Color(230, 230, 230, 255));
  3523.  
  3524.  
  3525.  
  3526. if (Shonax.Visuals.drawcapsule)
  3527. {
  3528. C_BaseEntity* hittedplayer = (C_BaseEntity*)g_pEntityList->GetClientEntity(g_pEngine->GetPlayerForUserID(event->GetInt("userid")));
  3529.  
  3530. if (hittedplayer && hittedplayer->EntIndex() > 0 && hittedplayer->EntIndex() < 64)
  3531. {
  3532. if (g::pLocalEntity && hittedplayer != g::pLocalEntity)
  3533. CapsuleOverlay(hittedplayer, Color(Shonax.Visuals.capsule_col[0]*255, Shonax.Visuals.capsule_col[1] * 255, Shonax.Visuals.capsule_col[2] * 255), 1.0f);
  3534. }
  3535. }
  3536.  
  3537.  
  3538. if (Shonax.Visuals.SoundEsp)
  3539. {
  3540. auto victim = g_pEntityList->GetClientEntity(g_pEngine->GetPlayerForUserID(event->GetInt("userid")));
  3541. if (attacker == g::pLocalEntity && !Shonax.Visuals.LocalSoundEspColor)
  3542. sound_logs.push_back(sound_info(victim->GetAbsOrigin(), g_pGlobalVars->curtime, event->GetInt("userid")));
  3543. else if (attacker == g::pLocalEntity && Shonax.Visuals.LocalSoundEspColor)
  3544. sound_logs_local.push_back(sound_info(victim->GetAbsOrigin(), g_pGlobalVars->curtime, event->GetInt("userid")));
  3545. }
  3546.  
  3547.  
  3548.  
  3549.  
  3550.  
  3551. if (Shonax.Misc.hitsound)
  3552. {
  3553. switch (Shonax.Misc.hit)
  3554. {
  3555. case 0:
  3556. g_pSurface->PlaySound_("buttons\\arena_switch_press_02.wav");
  3557. break;
  3558. case 1:
  3559. PlaySoundA(bubble, nullptr, SND_MEMORY | SND_ASYNC);
  3560. break;
  3561. default:
  3562. break;
  3563. }
  3564. }
  3565.  
  3566. if (Shonax.Misc.eventlog[0])
  3567. FEATURES::MISC::in_game_logger.AddLog(log);
  3568. }
  3569.  
  3570.  
  3571.  
  3572.  
  3573. if (strstr(event->GetName(), "item_purchase") && Shonax.Misc.eventlog[1])
  3574. {
  3575. if (!event)
  3576. return;
  3577.  
  3578.  
  3579. if (!g::pLocalEntity)
  3580. return;
  3581.  
  3582. auto* entity = (C_BaseEntity*)g_pEntityList->GetClientEntity(g_pEngine->GetPlayerForUserID(event->GetInt("userid")));
  3583. if (!entity)
  3584. return;
  3585.  
  3586. if (entity->GetTeam() == g::pLocalEntity->GetTeam())
  3587. return;
  3588.  
  3589. PlayerInfo_s player_info;
  3590. if (!g_pEngine->GetPlayerInfo(entity->EntIndex(), &player_info))
  3591. return;
  3592.  
  3593. FEATURES::MISC::InGameLogger::Log log;
  3594.  
  3595. log.color_line.PushBack(("LegendWare"), Color(138, 6, 219, 255));
  3596. log.color_line.PushBack(("-> "), Color(176, 66, 244, 255));
  3597. log.color_line.PushBack(player_info.szName, Color(230, 230, 230, 255));
  3598. log.color_line.PushBack(" bought a ", Color(48, 5, 219, 255));
  3599. log.color_line.PushBack(event->GetString("weapon"), Color(176, 66, 244, 255));
  3600.  
  3601. FEATURES::MISC::in_game_logger.AddLog(log);
  3602.  
  3603.  
  3604. }
  3605.  
  3606. if (strstr(event->GetName(), "bomb_beginplant") && Shonax.Misc.eventlog[2]) {
  3607.  
  3608. auto userid = event->GetInt("userid");
  3609.  
  3610. if (!userid) {
  3611. return;
  3612. }
  3613.  
  3614. auto userid_id = g_pEngine->GetPlayerForUserID(userid);
  3615.  
  3616. PlayerInfo_s userid_info;
  3617. if (!g_pEngine->GetPlayerInfo(userid_id, &userid_info)) {
  3618. return;
  3619. }
  3620.  
  3621. auto m_player = static_cast< C_BaseEntity * >(g_pEntityList->GetClientEntity(userid_id));
  3622.  
  3623. if (!m_player) {
  3624. return;
  3625. }
  3626.  
  3627.  
  3628.  
  3629. FEATURES::MISC::InGameLogger::Log log;
  3630.  
  3631. log.color_line.PushBack(("LegendWare"), Color(138, 6, 219, 255));
  3632. log.color_line.PushBack(("-> "), Color(176, 66, 244, 255));
  3633. log.color_line.PushBack(userid_info.szName, Color(230, 230, 230, 255));
  3634. log.color_line.PushBack(" has began planting the bomb at ", Color(230, 230, 230, 255));
  3635. log.color_line.PushBack(std::to_string(event->GetInt("site")), Color(176, 66, 244, 255));
  3636. FEATURES::MISC::in_game_logger.AddLog(log);
  3637. //Color(209, 10, 70, 255)
  3638. }
  3639.  
  3640. if (strstr(event->GetName(), "bomb_begindefuse") && Shonax.Misc.eventlog[3]) {
  3641. auto userid = event->GetInt("userid");
  3642.  
  3643. if (!userid) {
  3644. return;
  3645. }
  3646.  
  3647. auto userid_id = g_pEngine->GetPlayerForUserID(userid);
  3648.  
  3649. PlayerInfo_s userid_info;
  3650. if (!g_pEngine->GetPlayerInfo(userid_id, &userid_info)) {
  3651. return;
  3652. }
  3653.  
  3654. auto m_player = static_cast< C_BaseEntity * >(g_pEntityList->GetClientEntity(userid_id));
  3655.  
  3656. if (!m_player) {
  3657. return;
  3658. }
  3659.  
  3660. constexpr char * hasdefusekit[2] = { "without defuse kit.","with defuse kit." };
  3661. FEATURES::MISC::InGameLogger::Log log;
  3662.  
  3663.  
  3664.  
  3665. log.color_line.PushBack(("LegendWare"), Color(138, 6, 219, 255));
  3666. log.color_line.PushBack(("-> "), Color(176, 66, 244, 255));
  3667. log.color_line.PushBack(" has began defusing the bomb ", Color(230, 230, 230, 255));
  3668. log.color_line.PushBack(hasdefusekit[event->GetBool("haskit")], Color(176, 66, 244, 255));
  3669. FEATURES::MISC::in_game_logger.AddLog(log);
  3670. }
  3671.  
  3672.  
  3673.  
  3674.  
  3675. if (strstr(event->GetName(), "player_footstep") || strstr(event->GetName(), "player_jump"))
  3676. {
  3677. if (!Shonax.Visuals.SoundEsp)
  3678. return;
  3679.  
  3680. if (!g::pLocalEntity)
  3681. return;
  3682.  
  3683. auto walker = g_pEntityList->GetClientEntity(g_pEngine->GetPlayerForUserID(event->GetInt("userid")));
  3684. if (!walker)
  3685. return;
  3686.  
  3687. if (walker->IsDormant())
  3688. return;
  3689. if (walker)
  3690. {
  3691. if (walker->GetTeam() != g::pLocalEntity->GetTeam())
  3692. sound_logs.push_back(sound_info(walker->GetAbsOrigin(), g_pGlobalVars->curtime, event->GetInt("userid")));
  3693.  
  3694. if (walker == g::pLocalEntity && Shonax.Visuals.LocalSoundEsp)
  3695. sound_logs_local.push_back(sound_info(g::pLocalEntity->GetAbsOrigin(), g_pGlobalVars->curtime, event->GetInt("userid")));
  3696. }
  3697.  
  3698.  
  3699.  
  3700. }
  3701.  
  3702.  
  3703. things(event);
  3704.  
  3705. if (strstr(event->GetName(), "player_death"))
  3706. {
  3707. if (!event)
  3708. return;
  3709.  
  3710. if (!g::pLocalEntity)
  3711. return;
  3712.  
  3713. auto* attacker = (C_BaseEntity*)g_pEntityList->GetClientEntity(g_pEngine->GetPlayerForUserID(event->GetInt("attacker")));
  3714. if (!attacker)
  3715. return;
  3716.  
  3717. if (attacker != g::pLocalEntity)
  3718. return;
  3719.  
  3720. kill = kill + 1;
  3721. killstreak = killstreak + 1;
  3722.  
  3723.  
  3724. if (Shonax.newfeatures.announcments)
  3725. {
  3726. if (Shonax.newfeatures.soundcoolest[0])
  3727. if (Shonax.newfeatures.announcments_female)
  3728. {
  3729. if ((g_pGlobalVars->curtime - lastkilltime) < 5.0f)
  3730. {
  3731. switch (killstreak)
  3732. {
  3733. case 1:
  3734. mciSendString("play C://sound//female//firstblood.wav", NULL, 0, 0); break;
  3735. case 2:
  3736. // mciSendString("play C://sound//female//Double_Kill.wav", NULL, 0, 0); break; female dont have double kill announsments;
  3737. case 3:
  3738. // mciSendString("play C://sound//female//quake_tripplekill.wav", NULL, 0, 0); break; female dont have tripple kill announsments;
  3739. case 4:
  3740. mciSendString("play C://sound//female//multikill.wav", NULL, 0, 0); break;
  3741. case 5:
  3742. // mciSendString("play C://sound//female//MegaKill.wav", NULL, 0, 0); break; female dont have megakill announsments;
  3743. case 6:
  3744. mciSendString("play C://sound//female//ultrakill.wav", NULL, 0, 0); break;
  3745. case 7:
  3746. mciSendString("play C://sound//female//monsterkill.wav", NULL, 0, 0); break;
  3747. case 8:
  3748. mciSendString("play C://sound//female//wickedsick.wav", NULL, 0, 0); break;
  3749. default:
  3750. mciSendString("play C://sound//female//holyshit.wav", NULL, 0, 0);
  3751. break;
  3752. }
  3753. }
  3754. }
  3755. else
  3756. {
  3757. if ((g_pGlobalVars->curtime - lastkilltime) < 5.0f)
  3758. {
  3759. switch (killstreak)
  3760. {
  3761. case 1:
  3762. mciSendString("play C://sound//UT99//firstblood.wav", NULL, 0, 0); break;
  3763. case 2:
  3764. mciSendString("play C://sound//UT2k4//Double_Kill.wav", NULL, 0, 0); break;
  3765. case 3:
  3766. mciSendString("play C://sound//Quake3//quake_tripplekill.wav", NULL, 0, 0); break;
  3767. case 4:
  3768. mciSendString("play C://sound//UT99//multikill.wav", NULL, 0, 0); break;
  3769. case 5:
  3770. mciSendString("play C://sound//UT2k4//MegaKill.wav", NULL, 0, 0); break;
  3771. case 6:
  3772. mciSendString("play C://sound//UT99//ultrakill.wav", NULL, 0, 0); break;
  3773. case 7:
  3774. mciSendString("play C://sound//UT99//monsterkill.wav", NULL, 0, 0); break;
  3775. case 8:
  3776. mciSendString("play C://sound//UT2k4//LudicrousKill.wav", NULL, 0, 0); break;
  3777. default:
  3778. mciSendString("play C://sound//UT2k4//HolyShit.wav", NULL, 0, 0);
  3779. break;
  3780. }
  3781. }
  3782. }
  3783.  
  3784. if (Shonax.newfeatures.soundcoolest[1])
  3785. if (g::pLocalEntity)
  3786. if (g::pLocalEntity->GetActiveWeapon()->IsKnife())
  3787. if (Shonax.newfeatures.announcments_female)
  3788. mciSendString("play C://sound//female//humiliation.wav", NULL, 0, 0);
  3789. else
  3790. mciSendString("play C://sound//Quake3//quake_humiliation.wav", NULL, 0, 0);
  3791.  
  3792.  
  3793. if (Shonax.newfeatures.soundcoolest[2])
  3794. if (g::pLocalEntity)
  3795. {
  3796. bool headshot = event->GetBool("headshot");
  3797. if (headshot) if (Shonax.newfeatures.announcments_female) mciSendString("play C://sound//female//headshot.wav", NULL, 0, 0); else mciSendString("play C://sound//UT99//headshot.wav", NULL, 0, 0);
  3798. }
  3799.  
  3800.  
  3801.  
  3802.  
  3803. if (Shonax.newfeatures.soundcoolest[3])
  3804. {
  3805. if (killstreak > 0)
  3806. {
  3807. if (Shonax.newfeatures.announcments_female)
  3808. {
  3809. switch (killstreak)
  3810. {
  3811. case 5:
  3812. mciSendString("play C://sound//female//killingspree.wav", NULL, 0, 0); break;
  3813. case 10:
  3814. mciSendString("play C://sound//female//rampage.wav", NULL, 0, 0);
  3815. break;
  3816. case 15:
  3817. mciSendString("play C://sound//female//dominating.wav", NULL, 0, 0);
  3818. break;
  3819. case 20:
  3820. mciSendString("play C://sound//female//unstoppable.wav", NULL, 0, 0);
  3821. break;
  3822. default:
  3823. if (killstreak % 5 == 0)
  3824. mciSendString("play C://sound//female//godlike.wav", NULL, 0, 0);
  3825. }
  3826. }
  3827. else
  3828. {
  3829. switch (killstreak)
  3830. {
  3831. case 5:
  3832. mciSendString("play C://sound//UT99//killingspree.wav", NULL, 0, 0); break;
  3833. case 10:
  3834. mciSendString("play C://sound//UT99//rampage.wav", NULL, 0, 0);
  3835. break;
  3836. case 15:
  3837. mciSendString("play C://sound//UT2k4//Dominating.wav", NULL, 0, 0);
  3838. break;
  3839. case 20:
  3840. mciSendString("play C://sound//UT99//unstoppable.wav", NULL, 0, 0);
  3841. break;
  3842. default:
  3843. if (killstreak % 5 == 0)
  3844. mciSendString("play C://sound//UT99//godlike.wav", NULL, 0, 0);
  3845. }
  3846. }
  3847.  
  3848. }
  3849. }
  3850.  
  3851. }
  3852.  
  3853.  
  3854.  
  3855.  
  3856.  
  3857. if (Shonax.Misc.UI)
  3858. GUI.Feed.AddDeath(DeathInfo(event->GetInt("attacker"), event->GetInt("userid"), (char*)event->GetString("weapon"), event->GetInt("headshot")));
  3859.  
  3860.  
  3861. if (Shonax.Visuals.eventkilling)
  3862. {
  3863. /*FEATURES::MISC::InGameLogger::Log log;
  3864.  
  3865. log.color_line.PushBack(("[shonax] "), Color(0, 83, 138, 255));
  3866.  
  3867. if (killstreak == 1)
  3868. log.color_line.PushBack(" FIRSTKILL ", Color(255, 83, 138, 255));
  3869. if (killstreak == 2)
  3870. log.color_line.PushBack(" DOUBLEKILL ", Color(255, 83, 138, 255));
  3871. if (killstreak == 3)
  3872. log.color_line.PushBack(" THRIPLEKILL ", Color(255, 83, 138, 255));
  3873. if (killstreak == 4)
  3874. log.color_line.PushBack(" MULTIKILL ", Color(255, 83, 138, 255));
  3875. if (killstreak == 5)
  3876. log.color_line.PushBack(" RAMPAGE ", Color(255, 83, 138, 255));
  3877. if (killstreak > 5)
  3878. log.color_line.PushBack(" HOLYSHEET ", Color(255, 83, 138, 255));
  3879.  
  3880. FEATURES::MISC::in_game_logger.AddLog(log);*/
  3881. }
  3882.  
  3883.  
  3884. lastkilltime = g_pGlobalVars->curtime;
  3885.  
  3886.  
  3887. PlayerInfo_s player_info;
  3888. g_pEngine->GetPlayerInfo(g_pEngine->GetPlayerForUserID(event->GetInt("userid")), &player_info);
  3889. //change what you want xd
  3890. std::string zalupa1 = "say tap nn dog -> ";
  3891. std::string zalupa2 = player_info.szName;
  3892. std::string zalupa3 = zalupa1 + zalupa2;
  3893. //its not my ofc
  3894. if (Shonax.Misc.trashtalk)
  3895. g_pEngine->ExecuteClientCmd(zalupa3.c_str());
  3896.  
  3897.  
  3898.  
  3899. }
  3900.  
  3901.  
  3902.  
  3903.  
  3904.  
  3905.  
  3906. if (Shonax.Visuals.bullet_tracer)
  3907. bullettracers::get().events(event);
  3908. }
  3909.  
  3910. int C_HookedEvents::GetEventDebugID(void)
  3911. {
  3912. return EVENT_DEBUG_ID_INIT;
  3913. }
  3914.  
  3915. void C_HookedEvents::RegisterSelf()
  3916. {
  3917. g_pEventManager->AddListener(this, "player_footstep", false);
  3918. g_pEventManager->AddListener(this, "player_jump", false);
  3919. g_pEventManager->AddListener(this, "player_falldamage", false);
  3920. g_pEventManager->AddListener(this, "player_hurt", false);
  3921. g_pEventManager->AddListener(this, "item_purchase", false);
  3922. g_pEventManager->AddListener(this, "bomb_beginplant", false);
  3923. g_pEventManager->AddListener(this, "bomb_begindefuse", false);
  3924. g_pEventManager->AddListener(this, "bullet_impact", false);
  3925. g_pEventManager->AddListener(this, "round_prestart", false);
  3926. g_pEventManager->AddListener(this, "round_freeze_end", false);
  3927. g_pEventManager->AddListener(this, "player_death", false);
  3928. g_pEventManager->AddListener(this, "player_say", false);
  3929.  
  3930. }
  3931.  
  3932. void C_HookedEvents::RemoveSelf()
  3933. {
  3934. g_pEventManager->RemoveListener(this);
  3935. }
  3936.  
  3937.  
  3938.  
  3939.  
  3940. void __fastcall Hooks::Hooked_findmdl(void* ecx, void* edx, char* FilePath)
  3941. {
  3942. //static auto original_fn = g_Hooks.pModels->GetOriginal<FindMDL_t>(vtable_indexes::model_cache);
  3943.  
  3944. //for video xd
  3945. return oFindMDL_t->GetTrampoline()(ecx, FilePath);
  3946. }
  3947.  
  3948.  
  3949.  
  3950. void __fastcall Hooks::Hooked_Postscreeneffects(void * thisptr, void * edx, CViewSetup * setup) {
  3951.  
  3952.  
  3953.  
  3954.  
  3955. static auto run_glow = []() -> void
  3956. {
  3957. if (!(g_pEngine->IsInGame() && g_pEngine->IsConnected()) || !g::pLocalEntity) {
  3958. return;
  3959. }
  3960.  
  3961. for (int i = 0; i < g_pGlow->m_GlowObjectDefinitions.Count(); i++)
  3962. {
  3963. if (g_pGlow->m_GlowObjectDefinitions[i].IsUnused() || !g_pGlow->m_GlowObjectDefinitions[i].GetEnt()) {
  3964. continue;
  3965. }
  3966.  
  3967. auto * object = &g_pGlow->m_GlowObjectDefinitions[i];
  3968. auto entity = reinterpret_cast<C_BaseEntity*>(object->GetEnt());
  3969.  
  3970. if (!entity || entity->IsDormant()) {
  3971. continue;
  3972. }
  3973.  
  3974. if (entity == g::pLocalEntity && Shonax.Visuals.localglow && g_Misc.in_tp/*наху нам глоу на себя когда мы не в 3 лице блят*/)
  3975. {
  3976. if (entity->GetClientClass()->ClassID == (int)EClassIds::CCSPlayer)
  3977. {
  3978. object->Set(Shonax.Visuals.glowlocal[0], Shonax.Visuals.glowlocal[1], Shonax.Visuals.glowlocal[2],
  3979. Shonax.Visuals.glowlocal[3],
  3980. Shonax.Visuals.glowlocal[3],
  3981. Shonax.Visuals.glowlocaltype);
  3982. }
  3983. }
  3984. else
  3985. {
  3986. if (Shonax.Visuals.glow)
  3987. {
  3988. float color[4];
  3989.  
  3990. if (!entity
  3991. || !entity->IsAlive()
  3992. || entity->IsDormant()
  3993. || entity->GetTeam() == g::pLocalEntity->GetTeam())
  3994. continue;
  3995.  
  3996.  
  3997. for (int i = 0; i <= 3; i++)
  3998. color[i] = Shonax.Visuals.glowcolor[i];
  3999.  
  4000.  
  4001. if (entity->GetClientClass()->ClassID == (int)EClassIds::CCSPlayer)
  4002. {
  4003. object->Set(color[0], color[1], color[2],
  4004. color[3],
  4005. color[3],
  4006. Shonax.Visuals.glowtype);
  4007. }
  4008. }
  4009.  
  4010.  
  4011. if (Shonax.Visuals.weaponglow)
  4012. {
  4013. if (entity->GetClientClass()->ClassID == (int)EClassIds::CDEagle)
  4014. {
  4015. object->Set(Shonax.Visuals.weaponglowcolor[0], Shonax.Visuals.weaponglowcolor[1], Shonax.Visuals.weaponglowcolor[2],
  4016. Shonax.Visuals.weaponglowcolor[3],
  4017. Shonax.Visuals.weaponglowcolor[3],
  4018. Shonax.Visuals.weaponglowtype);
  4019. }
  4020. }
  4021.  
  4022. }
  4023. }
  4024. };
  4025.  
  4026.  
  4027.  
  4028.  
  4029.  
  4030.  
  4031. //static auto original_fn = g_Hooks.pClientModeHook->GetOriginal<DoPostScreenEffects_t>(vtable_indexes::dopostscreeneffects);
  4032.  
  4033. if (Shonax.Visuals.glow || Shonax.Visuals.localglow || Shonax.Visuals.weaponglow)
  4034. run_glow();
  4035.  
  4036.  
  4037.  
  4038.  
  4039.  
  4040.  
  4041. return oDoPostScreenEffects_t->GetTrampoline()(thisptr, setup);
  4042. }
  4043.  
  4044. static auto CAM_THINK = Utils::FindSignature("client_panorama.dll", "85 C0 75 30 38 86");
  4045. bool __fastcall Hooks::HookedGetBool(void* pConVar, void* edx)
  4046. {
  4047. //static auto original_get_bool = g_Hooks.pSv_cheats->GetOriginal<SvCheatsGetBoolFn>(vtable_indexes::sv_cheats);
  4048.  
  4049.  
  4050. if ((uintptr_t)_ReturnAddress() == CAM_THINK)
  4051. return true;
  4052.  
  4053. return oSvCheatsGetBoolFn->GetTrampoline()(pConVar);
  4054. }
  4055.  
  4056.  
  4057.  
  4058.  
  4059.  
  4060.  
  4061. #include "Features/bulletbeams/BeamInfo.hpp"
  4062. #include "SDK/IVRenderBeam.h"
  4063. void soundesp::draw_circle(Color color, Vector position)
  4064. {
  4065. BeamInfo_t beamInfo;
  4066. beamInfo.m_nType = TE_BEAMRINGPOINT;
  4067. beamInfo.m_pszModelName = "sprites/purplelaser1.vmt";
  4068. beamInfo.m_nModelIndex = g_pModelInfo->GetModelIndex("sprites/purplelaser1.vmt");
  4069. beamInfo.m_pszHaloName = "sprites/purplelaser1.vmt";
  4070. beamInfo.m_nHaloIndex = g_pModelInfo->GetModelIndex("sprites/purplelaser1.vmt");
  4071. beamInfo.m_flHaloScale = 5;
  4072. beamInfo.m_flLife = 2.50f;
  4073. beamInfo.m_flWidth = 12.f;
  4074. beamInfo.m_flFadeLength = 1.0f;
  4075. beamInfo.m_flAmplitude = 0.f;
  4076. beamInfo.m_flRed = color.red;
  4077. beamInfo.m_flGreen = color.green;
  4078. beamInfo.m_flBlue = color.blue;
  4079. beamInfo.m_flBrightness = 255;
  4080. beamInfo.m_flSpeed = 1.f;
  4081. beamInfo.m_nStartFrame = 0;
  4082. beamInfo.m_flFrameRate = 1;
  4083. beamInfo.m_nSegments = 1;
  4084. beamInfo.m_bRenderable = true;
  4085. beamInfo.m_nFlags = 0;
  4086. beamInfo.m_vecCenter = position + Vector(0, 0, 5);
  4087. beamInfo.m_flStartRadius = 1;
  4088. beamInfo.m_flEndRadius = 350;
  4089.  
  4090. auto beam = g_pIViewRenderBeams->CreateBeamRingPoint(beamInfo);
  4091.  
  4092. if (beam) g_pIViewRenderBeams->DrawBeam(beam);
  4093. }
  4094.  
  4095. void soundesp::draw()
  4096. {
  4097. if (!Shonax.Visuals.SoundEsp)
  4098. return;
  4099.  
  4100. if (!g_pEngine->IsInGame() || !g_pEngine->IsConnected())
  4101. return;
  4102.  
  4103.  
  4104. for (unsigned int i = 0; i < sound_logs.size(); i++)
  4105. {
  4106. g_soundesp.draw_circle(Color(Shonax.Visuals.SoundEspColor[0] * 255, Shonax.Visuals.SoundEspColor[1] * 255, Shonax.Visuals.SoundEspColor[2] * 255, Shonax.Visuals.SoundEspColor[3] * 255), sound_logs[i].position);
  4107. if (Shonax.Visuals.LocalSoundEsp)
  4108. g_soundesp.draw_circle(Color(Shonax.Visuals.SoundEspColor[0] * 255, Shonax.Visuals.SoundEspColor[1] * 255, Shonax.Visuals.SoundEspColor[2] * 255, Shonax.Visuals.SoundEspColor[3] * 255), sound_logs[i].position);
  4109. sound_logs.erase(sound_logs.begin() + i);
  4110. }
  4111. if (Shonax.Visuals.LocalSoundEsp)
  4112. {
  4113. for (unsigned int i = 0; i < sound_logs_local.size(); i++)
  4114. {
  4115. g_soundesp.draw_circle(Color(Shonax.Visuals.LocalSoundEspColor[0] * 255, Shonax.Visuals.LocalSoundEspColor[1] * 255, Shonax.Visuals.LocalSoundEspColor[2] * 255, Shonax.Visuals.LocalSoundEspColor[3] * 255), sound_logs_local[i].position);
  4116. if (Shonax.Visuals.LocalSoundEsp)
  4117. g_soundesp.draw_circle(Color(Shonax.Visuals.LocalSoundEspColor[0] * 255, Shonax.Visuals.LocalSoundEspColor[1] * 255, Shonax.Visuals.LocalSoundEspColor[2] * 255, Shonax.Visuals.LocalSoundEspColor[3] * 255), sound_logs_local[i].position);
  4118. sound_logs_local.erase(sound_logs_local.begin() + i);
  4119. }
  4120.  
  4121. }
  4122. }
  4123.  
  4124.  
  4125.  
  4126. float GetTextWitdh(char *text, LPD3DXFONT fnt)
  4127. {
  4128. RECT fontRect = { 0,0,0,0 };
  4129.  
  4130. fnt->DrawText(NULL, text, strlen(text), &fontRect, DT_CALCRECT, D3DCOLOR_XRGB(0, 0, 0));
  4131.  
  4132. return fontRect.right - fontRect.left;
  4133. }
  4134. void DrawStringWithFont(LPD3DXFONT fnt, float x, float y, D3DCOLOR color, char *format, ...)
  4135. {
  4136. char buffer[256];
  4137. RECT fontRect = { (int)x, (int)y, (int)x, (int)y };
  4138.  
  4139. va_list va_argList;
  4140.  
  4141. va_start(va_argList, format);
  4142. wvsprintf(buffer, format, va_argList);
  4143. va_end(va_argList);
  4144.  
  4145. fnt->DrawText(NULL, buffer, strlen(buffer), &fontRect, DT_NOCLIP, color);
  4146. }
  4147. #define D3D_COLOR_BLACK(a) D3DCOLOR_ARGB(a, 0, 0, 0)
  4148.  
  4149. void DamageESP::Draw()
  4150. {
  4151. if (Shonax.Visuals.damageesp || Shonax.Visuals.damagegroup)
  4152. for (int i = 0; i < MAX_FLOATING_TEXTS; i++)
  4153. {
  4154. FloatingText *txt = &floatingTexts[i % MAX_FLOATING_TEXTS];
  4155.  
  4156. if (!txt->valid)
  4157. continue;
  4158.  
  4159. float endTime = txt->startTime + 1.1f;
  4160.  
  4161. if (endTime < g_pGlobalVars->curtime)
  4162. {
  4163. txt->valid = false;
  4164. continue;
  4165. }
  4166.  
  4167. Vector2D screen;
  4168.  
  4169. if (Utils::WorldToScreen(txt->hitPosition, screen))
  4170. {
  4171. float t = 1.0f - (endTime - g_pGlobalVars->curtime) / (endTime - txt->startTime);
  4172.  
  4173. screen.y -= t * (35.0f);
  4174. screen.x -= (float)txt->randomIdx * t * 3.0f;
  4175. if (Shonax.Visuals.damageesp)
  4176. {
  4177. char msg[12];
  4178. sprintf_s(msg, 12, "-%dHP", txt->damage);
  4179.  
  4180. int width = GetTextWitdh(msg, fntVerdana10);
  4181.  
  4182. DrawStringWithFont(fntVerdana10, screen.x - width / 2, screen.y - 11 + 1, D3D_COLOR_BLACK((int)((1.0f - t) * (float)255)), msg);
  4183.  
  4184. DrawStringWithFont(fntVerdana10, screen.x - width / 2, screen.y - 11, D3DCOLOR_ARGB(int(Shonax.Visuals.damageespcolor[3] * 255), int(Shonax.Visuals.damageespcolor[0] * 255), int(Shonax.Visuals.damageespcolor[1] * 255), int(Shonax.Visuals.damageespcolor[2] * 255)), msg);
  4185. }
  4186. if (Shonax.Visuals.damagegroup)
  4187. {
  4188. char msgxd[12];
  4189. sprintf_s(msgxd, 12, GetHitgroupName(gitgrp)); //gitgrp
  4190. int widthxd = GetTextWitdh(msgxd, fntVerdana10);
  4191.  
  4192.  
  4193. DrawStringWithFont(fntVerdana10, screen.x - widthxd / 2, screen.y - 63 + 1, D3D_COLOR_BLACK((int)((1.0f - t) * (float)255)), msgxd);
  4194. DrawStringWithFont(fntVerdana10, screen.x - widthxd / 2, screen.y - 63, D3DCOLOR_ARGB(int(Shonax.Visuals.damagegroupcolor[3] * 255), int(Shonax.Visuals.damagegroupcolor[0] * 255), int(Shonax.Visuals.damagegroupcolor[1] * 255), int(Shonax.Visuals.damagegroupcolor[2] * 255)), msgxd);
  4195. }
  4196. }
  4197. }
  4198. }
  4199.  
  4200.  
  4201. struct Vertex
  4202. {
  4203. float x, y, z, rhw;
  4204. DWORD color;
  4205. };
  4206.  
  4207. #define COL2DWORD(x) (D3DCOLOR_ARGB(x.alpha, x.red, x.green, x.blue))
  4208. void Triangle(SPoint pos1, SPoint pos2, SPoint pos3, Color color, IDirect3DDevice9* pDevice)
  4209. {
  4210. D3DCOLOR dwColor = COL2DWORD(color);
  4211. Vertex vert[4] =
  4212. {
  4213. { float(pos1.x), float(pos1.y), 0.0f, 1.0f, dwColor },
  4214. { float(pos2.x), float(pos2.y), 0.0f, 1.0f, dwColor },
  4215. { float(pos3.x), float(pos3.y), 0.0f, 1.0f, dwColor },
  4216. { float(pos1.x), float(pos1.y), 0.0f, 1.0f, dwColor }
  4217. };
  4218.  
  4219. pDevice->SetTexture(0, nullptr);
  4220. pDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, FALSE);
  4221. pDevice->DrawPrimitiveUP(D3DPT_LINESTRIP, 3, &vert, sizeof(Vertex));
  4222. pDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, FALSE);
  4223. }
  4224.  
  4225.  
  4226. void TriangleFilled(SPoint pos1, SPoint pos2, SPoint pos3, Color color, IDirect3DDevice9* pDevice)
  4227. {
  4228. D3DCOLOR dwColor = COL2DWORD(color);
  4229. Vertex vert[3] =
  4230. {
  4231. { float(pos1.x), float(pos1.y), 0.0f, 1.0f, dwColor },
  4232. { float(pos2.x), float(pos2.y), 0.0f, 1.0f, dwColor },
  4233. { float(pos3.x), float(pos3.y), 0.0f, 1.0f, dwColor }
  4234. };
  4235.  
  4236. pDevice->SetTexture(0, nullptr);
  4237. pDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, FALSE);
  4238. pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 1, &vert, sizeof(Vertex));
  4239. pDevice->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, FALSE);
  4240. }
  4241.  
  4242.  
  4243.  
  4244. void OffscreenESP(Color colour, IDirect3DDevice9* pDevice)
  4245. {
  4246. if (!g_pEngine->IsInGame() || !g_pEngine->IsConnected())
  4247. return;
  4248.  
  4249. int screen_width, screen_height;
  4250. g_pEngine->GetScreenSize(screen_width, screen_height);
  4251. static bool pulse = true;
  4252. static int alpha = 150;
  4253. const auto screen_center_x = screen_width / 2;
  4254. const auto screen_center_y = screen_height / 2;
  4255. const auto radius = 45;
  4256. const auto size = 26;
  4257.  
  4258. if (g::pLocalEntity == nullptr)
  4259. return;
  4260.  
  4261. if (!g::pLocalEntity->IsAlive())
  4262. return;
  4263.  
  4264. if (pulse)
  4265. {
  4266. alpha += 1;
  4267. if (alpha == 255) pulse = false;
  4268. }
  4269. else
  4270. {
  4271. alpha -= 1;
  4272. if (alpha == 150) pulse = true;
  4273. }
  4274.  
  4275. const auto screenTransform = [](Vector &origin, Vector &screen) -> bool
  4276. {
  4277. static std::uintptr_t pViewMatrix;
  4278. if (!pViewMatrix)
  4279. {
  4280. pViewMatrix = static_cast<std::uintptr_t>(Utils::FindSignature("client_panorama.dll", "0F 10 05 ? ? ? ? 8D 85 ? ? ? ? B9"));
  4281. pViewMatrix += 3;
  4282. pViewMatrix = *reinterpret_cast<std::uintptr_t*>(pViewMatrix);
  4283. pViewMatrix += 176;
  4284. }
  4285.  
  4286. const VMatrix& w2sMatrix = *reinterpret_cast<VMatrix*>(pViewMatrix);
  4287. screen.x = w2sMatrix.m[0][0] * origin.x + w2sMatrix.m[0][1] * origin.y + w2sMatrix.m[0][2] * origin.z + w2sMatrix.m[0][3];
  4288. screen.y = w2sMatrix.m[1][0] * origin.x + w2sMatrix.m[1][1] * origin.y + w2sMatrix.m[1][2] * origin.z + w2sMatrix.m[1][3];
  4289. screen.z = 0.0f;
  4290.  
  4291. float w = w2sMatrix.m[3][0] * origin.x + w2sMatrix.m[3][1] * origin.y + w2sMatrix.m[3][2] * origin.z + w2sMatrix.m[3][3];
  4292.  
  4293. if (w < 0.001f)
  4294. {
  4295. screen.x *= 100000;
  4296. screen.y *= 100000;
  4297. return true;
  4298. }
  4299.  
  4300. float invw = 1.f / w;
  4301. screen.x *= invw;
  4302. screen.y *= invw;
  4303.  
  4304. return false;
  4305. };
  4306.  
  4307. for (auto i = 1; i < g_pEntityList->GetHighestEntityIndex(); i++)
  4308. {
  4309. auto* entity = g_pEntityList->GetClientEntity(i);
  4310.  
  4311. if (!entity)
  4312. return;
  4313.  
  4314. if (!entity->GetClientClass()->ClassID == (int)EClassIds::CCSPlayer)
  4315. continue;
  4316.  
  4317. if (entity->IsDormant())
  4318. continue;
  4319.  
  4320. if (!g::pLocalEntity)
  4321. continue;
  4322.  
  4323. if (entity->GetTeam() == g::pLocalEntity->GetTeam())
  4324. continue;
  4325.  
  4326. Vector screen_point;
  4327. screenTransform(entity->GetOrigin(), screen_point);
  4328.  
  4329. if (!screenTransform(entity->GetOrigin(), screen_point))
  4330. continue;
  4331.  
  4332. if (screen_point.x < 0 || screen_point.y < 0 || screen_point.x > screen_width || screen_point.y > screen_height)
  4333. {
  4334. auto angle = Vector();
  4335. g_Math.VectorAngles_2(
  4336. Vector(screen_center_x - screen_point.x, screen_center_y - screen_point.y, 0), angle);
  4337.  
  4338. const auto angle_yaw_rad = g_Math.deg_2_rad(angle.y + 180.f);
  4339.  
  4340. const auto new_point_x = screen_center_x +
  4341. radius * 8 * cosf(angle_yaw_rad);
  4342. const auto new_point_y = screen_center_y +
  4343. radius * 8 * sinf(angle_yaw_rad);
  4344.  
  4345. std::array<Vector2D, 3> points{
  4346. Vector2D(new_point_x - size / 2, new_point_y - size / 2),
  4347. Vector2D(new_point_x + size / 4, new_point_y),
  4348. Vector2D(new_point_x - size / 2, new_point_y + size / 2)
  4349. };
  4350.  
  4351. g_Math.RotateTriangle(points, angle.y + 180.f);
  4352. TriangleFilled(SPoint(points.at(0).x, points.at(0).y), SPoint(points.at(1).x, points.at(1).y), SPoint(points.at(2).x, points.at(2).y), colour(alpha), pDevice);
  4353. Triangle(SPoint(points.at(0).x, points.at(0).y), SPoint(points.at(1).x, points.at(1).y), SPoint(points.at(2).x, points.at(2).y), colour(alpha), pDevice);
  4354. }
  4355. }
  4356. }
  4357.  
  4358.  
  4359.  
  4360.  
  4361.  
  4362.  
  4363. void ESP::DrawTaserRange()
  4364. {
  4365. if (!g_pEngine->IsConnected() || !g_pEngine->IsInGame())
  4366. return;
  4367.  
  4368. //need more subs
  4369. }
  4370.  
  4371.  
  4372. void Hooks::Init()
  4373. {
  4374. // Get window handle
  4375. while (!(g_Hooks.hCSGOWindow = FindWindowA("Valve001", nullptr)))
  4376. {
  4377. using namespace std::literals::chrono_literals;
  4378. std::this_thread::sleep_for(10ms);
  4379. }
  4380.  
  4381. interfaces::Init(); // Get interfaces
  4382. g_pNetvars = std::make_unique<NetvarTree>();// Get netvars after getting interfaces as we use them
  4383.  
  4384. if (g_Hooks.hCSGOWindow) // Hook WNDProc to capture mouse / keyboard input
  4385. g_Hooks.pOriginalWNDProc = reinterpret_cast<WNDPROC>(SetWindowLongPtr(g_Hooks.hCSGOWindow, GWLP_WNDPROC,
  4386. reinterpret_cast<LONG_PTR>(g_Hooks.WndProc)));
  4387. //dont edit here or gay
  4388. DWORD setupbonesfix;
  4389. DWORD shaderapidx9 = **(DWORD**)(Utils::FindSignature("shaderapidx9.dll", "A1 ?? ?? ?? ?? 50 8B 08 FF 51 0C") + 1);
  4390. if (!Shonax.Visuals.ilovethat)
  4391. setupbonesfix = **(DWORD**)(Utils::FindSignature("client_panorama.dll", "55 8B EC 83 E4 F8 83 EC 18 56 57 8B F9 89 7C 24 0C") + 0x4B);
  4392. auto sv_cheats = g_pCvar->FindVar("sv_cheats");
  4393. // trampoline
  4394. auto& shonaxhook = cContext::GetInstance();
  4395. PVOID* panelhook = *reinterpret_cast<PVOID**>(g_pPanel);
  4396. PVOID* lockcursor = *reinterpret_cast<PVOID**>(g_pSurface);
  4397. PVOID* d3d9 = *reinterpret_cast<PVOID**>(shaderapidx9);
  4398. PVOID* inputkeysystem = *reinterpret_cast<PVOID**>(g_ppInputSystem);
  4399. PVOID* svcheats = *reinterpret_cast<PVOID**>(sv_cheats);
  4400. PVOID* clientdll = *reinterpret_cast<PVOID**>(g_pClientDll);
  4401. PVOID* rankchanger = *reinterpret_cast<PVOID**>(g_SteamGameCoordinator);
  4402. PVOID* clientmode = *reinterpret_cast<PVOID**>(g_pClientMode);
  4403. PVOID* modelrender = *reinterpret_cast<PVOID**>(g_pModelRender);
  4404. PVOID* eventmanager = *reinterpret_cast<PVOID**>(g_pEventManager);
  4405. PVOID* modelchanger = *reinterpret_cast<PVOID**>(g_pModelCache);
  4406. //hooking shonax
  4407. shonaxhook.ApplyDetour<Hooks::PaintTraverse_t>(static_cast<Hooks::PaintTraverse_t>(panelhook[vtable_indexes::paint]), reinterpret_cast<Hooks::PaintTraverse_t>(Hooks::PaintTraverse), &oPaintTraverse_t);
  4408. shonaxhook.ApplyDetour<Hooks::LockCursor_t>(static_cast<Hooks::LockCursor_t>(lockcursor[vtable_indexes::lockCursor]), reinterpret_cast<Hooks::LockCursor_t>(Hooks::LockCursor), &oLockCursor_t);
  4409. shonaxhook.ApplyDetour<Hooks::EndSceneFn>(static_cast<Hooks::EndSceneFn>(d3d9[vtable_indexes::d3d9menu]), reinterpret_cast<Hooks::EndSceneFn>(Hooks::Hooked_EndScene), &oEndSceneFn);
  4410. shonaxhook.ApplyDetour<Hooks::EndSceneResetFn>(static_cast<Hooks::EndSceneResetFn>(d3d9[vtable_indexes::d3d9reset]), reinterpret_cast<Hooks::EndSceneResetFn>(Hooks::Hooked_EndScene_Reset), &oEndSceneResetFn);
  4411. shonaxhook.ApplyDetour<Hooks::D3D9FEATURES>(static_cast<Hooks::D3D9FEATURES>(d3d9[vtable_indexes::d3d9features]), reinterpret_cast<Hooks::D3D9FEATURES>(Hooks::Hooked_features), &oD3D9FEATURES);
  4412. shonaxhook.ApplyDetour<Hooks::SetMouseCodeState_t>(static_cast<Hooks::SetMouseCodeState_t>(inputkeysystem[vtable_indexes::mousecode]), reinterpret_cast<Hooks::SetMouseCodeState_t>(Hooks::SetMouseCodeState_h), &oSetMouseCodeState_t);
  4413. shonaxhook.ApplyDetour<Hooks::SetKeyCodeState_t>(static_cast<Hooks::SetKeyCodeState_t>(inputkeysystem[vtable_indexes::keycode]), reinterpret_cast<Hooks::SetKeyCodeState_t>(Hooks::SetKeyCodeState_h), &oSetKeyCodeState_t);
  4414. shonaxhook.ApplyDetour<Hooks::SvCheatsGetBoolFn>(static_cast<Hooks::SvCheatsGetBoolFn>(svcheats[vtable_indexes::sv_cheats]), reinterpret_cast<Hooks::SvCheatsGetBoolFn>(Hooks::HookedGetBool), &oSvCheatsGetBoolFn);
  4415. shonaxhook.ApplyDetour<Hooks::FrameStageNotify_t>(static_cast<Hooks::FrameStageNotify_t>(clientdll[vtable_indexes::frameStage]), reinterpret_cast<Hooks::FrameStageNotify_t>(Hooks::FrameStageNotify), &oFrameStageNotify_t);
  4416. shonaxhook.ApplyDetour<Hooks::GCSendMessage>(static_cast<Hooks::GCSendMessage>(rankchanger[vtable_indexes::send_message]), reinterpret_cast<Hooks::GCSendMessage>(hkGCSendMessage), &oGCSendMessage);
  4417. shonaxhook.ApplyDetour<Hooks::GCRetrieveMessage>(static_cast<Hooks::GCRetrieveMessage>(rankchanger[vtable_indexes::retrieve_message]), reinterpret_cast<Hooks::GCRetrieveMessage>(hkGCRetrieveMessage), &oGCRetrieveMessage);
  4418. shonaxhook.ApplyDetour<Hooks::CreateMove_t>(static_cast<Hooks::CreateMove_t>(clientmode[vtable_indexes::createMove]), reinterpret_cast<Hooks::CreateMove_t>(Hooks::CreateMove), &oCreateMove_t);
  4419. shonaxhook.ApplyDetour<Hooks::OverrideView_t>(static_cast<Hooks::OverrideView_t>(clientmode[vtable_indexes::view]), reinterpret_cast<Hooks::OverrideView_t>(Hooks::OverrideView), &oOverrideView_t);
  4420. shonaxhook.ApplyDetour<Hooks::DoPostScreenEffects_t>(static_cast<Hooks::DoPostScreenEffects_t>(clientmode[vtable_indexes::dopostscreeneffects]), reinterpret_cast<Hooks::DoPostScreenEffects_t>(Hooks::Hooked_Postscreeneffects), &oDoPostScreenEffects_t);
  4421. shonaxhook.ApplyDetour<Hooks::DrawModelExecute_t>(static_cast<Hooks::DrawModelExecute_t>(modelrender[vtable_indexes::dme]), reinterpret_cast<Hooks::DrawModelExecute_t>(Hooks::DrawModelExecute), &oDrawModelExecute_t);
  4422. shonaxhook.ApplyDetour<Hooks::FireEventClientSide>(static_cast<Hooks::FireEventClientSide>(eventmanager[vtable_indexes::event_scene]), reinterpret_cast<Hooks::FireEventClientSide>(Hooks::Hooked_FireEventClientSide), &oFireEventClientSide);
  4423. shonaxhook.ApplyDetour<Hooks::FindMDL_t>(static_cast<Hooks::FindMDL_t>(modelchanger[vtable_indexes::model_cache]), reinterpret_cast<Hooks::FindMDL_t>(Hooks::Hooked_findmdl), &oFindMDL_t);
  4424. shonaxhook.ApplyDetour<Hooks::DispatchUserMessageFn>(static_cast<Hooks::DispatchUserMessageFn>(clientdll[38]), reinterpret_cast<Hooks::DispatchUserMessageFn>(hkDispatchUserMessage), &oDispatchUserMessageFn);
  4425. //hkDispatchUserMessage
  4426. setviewmovelscallback();
  4427. hooked_events.RegisterSelf();
  4428. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement