Guest User

Untitled

a guest
Jan 6th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 126.17 KB | None | 0 0
  1. #include "Hooks.h"
  2. #include "Hacks.h"
  3. #include "Chams.h"
  4. #include "Menu.h"
  5. #include <intrin.h>
  6.  
  7. #include "Interfaces.h"
  8. #include "RenderManager.h"
  9. #include "MiscHacks.h"
  10. #include "CRC32.h"
  11. #include "Resolver.h"
  12. #include "hitmarker.h"
  13.  
  14. #define MakePtr(cast, ptr, addValue) (cast)( (DWORD)(ptr) + (DWORD)(addValue))
  15.  
  16. #ifdef NDEBUG
  17. #define strenc( s ) std::string( cx_make_encrypted_string( s ) )
  18. #define charenc( s ) strenc( s ).c_str()
  19. #define wstrenc( s ) std::wstring( strenc( s ).begin(), strenc( s ).end() )
  20. #define wcharenc( s ) wstrenc( s ).c_str()
  21. #else
  22. #define strenc( s ) ( s )
  23. #define charenc( s ) ( s )
  24. #define wstrenc( s ) ( s )
  25. #define wcharenc( s ) ( s )
  26. #endif
  27.  
  28. player_info_t GetInfo(int Index) {
  29. player_info_t Info;
  30. Interfaces::Engine->GetPlayerInfo(Index, &Info);
  31. return Info;
  32. }
  33.  
  34. Vector LastAngleAA;
  35. bool thirdpersonBool = false;
  36. bool Resolver::didhitHS;
  37. CUserCmd* Globals::UserCmd;
  38. IClientEntity* Globals::Target;
  39. int Globals::Shots;
  40. bool Globals::change;
  41. int Globals::TargetID;
  42. std::map<int, QAngle>Globals::storedshit;
  43. int Globals::missedshots;
  44.  
  45. typedef void(__thiscall* DrawModelEx_)(void*, void*, void*, const ModelRenderInfo_t&, matrix3x4*);
  46. typedef void(__thiscall* PaintTraverse_)(PVOID, unsigned int, bool, bool);
  47. typedef bool(__thiscall* InPrediction_)(PVOID);
  48. typedef void(__stdcall *FrameStageNotifyFn)(ClientFrameStage_t);
  49. typedef bool(__thiscall *FireEventClientSideFn)(PVOID, IGameEvent*);
  50. typedef void(__thiscall* RenderViewFn)(void*, CViewSetup&, CViewSetup&, int, int);
  51. typedef void(__thiscall* PlaySoundFn)(const char*);
  52. typedef void(__thiscall *SceneEnd_t)(void *pEcx);
  53.  
  54. using OverrideViewFn = void(__fastcall*)(void*, void*, CViewSetup*);
  55. typedef float(__stdcall *oGetViewModelFOV)();
  56.  
  57. SceneEnd_t pSceneEnd;
  58. PaintTraverse_ oPaintTraverse;
  59. DrawModelEx_ oDrawModelExecute;
  60. FrameStageNotifyFn oFrameStageNotify;
  61. OverrideViewFn oOverrideView;
  62. FireEventClientSideFn oFireEventClientSide;
  63. RenderViewFn oRenderView;
  64. PlaySoundFn oPlaySound;
  65.  
  66.  
  67. void __fastcall PaintTraverse_Hooked(PVOID pPanels, int edx, unsigned int vguiPanel, bool forceRepaint, bool allowForce);
  68. bool __stdcall Hooked_InPrediction();
  69. bool __fastcall Hooked_FireEventClientSide(PVOID ECX, PVOID EDX, IGameEvent *Event);
  70. void __fastcall Hooked_DrawModelExecute(void* thisptr, int edx, void* ctx, void* state, const ModelRenderInfo_t &pInfo, matrix3x4 *pCustomBoneToWorld);
  71. bool __stdcall CreateMoveClient_Hooked(float frametime, CUserCmd* pCmd);
  72. void __stdcall Hooked_FrameStageNotify(ClientFrameStage_t curStage);
  73. void __fastcall Hooked_OverrideView(void* ecx, void* edx, CViewSetup* pSetup);
  74. float __stdcall GGetViewModelFOV();
  75. void __fastcall Hooked_RenderView(void* ecx, void* edx, CViewSetup &setup, CViewSetup &hudViewSetup, int nClearFlags, int whatToDraw);
  76. void __stdcall hookedPlaySound(const char* name);
  77.  
  78. namespace Hooks
  79. {
  80. Utilities::Memory::VMTManager VMTPanel;
  81. Utilities::Memory::VMTManager VMTClient;
  82. Utilities::Memory::VMTManager VMTClientMode;
  83. Utilities::Memory::VMTManager VMTModelRender;
  84. Utilities::Memory::VMTManager VMTPrediction;
  85. Utilities::Memory::VMTManager VMTPlaySound;
  86. Utilities::Memory::VMTManager VMTRenderView;
  87. Utilities::Memory::VMTManager VMTEventManager;
  88. };
  89.  
  90. void Hooks::UndoHooks()
  91. {
  92. VMTPanel.RestoreOriginal();
  93. VMTPrediction.RestoreOriginal();
  94. VMTModelRender.RestoreOriginal();
  95. VMTClientMode.RestoreOriginal();
  96. }
  97.  
  98. void Hooks::Initialise()
  99. {
  100. Interfaces::Engine->ExecuteClientCmd("clear");
  101. Interfaces::CVar->ConsoleColorPrintf(Color(255, 0, 243, 255), ("\n Injected successfully! [Mehusense]\n"));
  102. Interfaces::CVar->ConsoleColorPrintf(Color(255, 0, 243, 255), ("\n Build Date: %s \n"), __DATE__);
  103. Interfaces::CVar->ConsoleColorPrintf(Color(255, 0, 243, 255), ("\n Build Time: %s \n"), __TIME__);
  104.  
  105. VMTPanel.Initialise((DWORD*)Interfaces::Panels);
  106. oPaintTraverse = (PaintTraverse_)VMTPanel.HookMethod((DWORD)&PaintTraverse_Hooked, Offsets::VMT::Panel_PaintTraverse);
  107.  
  108. VMTPrediction.Initialise((DWORD*)Interfaces::Prediction);
  109. VMTPrediction.HookMethod((DWORD)&Hooked_InPrediction, 14);
  110.  
  111. VMTModelRender.Initialise((DWORD*)Interfaces::ModelRender);
  112. oDrawModelExecute = (DrawModelEx_)VMTModelRender.HookMethod((DWORD)&Hooked_DrawModelExecute, Offsets::VMT::ModelRender_DrawModelExecute);
  113.  
  114. VMTClientMode.Initialise((DWORD*)Interfaces::ClientMode);
  115. VMTClientMode.HookMethod((DWORD)CreateMoveClient_Hooked, 24);
  116.  
  117. oOverrideView = (OverrideViewFn)VMTClientMode.HookMethod((DWORD)&Hooked_OverrideView, 18);
  118. VMTClientMode.HookMethod((DWORD)&GGetViewModelFOV, 35);
  119.  
  120. VMTClient.Initialise((DWORD*)Interfaces::Client);
  121. oFrameStageNotify = (FrameStageNotifyFn)VMTClient.HookMethod((DWORD)&Hooked_FrameStageNotify, 36);
  122.  
  123. VMTEventManager.Initialise((DWORD*)Interfaces::EventManager);
  124. oFireEventClientSide = (FireEventClientSideFn)VMTEventManager.HookMethod((DWORD)&Hooked_FireEventClientSide, 9);
  125.  
  126. VMTPlaySound.Initialise((DWORD*)Interfaces::Surface);
  127. oPlaySound = (PlaySoundFn)VMTPlaySound.HookMethod((DWORD)&hookedPlaySound, 82);
  128. }
  129.  
  130. void MovementCorrection(CUserCmd* pCmd)
  131. {
  132. }
  133.  
  134. float clip(float n, float lower, float upper)
  135. {
  136. return (std::max)(lower, (std::min)(n, upper));
  137. }
  138.  
  139. const char* clantaganimation[19] =
  140. {
  141. " m",
  142. " me",
  143. " meh",
  144. " mehu",
  145. " mehus",
  146. " mehuse",
  147. " mehusen",
  148. " mehusens",
  149. "mehusense",
  150. "ehusense ",
  151. "husense ",
  152. "usense ",
  153. "sense ",
  154. "ense ",
  155. "ense ",
  156. "nse ",
  157. "se ",
  158. "e ",
  159. " ",
  160. };
  161.  
  162. int kek = 0;
  163. int autism = 0;
  164.  
  165. int LagCompBreak() {
  166. IClientEntity *pLocalPlayer = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  167. Vector velocity = pLocalPlayer->GetVelocity();
  168. velocity.z = 0;
  169. float speed = velocity.Length();
  170. if (speed > 0.f) {
  171. auto distance_per_tick = speed *
  172. Interfaces::Globals->interval_per_tick;
  173. int choked_ticks = std::ceilf(65.f / distance_per_tick);
  174. return std::min<int>(choked_ticks, 14);
  175. }
  176. return 1;
  177. }
  178.  
  179. bool __stdcall CreateMoveClient_Hooked(float frametime, CUserCmd* pCmd)
  180. {
  181. if (!pCmd->command_number)
  182. return true;
  183.  
  184. if (Interfaces::Engine->IsConnected() && Interfaces::Engine->IsInGame())
  185. {
  186.  
  187. PVOID pebp;
  188. __asm mov pebp, ebp;
  189. bool* pbSendPacket = (bool*)(*(DWORD*)pebp - 0x1C);
  190. bool& bSendPacket = *pbSendPacket;
  191.  
  192. Vector origView = pCmd->viewangles;
  193. Vector viewforward, viewright, viewup, aimforward, aimright, aimup;
  194. Vector qAimAngles;
  195. qAimAngles.Init(0.0f, pCmd->viewangles.y, 0.0f);
  196. AngleVectors(qAimAngles, &viewforward, &viewright, &viewup);
  197.  
  198. IClientEntity* pEntity;
  199. IClientEntity *pLocal = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  200. if (Interfaces::Engine->IsConnected() && Interfaces::Engine->IsInGame() && pLocal && pLocal->IsAlive())
  201. {
  202. Hacks::MoveHacks(pCmd, bSendPacket);
  203. ResolverSetup::GetInst().CM(pEntity);
  204. }
  205.  
  206. if (Menu::Window.MiscTab.FakeLagEnable.GetState())
  207. {
  208. static int ticks = 0;
  209. static int ticks1 = 0;
  210. static int iTick = 0;
  211. static int iTick1 = 0;
  212. static int iTick2 = 0;
  213. int ticksMax = 16;
  214. int value = Menu::Window.MiscTab.FakeLagChoke.GetValue();
  215. if (Menu::Window.MiscTab.FakeLagEnable.GetState() && value > 0 && Menu::Window.MiscTab.FakeLagTyp.GetIndex() == 2)
  216. {
  217. if (ticks >= ticksMax)
  218. {
  219. bSendPacket = true;
  220. ticks = 0;
  221. }
  222. else
  223. {
  224. int packetsToChoke;
  225. if (pLocal->GetVelocity().Length() > 0.f)
  226. {
  227. packetsToChoke = (int)((128.f / Interfaces::Globals->interval_per_tick) / pLocal->GetVelocity().Length()) + 1;
  228. if (packetsToChoke >= 15)
  229. packetsToChoke = 14;
  230. if (packetsToChoke < value)
  231. packetsToChoke = value;
  232. }
  233. else
  234. packetsToChoke = 0;
  235.  
  236. bSendPacket = ticks < 18 - packetsToChoke;;
  237. }
  238. ticks++;
  239. }
  240.  
  241. if (Menu::Window.MiscTab.FakeLagEnable.GetState() && value > 0 && Menu::Window.MiscTab.FakeLagTyp.GetIndex() == 4)
  242. {
  243. if (!(pLocal->GetFlags() & FL_ONGROUND))
  244. {
  245. if (ticks1 >= ticksMax)
  246. {
  247. bSendPacket = true;
  248. ticks1 = 0;
  249. }
  250. else
  251. {
  252. int packetsToChoke;
  253. if (pLocal->GetVelocity().Length() > 0.f)
  254. {
  255. packetsToChoke = (int)((128.f / Interfaces::Globals->interval_per_tick) / pLocal->GetVelocity().Length()) + 1;
  256. if (packetsToChoke >= 15)
  257. packetsToChoke = 14;
  258. if (packetsToChoke < value)
  259. packetsToChoke = value;
  260. }
  261. else
  262. packetsToChoke = 0;
  263.  
  264. bSendPacket = ticks1 < 18 - packetsToChoke;;
  265. }
  266. ticks1++;
  267. }
  268. }
  269. if (Menu::Window.MiscTab.FakeLagEnable.GetState() && value > 0 && Menu::Window.MiscTab.FakeLagTyp.GetIndex() == 1)
  270. {
  271.  
  272. if (iTick < value) {
  273. bSendPacket = false;
  274. iTick++;
  275. }
  276. else {
  277. bSendPacket = true;
  278. iTick = 0;
  279. }
  280. }
  281. if (Menu::Window.MiscTab.FakeLagEnable.GetState() && value > 0 && Menu::Window.MiscTab.FakeLagTyp.GetIndex() == 3)
  282. {
  283. if (!(pLocal->GetFlags() & FL_ONGROUND))
  284. {
  285. if (iTick1 < value) {
  286. bSendPacket = false;
  287. iTick1++;
  288. }
  289. else {
  290. bSendPacket = true;
  291. iTick1 = 0;
  292. }
  293. }
  294. }
  295. if (Menu::Window.MiscTab.FakeLagEnable.GetState() && value > 0 && Menu::Window.MiscTab.FakeLagTyp.GetIndex() == 5)
  296. {
  297. value = LagCompBreak();
  298. if (iTick2 < value) {
  299. bSendPacket = false;
  300. iTick2++;
  301. }
  302. else {
  303. bSendPacket = true;
  304. iTick2 = 0;
  305. }
  306. }
  307. }
  308.  
  309. if (Interfaces::Engine->IsInGame() && Interfaces::Engine->IsConnected())
  310. {
  311. static auto SetClanTag = reinterpret_cast<void(__fastcall*)(const char*, const char*)>(((DWORD)(Utilities::Memory::FindPatternV2("engine.dll", "53 56 57 8B DA 8B F9 FF 15"))));
  312. if (Menu::Window.MiscTab.ClanTag.GetState())
  313. {
  314. static size_t lastTime = 0;
  315.  
  316. if (GetTickCount() > lastTime)
  317. {
  318. kek++;
  319. if (kek > 10)
  320. {
  321. autism = autism + 1;
  322.  
  323. if (autism >= 16) // number of clantaganimation
  324. autism = 0;
  325.  
  326. char random[255];
  327. SetClanTag(clantaganimation[autism], clantaganimation[autism]);
  328. lastTime = GetTickCount() + 500;
  329. }
  330.  
  331. if (kek > 10)
  332. kek = 0;
  333. }
  334. }
  335. else
  336. SetClanTag("", "");
  337. }
  338.  
  339. static bool abc = false;
  340. if (Menu::Window.VisualsTab.NightMode.GetState())
  341. {
  342. if (!abc)
  343. {
  344. ConVar* staticdrop = Interfaces::CVar->FindVar("r_DrawSpecificStaticProp");
  345. SpoofedConvar* staticdrop_spoofed = new SpoofedConvar(staticdrop);
  346. staticdrop_spoofed->SetInt(0);
  347.  
  348. {
  349. for (MaterialHandle_t i = Interfaces::MaterialSystem->FirstMaterial(); i != Interfaces::MaterialSystem->InvalidMaterial(); i = Interfaces::MaterialSystem->NextMaterial(i))
  350. {
  351. IMaterial *pMaterial = Interfaces::MaterialSystem->GetMaterial(i);
  352.  
  353. if (!pMaterial)
  354. continue;
  355.  
  356. if (!strcmp(pMaterial->GetTextureGroupName(), "World textures"))
  357. {
  358. pMaterial->ColorModulation(0.1f, 0.1f, 0.1f);
  359. }
  360. if (!strcmp(pMaterial->GetTextureGroupName(), "StaticProp textures"))
  361. {
  362. pMaterial->ColorModulation(0.3f, 0.3f, 0.3f);
  363. }
  364. }
  365. }
  366. }
  367. abc = true;
  368. }
  369. else
  370. {
  371. abc = false;
  372. }
  373.  
  374. static bool nosmoke;
  375. if (Menu::Window.VisualsTab.OtherNoSmoke.GetState())
  376. {
  377.  
  378. if (!nosmoke) {
  379. ConVar* particles = Interfaces::CVar->FindVar("r_drawparticles");
  380. SpoofedConvar* particles_spoofed = new SpoofedConvar(particles);
  381. particles_spoofed->SetInt(0);
  382.  
  383. ConVar* fog = Interfaces::CVar->FindVar("fog_enable");
  384. SpoofedConvar* fog_spoofed = new SpoofedConvar(fog);
  385. fog_spoofed->SetInt(0);
  386. nosmoke = true;
  387. }
  388.  
  389. }
  390. else if (!Menu::Window.VisualsTab.OtherNoSmoke.GetState())
  391. {
  392. if (nosmoke)
  393. {
  394. ConVar* particles = Interfaces::CVar->FindVar("r_drawparticles");
  395. SpoofedConvar* particles_spoofed = new SpoofedConvar(particles);
  396. particles_spoofed->SetInt(1);
  397.  
  398. ConVar* fog = Interfaces::CVar->FindVar("fog_enable");
  399. SpoofedConvar* fog_spoofed = new SpoofedConvar(fog);
  400. fog_spoofed->SetInt(1);
  401. nosmoke = false;
  402. }
  403.  
  404. }
  405.  
  406. if (Menu::Window.VisualsTab.NightSky.GetState())
  407. {
  408. ConVar* sky = Interfaces::CVar->FindVar("sv_skyname");
  409. SpoofedConvar* sky_spoofed = new SpoofedConvar(sky);
  410. sky_spoofed->SetString("sky_csgo_night02");
  411. }
  412.  
  413. qAimAngles.Init(0.0f, GetAutostrafeView().y, 0.0f);
  414. AngleVectors(qAimAngles, &viewforward, &viewright, &viewup);
  415. qAimAngles.Init(0.0f, pCmd->viewangles.y, 0.0f);
  416. AngleVectors(qAimAngles, &aimforward, &aimright, &aimup);
  417. Vector vForwardNorm; Normalize(viewforward, vForwardNorm);
  418. Vector vRightNorm; Normalize(viewright, vRightNorm);
  419. Vector vUpNorm; Normalize(viewup, vUpNorm);
  420.  
  421. float forward = pCmd->forwardmove;
  422. float right = pCmd->sidemove;
  423. float up = pCmd->upmove;
  424. if (forward > 450) forward = 450;
  425. if (right > 450) right = 450;
  426. if (up > 450) up = 450;
  427. if (forward < -450) forward = -450;
  428. if (right < -450) right = -450;
  429. if (up < -450) up = -450;
  430. pCmd->forwardmove = DotProduct(forward * vForwardNorm, aimforward) + DotProduct(right * vRightNorm, aimforward) + DotProduct(up * vUpNorm, aimforward);
  431. pCmd->sidemove = DotProduct(forward * vForwardNorm, aimright) + DotProduct(right * vRightNorm, aimright) + DotProduct(up * vUpNorm, aimright);
  432. pCmd->upmove = DotProduct(forward * vForwardNorm, aimup) + DotProduct(right * vRightNorm, aimup) + DotProduct(up * vUpNorm, aimup);
  433.  
  434. if (Menu::Window.MiscTab.OtherSafeMode.GetState())
  435. {
  436. GameUtils::NormaliseViewAngle(pCmd->viewangles);
  437.  
  438. if (pCmd->viewangles.z != 0.0f)
  439. {
  440. pCmd->viewangles.z = 0.00;
  441. }
  442.  
  443. if (pCmd->viewangles.x < -89 || pCmd->viewangles.x > 89 || pCmd->viewangles.y < -180 || pCmd->viewangles.y > 180)
  444. {
  445. Utilities::Log("Having to re-normalise!");
  446. GameUtils::NormaliseViewAngle(pCmd->viewangles);
  447. Beep(750, 800);
  448. if (pCmd->viewangles.x < -89 || pCmd->viewangles.x > 89 || pCmd->viewangles.y < -180 || pCmd->viewangles.y > 180)
  449. {
  450. pCmd->viewangles = origView;
  451. pCmd->sidemove = right;
  452. pCmd->forwardmove = forward;
  453. }
  454. }
  455. }
  456.  
  457. if (pCmd->viewangles.x > 90)
  458. {
  459. pCmd->forwardmove = -pCmd->forwardmove;
  460. }
  461.  
  462. if (pCmd->viewangles.x < -90)
  463. {
  464. pCmd->forwardmove = -pCmd->forwardmove;
  465. }
  466.  
  467. switch (Menu::Window.MiscTab.AngleInThirdPerson.GetIndex())
  468. {
  469. case 0:
  470. if (!bSendPacket)
  471. LastAngleAA = pCmd->viewangles;
  472. break;
  473. case 1:
  474. if (bSendPacket)
  475. LastAngleAA = pCmd->viewangles;
  476. break;
  477. }
  478.  
  479. if (bSendPacket == true) {
  480. lineFakeAngle = pCmd->viewangles.y;
  481. }
  482. else {
  483. lineRealAngle = pCmd->viewangles.y;
  484. }
  485. }
  486.  
  487.  
  488. return false;
  489.  
  490. int circlekey = Menu::Window.MiscTab.OtherCircle.GetKey();
  491. int circle = Menu::Window.MiscTab.CircleAmount.GetValue();
  492.  
  493. static float CurYaw = 0.f;
  494. if (circlekey > 0 && GUI.GetKeyState(circlekey))
  495. {
  496. pCmd->forwardmove = -450.f;
  497. pCmd->sidemove = 0.f;
  498. static float CurYaw = 0.f;
  499. float Vel2D = hackManager.pLocal()->GetVelocity().Length2D();
  500. if (Vel2D >= 0)
  501. {
  502.  
  503. float TurnRate = clip((Vel2D / 90.f), circle, 1.25f);
  504. CurYaw += TurnRate;
  505.  
  506.  
  507. pCmd->viewangles.y = CurYaw;
  508.  
  509. }
  510. }
  511. }
  512.  
  513. bool sendpacket = true;
  514.  
  515. void FakeLag(CUserCmd* pCmd)
  516. {
  517.  
  518. IClientEntity* pLocal = hackManager.pLocal();
  519.  
  520. int choke = Menu::Window.MiscTab.FakeLagChoke.GetValue() + 1;
  521. if (choke > 15)
  522. choke = 14;
  523.  
  524. if (Menu::Window.MiscTab.FakeLagEnable.GetState())
  525. {
  526.  
  527. static int FakelagTick;
  528. FakelagTick++;
  529. int Mode = Menu::Window.MiscTab.FakeLagTyp.GetIndex();
  530. if (Mode == 0) sendpacket = Menu::Window.MiscTab.FakeLagEnable.GetState() ? !(FakelagTick % (choke)) : 1;
  531. if (Mode == 1)
  532. {
  533. static int FakelagFactor = 2;
  534. sendpacket = Menu::Window.MiscTab.FakeLagTyp.GetIndex() ? !(FakelagTick % (FakelagFactor + 1)) : 1;
  535. if (sendpacket)
  536. FakelagFactor = max(1, min((int)(fabs(pLocal->GetVelocity().Length2D() / 80.f)), 12));
  537. }
  538. if (Mode == 2)
  539. {
  540. static int FakelagFactor = 8;
  541. sendpacket = Menu::Window.MiscTab.FakeLagTyp.GetIndex() ? !(FakelagTick % (FakelagFactor + 1)) : 1;
  542. if (sendpacket) {
  543. FakelagFactor = (rand() % 7) + 6;
  544. }
  545. }
  546. if (Mode == 3)
  547. {
  548. static int FakelagFactor = Menu::Window.MiscTab.FakeLagChoke.GetValue();
  549. sendpacket = Menu::Window.MiscTab.FakeLagTyp.GetIndex() ? !(FakelagTick % (FakelagFactor + 1)) : 1;
  550. if (sendpacket) {
  551. FakelagFactor = (rand() % 10) + 1;
  552. }
  553. }
  554. if (Mode == 4)
  555. {
  556. static int FakelagFactor = 5;
  557. int Based = FakelagFactor / 3;
  558. sendpacket = Menu::Window.MiscTab.FakeLagTyp.GetIndex() ? !(FakelagTick % (Based)) : 1;
  559. if (sendpacket) {
  560. FakelagFactor += 1;
  561. if (Based >= Menu::Window.MiscTab.FakeLagChoke.GetValue()) FakelagFactor = 3;
  562. }
  563. }
  564. if (Mode == 5)
  565. {
  566. static int FakelagFactor = 10;
  567. static int m_iOldHealth = 0;
  568. static int iChoked;
  569. if (m_iOldHealth != pLocal->GetHealth()) {
  570. m_iOldHealth = pLocal->GetHealth();
  571. FakelagFactor = rand() % 7 + 6 + 1;
  572. }
  573. sendpacket = Menu::Window.MiscTab.FakeLagTyp.GetIndex() ? !(FakelagTick % (FakelagFactor + 1)) : 1;
  574. if (!sendpacket)
  575. iChoked++;
  576. else iChoked = 0;
  577.  
  578. if (iChoked > 14) {
  579. sendpacket = 1;
  580. FakelagTick = -1;
  581. }
  582. }
  583. }
  584. }
  585.  
  586. std::string GetTimeString()
  587. {
  588. time_t current_time;
  589. struct tm *time_info;
  590. static char timeString[10];
  591. time(&current_time);
  592. time_info = localtime(&current_time);
  593. strftime(timeString, sizeof(timeString), "%X", time_info);
  594. return timeString;
  595. }
  596.  
  597. void __fastcall PaintTraverse_Hooked(PVOID pPanels, int edx, unsigned int vguiPanel, bool forceRepaint, bool allowForce)
  598. {
  599. if (Menu::Window.VisualsTab.Active.GetState() && Menu::Window.VisualsTab.OtherNoScope.GetState() && strcmp("HudZoom", Interfaces::Panels->GetName(vguiPanel)) == 0)
  600. return;
  601.  
  602. oPaintTraverse(pPanels, vguiPanel, forceRepaint, allowForce);
  603.  
  604. static unsigned int FocusOverlayPanel = 0;
  605. static bool FoundPanel = false;
  606.  
  607. if (!FoundPanel)
  608. {
  609. PCHAR szPanelName = (PCHAR)Interfaces::Panels->GetName(vguiPanel);
  610. if (strstr(szPanelName, "MatSystemTopPanel"))
  611. {
  612. FocusOverlayPanel = vguiPanel;
  613. FoundPanel = true;
  614. }
  615. }
  616. else if (FocusOverlayPanel == vguiPanel)
  617. {
  618. if (Menu::Window.VisualsTab.Clock.GetState())
  619. {
  620. Render::Textf(14, 24, Color(255, 255, 255, 255), Render::Fonts::Slider, ("%s"), GetTimeString().c_str());
  621. }
  622. if (Menu::Window.VisualsTab.Watermark.GetState())
  623. {
  624. Render::Text(7, 7, Color(0, 218, 255, 255), Render::Fonts::WaterMark, ("Mehusense | build date 5/1/18"));
  625. }
  626.  
  627. if (Interfaces::Engine->IsConnected() && Interfaces::Engine->IsInGame())
  628. Hacks::DrawHacks();
  629.  
  630. if (Interfaces::Engine->IsConnected() && Interfaces::Engine->IsInGame() && Menu::Window.VisualsTab.OtherHitmarker.GetState())
  631. hitmarker::singleton()->on_paint();
  632.  
  633. if (Menu::Window.VisualsTab.Active.GetState())
  634. {
  635. float AmbientRedAmount = Menu::Window.VisualsTab.AmbientRed.GetValue();
  636. float AmbientGreenAmount = Menu::Window.VisualsTab.AmbientGreen.GetValue();
  637. float AmbientBlueAmount = Menu::Window.VisualsTab.AmbientBlue.GetValue();
  638.  
  639. ConVar* AmbientRedCvar = Interfaces::CVar->FindVar("mat_ambient_light_r");
  640. *(float*)((DWORD)&AmbientRedCvar->fnChangeCallback + 0xC) = NULL;
  641. AmbientRedCvar->SetValue(AmbientRedAmount);
  642.  
  643. ConVar* AmbientGreenCvar = Interfaces::CVar->FindVar("mat_ambient_light_g");
  644. *(float*)((DWORD)&AmbientGreenCvar->fnChangeCallback + 0xC) = NULL;
  645. AmbientGreenCvar->SetValue(AmbientGreenAmount);
  646.  
  647. ConVar* AmbientBlueCvar = Interfaces::CVar->FindVar("mat_ambient_light_b");
  648. *(float*)((DWORD)&AmbientBlueCvar->fnChangeCallback + 0xC) = NULL;
  649. AmbientBlueCvar->SetValue(AmbientBlueAmount);
  650. }
  651.  
  652. Menu::DoUIFrame();
  653. }
  654. }
  655.  
  656. VOID WINAPI_INLINE hookedPlaySound(const char* name)
  657. {
  658. __asm
  659. {
  660.  
  661. PUSH name
  662. CALL oPlaySound
  663. }
  664.  
  665. if (Interfaces::Engine->IsConnected() || !(Menu::Window.MiscTab.AutoAccept.GetState()))
  666. return;
  667.  
  668. if (!strcmp(name, "\x55\x49\x2F\x63\x6F\x6D\x70\x65\x74\x69\x74\x69\x76\x65\x5F\x61\x63\x63\x65\x70\x74\x5f\x62\x65\x65\x70\x2E\x77\x61\x76"))
  669. {
  670. Offsets::IsReady = (IsReadyFn)(Offsets::Functions::IsReadySig);
  671. Offsets::IsReady;
  672. }
  673. }
  674.  
  675. bool __stdcall Hooked_InPrediction()
  676. {
  677. bool result;
  678. static InPrediction_ origFunc = (InPrediction_)Hooks::VMTPrediction.GetOriginalFunction(14);
  679. static DWORD *ecxVal = Interfaces::Prediction;
  680. result = origFunc(ecxVal);
  681.  
  682. if (Menu::Window.VisualsTab.OtherNoVisualRecoil.GetState() && (DWORD)(_ReturnAddress()) == Offsets::Functions::dwCalcPlayerView)
  683. {
  684. IClientEntity* pLocalEntity = NULL;
  685.  
  686. float* m_LocalViewAngles = NULL;
  687.  
  688. __asm
  689. {
  690. MOV pLocalEntity, ESI
  691. MOV m_LocalViewAngles, EBX
  692. }
  693.  
  694. Vector viewPunch = pLocalEntity->localPlayerExclusive()->GetViewPunchAngle();
  695. Vector aimPunch = pLocalEntity->localPlayerExclusive()->GetAimPunchAngle();
  696.  
  697. m_LocalViewAngles[0] -= (viewPunch[0] + (aimPunch[0] * 2 * 0.4499999f));
  698. m_LocalViewAngles[1] -= (viewPunch[1] + (aimPunch[1] * 2 * 0.4499999f));
  699. m_LocalViewAngles[2] -= (viewPunch[2] + (aimPunch[2] * 2 * 0.4499999f));
  700. return true;
  701. }
  702.  
  703. return result;
  704. }
  705.  
  706. typedef void(__cdecl* MsgFn)(const char* msg, va_list);
  707. void Msg(const char* msg, ...)
  708. {
  709.  
  710. if (msg == nullptr)
  711. return; //If no string was passed, or it was null then don't do anything
  712. static MsgFn fn = (MsgFn)GetProcAddress(GetModuleHandle("tier0.dll"), "Msg"); //This gets the address of export "Msg" in the dll "tier0.dll". The static keyword means it's only called once and then isn't called again (but the variable is still there)
  713. char buffer[989];
  714. va_list list; //Normal varargs stuff http://stackoverflow.com/questions/10482960/varargs-to-printf-all-arguments
  715. va_start(list, msg);
  716.  
  717. vsprintf(buffer, msg, list);
  718. va_end(list);
  719.  
  720. fn(buffer, list); //Calls the function, we got the address above.
  721. }
  722.  
  723. int Kills2 = 0;
  724. int Kills = 0;
  725. bool RoundInfo = false;
  726. size_t Delay = 0;
  727. bool flipAA;
  728. bool __fastcall Hooked_FireEventClientSide(PVOID ECX, PVOID EDX, IGameEvent *Event)
  729. {
  730. if (Menu::Window.MiscTab.EnableBuyBot.GetState())
  731. {
  732. if (Menu::Window.MiscTab.BuyBot.GetIndex() == 1)
  733. {
  734. if (strcmp(Event->GetName(), "round_start") == 0)
  735. Interfaces::Engine->ClientCmd_Unrestricted("buy ak47; buy m4a1;");
  736. }
  737. else if (Menu::Window.MiscTab.BuyBot.GetIndex() == 2)
  738. {
  739. if (strcmp(Event->GetName(), "round_start") == 0)
  740. Interfaces::Engine->ClientCmd_Unrestricted("buy awp;");
  741. }
  742. else if (Menu::Window.MiscTab.BuyBot.GetIndex() == 3)
  743. {
  744. if (strcmp(Event->GetName(), "round_start") == 0)
  745. Interfaces::Engine->ClientCmd_Unrestricted("buy scar20; buy g3sg1;buy elite;");
  746. }
  747. }
  748.  
  749. if (Menu::Window.MiscTab.EnableBuyBot.GetState())
  750. {
  751. if (Menu::Window.MiscTab.BuyBotGrenades.GetIndex() == 1)
  752. {
  753. if (strcmp(Event->GetName(), "round_start") == 0)
  754. Interfaces::Engine->ClientCmd_Unrestricted("buy flashbang; buy flashbang; buy smokegrenade; buy hegrenade;");
  755. }
  756. else if (Menu::Window.MiscTab.BuyBotGrenades.GetIndex() == 2)
  757. {
  758. if (strcmp(Event->GetName(), "round_start") == 0)
  759. Interfaces::Engine->ClientCmd_Unrestricted("buy flashbang; buy smokegrenade; buy hegrenade; buy molotov; buy incgrenade;");
  760. }
  761. }
  762.  
  763. if (Menu::Window.MiscTab.EnableBuyBot.GetState())
  764. {
  765. if (Menu::Window.MiscTab.BuyBotKevlar.GetState())
  766. {
  767. if (strcmp(Event->GetName(), "round_start") == 0)
  768. Interfaces::Engine->ClientCmd_Unrestricted("buy vest; buy vesthelm;");
  769. }
  770. }
  771.  
  772. if (Menu::Window.MiscTab.EnableBuyBot.GetState())
  773. {
  774. if (Menu::Window.MiscTab.BuyBotDefuser.GetState())
  775. {
  776. if (strcmp(Event->GetName(), "round_start") == 0)
  777. Interfaces::Engine->ClientCmd_Unrestricted("buy defuser;");
  778. }
  779. }
  780.  
  781. if (Menu::Window.RageBotTab.AimbotResolver.GetIndex() == 3)
  782. {
  783. if (!strcmp(Event->GetName(), "player_hurt"))
  784. {
  785. int deadfag = Event->GetInt("userid");
  786. int attackingfag = Event->GetInt("attacker");
  787. IClientEntity* pLocal = hackManager.pLocal();
  788. if (Interfaces::Engine->GetPlayerForUserID(deadfag) != Interfaces::Engine->GetLocalPlayer() && Interfaces::Engine->GetPlayerForUserID(attackingfag) == Interfaces::Engine->GetLocalPlayer())
  789. {
  790. IClientEntity* hittedplayer = (IClientEntity*)(Interfaces::Engine->GetPlayerForUserID(deadfag));
  791. int hit = Event->GetInt("hitgroup");
  792. if (hit == 1 && hittedplayer && deadfag && attackingfag)
  793. {
  794. Resolver::didhitHS = true;
  795. Globals::missedshots = 0;
  796. }
  797. else
  798. {
  799. Resolver::didhitHS = false;
  800. Globals::missedshots++;
  801. }
  802. }
  803. }
  804. }
  805.  
  806. if (Menu::Window.RageBotTab.FlipAA.GetState())
  807. {
  808. if (!strcmp(Event->GetName(), "player_hurt"))
  809. {
  810. int deadfag = Event->GetInt("userid");
  811. int attackingfag = Event->GetInt("attacker");
  812. IClientEntity* pLocal = hackManager.pLocal();
  813. if (Interfaces::Engine->GetPlayerForUserID(deadfag) == Interfaces::Engine->GetLocalPlayer() && Interfaces::Engine->GetPlayerForUserID(attackingfag) != Interfaces::Engine->GetLocalPlayer())
  814. {
  815. flipAA = true;
  816.  
  817. }
  818. else
  819. {
  820. flipAA = false;
  821. }
  822. }
  823. }
  824.  
  825. if (Menu::Window.VisualsTab.EventLogs.GetState())
  826. {
  827. if (!strcmp(Event->GetName(), "item_purchase"))
  828. {
  829.  
  830. int nUserID = Event->GetInt("attacker");
  831. int nDead = Event->GetInt("userid");
  832. if (nUserID || nDead)
  833. {
  834. player_info_t killed_info = GetInfo(Interfaces::Engine->GetPlayerForUserID(nDead));
  835. player_info_t killer_info = GetInfo(Interfaces::Engine->GetPlayerForUserID(nUserID));
  836. std::string before = ("[mehusense] ");
  837. std::string one = killed_info.name;
  838. std::string two = (" bought ");
  839. std::string three = Event->GetString("weapon");
  840. std::string six = "\n";
  841. if (Menu::Window.VisualsTab.EventLogs.GetState())
  842. {
  843.  
  844. Msg((before + one + two + three + six).c_str());
  845.  
  846. }
  847.  
  848. }
  849. }
  850. if (Menu::Window.VisualsTab.EventLogs.GetState())
  851. {
  852. if (!strcmp(Event->GetName(), "player_hurt"))
  853. {
  854.  
  855. int attackerid = Event->GetInt("attacker");
  856. int entityid = Interfaces::Engine->GetPlayerForUserID(attackerid);
  857. if (entityid == Interfaces::Engine->GetLocalPlayer())
  858. {
  859.  
  860. int nUserID = Event->GetInt("attacker");
  861. int nDead = Event->GetInt("userid");
  862. if (nUserID || nDead)
  863. {
  864.  
  865. player_info_t killed_info = GetInfo(Interfaces::Engine->GetPlayerForUserID(nDead));
  866. player_info_t killer_info = GetInfo(Interfaces::Engine->GetPlayerForUserID(nUserID));
  867. std::string title = ("[mehusense] ");
  868. std::string iti = killer_info.name;
  869. std::string ni = " Damaged ";
  870. std::string san = killed_info.name;
  871. std::string yon = " Damage ";
  872. std::string go = "Given ";
  873. std::string damage = Event->GetString("dmg_health");
  874. std::string tugi = "\n";
  875. if (Menu::Window.VisualsTab.EventLogs.GetState())
  876. {
  877. Msg((title + iti + ni + san + yon + go + damage + tugi).c_str());
  878. }
  879.  
  880. }
  881. }
  882.  
  883. }
  884.  
  885. }
  886. }
  887.  
  888. if (Menu::Window.MiscTab.TrashTalk.GetState()) {
  889. if (strcmp(Event->GetName(), "round_end") == 0) {
  890. RoundInfo = true;
  891. Delay = GetTickCount();
  892. }
  893. else if ((strcmp(Event->GetName(), "game_newmap") == 0) || (strcmp(Event->GetName(), "game_start") == 0) || (strcmp(Event->GetName(), "game_end") == 0)) {
  894. Kills = 0;
  895. Kills2 = 0;
  896. }
  897. else if (strcmp(Event->GetName(), "player_connect") == 0) {
  898. int PlayerID = Interfaces::Engine->GetPlayerForUserID(Event->GetInt("userid"));
  899.  
  900. player_info_t PlayerInfo;
  901. if (Interfaces::Engine->GetPlayerInfo(PlayerID, &PlayerInfo)) {
  902. char Buffer[128];
  903. sprintf(Buffer, "say Hello, %s.", PlayerInfo.name);
  904. Interfaces::Engine->ClientCmd(Buffer);
  905. }
  906. }
  907. else if ((strcmp(Event->GetName(), "player_death") == 0) || (strcmp(Event->GetName(), "entity_killed") == 0)) {
  908. int PlayerID = Interfaces::Engine->GetPlayerForUserID(Event->GetInt("userid"));
  909. int AttackerID = Interfaces::Engine->GetPlayerForUserID(Event->GetInt("attacker"));
  910.  
  911. player_info_t PlayerInfo;
  912. player_info_t AttackerInfo;
  913.  
  914. if (Interfaces::Engine->GetPlayerInfo(PlayerID, &PlayerInfo) &&
  915. Interfaces::Engine->GetPlayerInfo(AttackerID, &AttackerInfo)) {
  916.  
  917. if (PlayerID == Interfaces::Engine->GetLocalPlayer())
  918. Kills = 0;
  919.  
  920. if (PlayerID != Interfaces::Engine->GetLocalPlayer() && AttackerID == Interfaces::Engine->GetLocalPlayer()) {
  921. Kills++;
  922. Kills2++;
  923.  
  924. char Buffer[128];
  925.  
  926. switch (Kills) {
  927. case 1: sprintf(Buffer, "say [mehusense]%s tapped ", PlayerInfo.name); break;
  928. case 2: sprintf(Buffer, "say [mehusense]%s tapped ", PlayerInfo.name); break;
  929. case 3: sprintf(Buffer, "say [mehusense]%s tapped ", PlayerInfo.name); break;
  930. case 4: sprintf(Buffer, "say [mehusense]%s tapped ", PlayerInfo.name); break;
  931. case 5: sprintf(Buffer, "say [mehusense]%s tapped ", PlayerInfo.name); break;
  932. default: sprintf(Buffer, "[mehusense]%s tapped ", PlayerInfo.name); break;
  933. }
  934.  
  935. Interfaces::Engine->ClientCmd(Buffer);
  936. }
  937. }
  938. }
  939. }
  940. return oFireEventClientSide(ECX, Event);
  941. }
  942.  
  943. void __fastcall Hooked_DrawModelExecute(void* thisptr, int edx, void* ctx, void* state, const ModelRenderInfo_t &pInfo, matrix3x4 *pCustomBoneToWorld)
  944. {
  945. Color color;
  946. float flColor[3] = { 0.f };
  947. static IMaterial* CoveredLit = CreateMaterial(true);
  948. static IMaterial* OpenLit = CreateMaterial(false);
  949. static IMaterial* CoveredFlat = CreateMaterial(true, false);
  950. static IMaterial* OpenFlat = CreateMaterial(false, false);
  951. bool DontDraw = false;
  952.  
  953. const char* ModelName = Interfaces::ModelInfo->GetModelName((model_t*)pInfo.pModel);
  954. IClientEntity* pModelEntity = (IClientEntity*)Interfaces::EntList->GetClientEntity(pInfo.entity_index);
  955. IClientEntity* pLocal = (IClientEntity*)Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  956.  
  957. if (Menu::Window.VisualsTab.Active.GetState())
  958. {
  959. int ChamsStyle = Menu::Window.VisualsTab.OptionsChams.GetIndex();
  960. int HandsStyle = Menu::Window.VisualsTab.OtherNoHands.GetIndex();
  961. int WeaponsChams = Menu::Window.VisualsTab.WeaponChams.GetState();
  962. if (ChamsStyle != 0 && Menu::Window.VisualsTab.FiltersPlayers.GetState() && strstr(ModelName, "models/player"))
  963. {
  964. if (pModelEntity == nullptr)
  965. return;
  966.  
  967. if (pLocal && (!Menu::Window.VisualsTab.FiltersEnemiesOnly.GetState() || pModelEntity->GetTeamNum() != pLocal->GetTeamNum()))
  968. {
  969. IMaterial *covered = ChamsStyle == 1 ? CoveredLit : CoveredFlat;
  970. IMaterial *open = ChamsStyle == 1 ? OpenLit : OpenFlat;
  971.  
  972. IClientEntity* pModelEntity = (IClientEntity*)Interfaces::EntList->GetClientEntity(pInfo.entity_index);
  973. if (pModelEntity)
  974. {
  975. IClientEntity *local = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  976. if (local)
  977. {
  978. if (pModelEntity->IsAlive() && pModelEntity->GetHealth() > 0 && pModelEntity->GetTeamNum() != local->GetTeamNum())
  979. {
  980. float alpha = 1.f;
  981.  
  982. if (pModelEntity->HasGunGameImmunity())
  983. alpha = 0.5f;
  984.  
  985. if (pModelEntity->GetTeamNum() == 2)
  986. {
  987. flColor[0] = Menu::Window.ColorsTab.TChamsR.GetValue() / 255.f;
  988. flColor[1] = Menu::Window.ColorsTab.TChamsG.GetValue() / 255.f;
  989. flColor[2] = Menu::Window.ColorsTab.TChamsB.GetValue() / 255.f;
  990. }
  991. else
  992. {
  993. flColor[0] = Menu::Window.ColorsTab.CTChamsR.GetValue() / 255.f;
  994. flColor[1] = Menu::Window.ColorsTab.CTChamsG.GetValue() / 255.f;
  995. flColor[2] = Menu::Window.ColorsTab.CTChamsB.GetValue() / 255.f;
  996. }
  997.  
  998. if (Menu::Window.VisualsTab.ChamsVisibleOnly.GetState())
  999. {
  1000. Interfaces::RenderView->SetColorModulation(flColor);
  1001. Interfaces::RenderView->SetBlend(0);
  1002. Interfaces::ModelRender->ForcedMaterialOverride(covered);
  1003. oDrawModelExecute(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
  1004. }
  1005. else
  1006. {
  1007. Interfaces::RenderView->SetColorModulation(flColor);
  1008. Interfaces::RenderView->SetBlend(1);
  1009. Interfaces::ModelRender->ForcedMaterialOverride(covered);
  1010. oDrawModelExecute(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
  1011. }
  1012.  
  1013. if (pModelEntity->GetTeamNum() == 2)
  1014. {
  1015. flColor[0] = Menu::Window.ColorsTab.TChamsR.GetValue() / 255.f;
  1016. flColor[1] = Menu::Window.ColorsTab.TChamsG.GetValue() / 255.f;
  1017. flColor[2] = Menu::Window.ColorsTab.TChamsB.GetValue() / 255.f;
  1018. }
  1019. else
  1020. {
  1021. flColor[0] = Menu::Window.ColorsTab.CTChamsR.GetValue() / 255.f;
  1022. flColor[1] = Menu::Window.ColorsTab.CTChamsG.GetValue() / 255.f;
  1023. flColor[2] = Menu::Window.ColorsTab.CTChamsB.GetValue() / 255.f;
  1024. }
  1025.  
  1026. Interfaces::RenderView->SetColorModulation(flColor);
  1027. Interfaces::RenderView->SetBlend(alpha);
  1028. Interfaces::ModelRender->ForcedMaterialOverride(open);
  1029. }
  1030. else
  1031. {
  1032. color.SetColor(255, 255, 255, 255);
  1033. ForceMaterial(color, open);
  1034. }
  1035. }
  1036. }
  1037. }
  1038. }
  1039. else if (HandsStyle != 0 && strstr(ModelName, "arms"))
  1040. {
  1041. if (HandsStyle == 1)
  1042. {
  1043. DontDraw = true;
  1044. }
  1045. else if (HandsStyle == 2)
  1046. {
  1047. Interfaces::RenderView->SetBlend(0.3);
  1048. }
  1049.  
  1050. else if (HandsStyle == 3)
  1051. {
  1052. flColor[0] = 10.f / 255.f;
  1053. flColor[1] = 10.f / 255.f;
  1054. flColor[2] = 10.f / 255.f;
  1055.  
  1056. Interfaces::RenderView->SetColorModulation(flColor);
  1057. static IMaterial* wire = CreateMaterial(true, false, true);
  1058. IMaterial *handy = wire;
  1059. handy->SetMaterialVarFlag(MATERIAL_VAR_WIREFRAME, true);
  1060. Interfaces::ModelRender->ForcedMaterialOverride(handy);
  1061. }
  1062.  
  1063. else if (HandsStyle == 4)
  1064. {
  1065. IMaterial *covered = ChamsStyle == 1 ? CoveredLit : CoveredFlat;
  1066. IMaterial *open = ChamsStyle == 1 ? OpenLit : OpenFlat;
  1067. if (pLocal)
  1068. {
  1069. if (pLocal->IsAlive())
  1070. {
  1071. int alpha = pLocal->HasGunGameImmunity() ? 150 : 255;
  1072.  
  1073. if (pLocal->GetTeamNum() == 2)
  1074. color.SetColor(240, 30, 35, alpha);
  1075. else
  1076. color.SetColor(63, 72, 205, alpha);
  1077.  
  1078. ForceMaterial(color, covered);
  1079. oDrawModelExecute(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
  1080.  
  1081. if (pLocal->GetTeamNum() == 2)
  1082. color.SetColor(247, 180, 20, alpha);
  1083. else
  1084. color.SetColor(32, 180, 57, alpha);
  1085. }
  1086. else
  1087. {
  1088. color.SetColor(255, 255, 255, 255);
  1089. }
  1090.  
  1091. ForceMaterial(color, open);
  1092. }
  1093. }
  1094. else
  1095. {
  1096. static int counter = 0;
  1097. static float colors[3] = { 1.f, 0.f, 0.f };
  1098.  
  1099. if (colors[counter] >= 1.0f)
  1100. {
  1101. colors[counter] = 1.0f;
  1102. counter += 1;
  1103. if (counter > 2)
  1104. counter = 0;
  1105. }
  1106. else
  1107. {
  1108. int prev = counter - 1;
  1109. if (prev < 0) prev = 2;
  1110. colors[prev] -= 0.05f;
  1111. colors[counter] += 0.05f;
  1112. }
  1113.  
  1114. Interfaces::RenderView->SetColorModulation(colors);
  1115. Interfaces::RenderView->SetBlend(0.5);
  1116. Interfaces::ModelRender->ForcedMaterialOverride(OpenLit);
  1117. }
  1118. }
  1119. else if (WeaponsChams != 0 && strstr(ModelName, "models/weapons/v_") && !strstr(ModelName, "arms"))
  1120. {
  1121. IMaterial *covered = ChamsStyle == 1 ? CoveredLit : CoveredFlat;
  1122. IMaterial *open = ChamsStyle == 1 ? OpenLit : OpenFlat;
  1123. if (pLocal)
  1124. {
  1125. if (pLocal->IsAlive())
  1126. {
  1127. int alpha = pLocal->HasGunGameImmunity() ? 150 : 255;
  1128.  
  1129. if (pLocal->GetTeamNum() == 2)
  1130. color.SetColor(220, 220, 220, alpha);
  1131. else
  1132. color.SetColor(220, 220, 220, alpha);
  1133.  
  1134. ForceMaterial(color, covered);
  1135. oDrawModelExecute(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
  1136.  
  1137. if (pLocal->GetTeamNum() == 2)
  1138. color.SetColor(220, 220, 220, alpha);
  1139. else
  1140. color.SetColor(220, 220, 220, alpha);
  1141. }
  1142. else
  1143. {
  1144. color.SetColor(255, 255, 255, 255);
  1145. }
  1146.  
  1147. ForceMaterial(color, open);
  1148. }
  1149. }
  1150. }
  1151.  
  1152. if (!DontDraw)
  1153. oDrawModelExecute(thisptr, ctx, state, pInfo, pCustomBoneToWorld);
  1154. Interfaces::ModelRender->ForcedMaterialOverride(NULL);
  1155. }
  1156.  
  1157. BYTE bMoveData[0x200];
  1158. void Prediction(CUserCmd* pCmd, IClientEntity* LocalPlayer)
  1159. {
  1160. if (Interfaces::MoveHelper && Menu::Window.RageBotTab.EnginePrediction.GetState() && LocalPlayer->IsAlive())
  1161. {
  1162. float curtime = Interfaces::Globals->curtime;
  1163. float frametime = Interfaces::Globals->frametime;
  1164. int iFlags = LocalPlayer->GetFlags();
  1165.  
  1166. Interfaces::Globals->curtime = (float)LocalPlayer->GetTickBase() * Interfaces::Globals->interval_per_tick;
  1167. Interfaces::Globals->frametime = Interfaces::Globals->interval_per_tick;
  1168.  
  1169. Interfaces::MoveHelper->SetHost(LocalPlayer);
  1170.  
  1171. Interfaces::Prediction1->SetupMove(LocalPlayer, pCmd, nullptr, bMoveData);
  1172. Interfaces::GameMovement->ProcessMovement(LocalPlayer, bMoveData);
  1173. Interfaces::Prediction1->FinishMove(LocalPlayer, pCmd, bMoveData);
  1174.  
  1175. Interfaces::MoveHelper->SetHost(0);
  1176.  
  1177. Interfaces::Globals->curtime = curtime;
  1178. Interfaces::Globals->frametime = frametime;
  1179. *LocalPlayer->GetPointerFlags() = iFlags;
  1180. }
  1181. }
  1182.  
  1183. int RandomInt(int min, int max)
  1184. {
  1185. return rand() % max + min;
  1186. }
  1187.  
  1188. bool bGlovesNeedUpdate;
  1189. void ApplyCustomGloves(IClientEntity* pLocal)
  1190. {
  1191. if (Menu::Window.ColorsTab.EnableGloves.GetState())
  1192. {
  1193. if (!Interfaces::Engine->IsConnected() || !Interfaces::Engine->IsInGame())
  1194. return;
  1195.  
  1196. if (bGlovesNeedUpdate || !pLocal->IsAlive())
  1197. {
  1198. DWORD* hMyWearables = (DWORD*)((size_t)pLocal + 0x2EF4);
  1199.  
  1200. if (!Interfaces::EntList->GetClientEntity(hMyWearables[0] & 0xFFF))
  1201. {
  1202. for (ClientClass* pClass = Interfaces::Client->GetAllClasses(); pClass; pClass = pClass->m_pNext)
  1203. {
  1204. if (pClass->m_ClassID != (int)CSGOClassID::CEconWearable)
  1205. continue;
  1206.  
  1207. int iEntry = (Interfaces::EntList->GetHighestEntityIndex() + 1);
  1208. int iSerial = RandomInt(0x0, 0xFFF);
  1209.  
  1210. pClass->m_pCreateFn(iEntry, iSerial);
  1211. hMyWearables[0] = iEntry | (iSerial << 16);
  1212.  
  1213. break;
  1214. }
  1215. }
  1216.  
  1217. player_info_t LocalPlayerInfo;
  1218. Interfaces::Engine->GetPlayerInfo(Interfaces::Engine->GetLocalPlayer(), &LocalPlayerInfo);
  1219.  
  1220. CBaseCombatWeapon* glovestochange = (CBaseCombatWeapon*)Interfaces::EntList->GetClientEntity(hMyWearables[0] & 0xFFF);
  1221.  
  1222. if (!glovestochange)
  1223. return;
  1224.  
  1225.  
  1226. switch (Menu::Window.ColorsTab.GloveModel.GetIndex())
  1227. {
  1228. case 1:
  1229. {
  1230. *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5027;
  1231. glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex("models/weapons/v_models/arms/glove_bloodhound/v_glove_bloodhound.mdl"));
  1232. break;
  1233. }
  1234. case 2:
  1235. {
  1236. *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5032;
  1237. glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex("models/weapons/v_models/arms/glove_handwrap_leathery/v_glove_handwrap_leathery.mdl"));
  1238. break;
  1239. }
  1240. case 3:
  1241. {
  1242. *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5031;
  1243. glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex("models/weapons/v_models/arms/glove_slick/v_glove_slick.mdl"));
  1244. break;
  1245. }
  1246. case 4:
  1247. {
  1248. *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5030;
  1249. glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex("models/weapons/v_models/arms/glove_sporty/v_glove_sporty.mdl"));
  1250. break;
  1251. }
  1252. case 5:
  1253. {
  1254. *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5033;
  1255. glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex("models/weapons/v_models/arms/glove_motorcycle/v_glove_motorcycle.mdl"));
  1256. break;
  1257. }
  1258. case 6:
  1259. {
  1260. *glovestochange->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 5034;
  1261. glovestochange->SetModelIndex(Interfaces::ModelInfo->GetModelIndex("models/weapons/v_models/arms/glove_specialist/v_glove_specialist.mdl"));
  1262. break;
  1263. }
  1264. default:
  1265. break;
  1266. }
  1267.  
  1268. switch (Menu::Window.ColorsTab.GloveSkin.GetIndex())
  1269. {
  1270. case 0:
  1271. break;
  1272. case 1:
  1273. *glovestochange->FallbackPaintKit() = 10007;
  1274. break;
  1275. case 2:
  1276. *glovestochange->FallbackPaintKit() = 10006;
  1277. break;
  1278. case 3:
  1279. *glovestochange->FallbackPaintKit() = 10039;
  1280. break;
  1281. case 4:
  1282. *glovestochange->FallbackPaintKit() = 10008;
  1283. break;
  1284. case 5:
  1285. *glovestochange->FallbackPaintKit() = 10021;
  1286. break;
  1287. case 6:
  1288. *glovestochange->FallbackPaintKit() = 10036;
  1289. break;
  1290. case 7:
  1291. *glovestochange->FallbackPaintKit() = 10009;
  1292. break;
  1293. case 8:
  1294. *glovestochange->FallbackPaintKit() = 10010;
  1295. break;
  1296. case 9:
  1297. *glovestochange->FallbackPaintKit() = 10016;
  1298. break;
  1299. case 10:
  1300. *glovestochange->FallbackPaintKit() = 10013;
  1301. break;
  1302. case 11:
  1303. *glovestochange->FallbackPaintKit() = 10040;
  1304. break;
  1305. case 12:
  1306. *glovestochange->FallbackPaintKit() = 10015;
  1307. break;
  1308. case 13:
  1309. *glovestochange->FallbackPaintKit() = 10037;
  1310. break;
  1311. case 14:
  1312. *glovestochange->FallbackPaintKit() = 10038;
  1313. break;
  1314. case 15:
  1315. *glovestochange->FallbackPaintKit() = 10018;
  1316. break;
  1317. case 16:
  1318. *glovestochange->FallbackPaintKit() = 10019;
  1319. break;
  1320. case 17:
  1321. *glovestochange->FallbackPaintKit() = 10026;
  1322. break;
  1323. case 18:
  1324. *glovestochange->FallbackPaintKit() = 10028;
  1325. break;
  1326. case 19:
  1327. *glovestochange->FallbackPaintKit() = 10027;
  1328. break;
  1329. case 20:
  1330. *glovestochange->FallbackPaintKit() = 10024;
  1331. break;
  1332. case 21:
  1333. *glovestochange->FallbackPaintKit() = 10033;
  1334. break;
  1335. case 22:
  1336. *glovestochange->FallbackPaintKit() = 10034;
  1337. break;
  1338. case 23:
  1339. *glovestochange->FallbackPaintKit() = 10035;
  1340. break;
  1341. case 24:
  1342. *glovestochange->FallbackPaintKit() = 10030;
  1343. break;
  1344. }
  1345.  
  1346. *glovestochange->m_AttributeManager()->m_Item()->ItemIDHigh() = -1;
  1347. *glovestochange->FallbackWear() = 0.001f;
  1348. *glovestochange->m_AttributeManager()->m_Item()->AccountID() = LocalPlayerInfo.xuidlow;
  1349.  
  1350.  
  1351. glovestochange->PreDataUpdate(0);
  1352. if (pLocal->IsAlive())
  1353. {
  1354. bGlovesNeedUpdate = false;
  1355. }
  1356. else
  1357. {
  1358. bGlovesNeedUpdate = true;
  1359. }
  1360. }
  1361. }
  1362. }
  1363.  
  1364. void __stdcall Hooked_FrameStageNotify(ClientFrameStage_t curStage)
  1365. {
  1366. DWORD eyeangles = NetVar.GetNetVar(0xBFEA4E7B);
  1367. IClientEntity *pLocal = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  1368. IClientEntity* pEntity;
  1369.  
  1370. if (Interfaces::Engine->IsConnected() && Interfaces::Engine->IsInGame() && curStage == FRAME_RENDER_START)
  1371. {
  1372.  
  1373. if (pLocal->IsAlive())
  1374. {
  1375. if (*(bool*)((DWORD)Interfaces::pInput + 0xA5))
  1376. *(Vector*)((DWORD)pLocal + 0x31C8) = LastAngleAA;
  1377. }
  1378.  
  1379. int thirdpersonKey = Menu::Window.MiscTab.OtherThirdpersonKey.GetKey();
  1380. if (thirdpersonKey > 0 && GUI.GetKeyPress(thirdpersonKey))
  1381. {
  1382. thirdpersonBool = !thirdpersonBool;
  1383. }
  1384.  
  1385. int FlipKey = Menu::Window.RageBotTab.FlipKey.GetKey();
  1386. if (FlipKey > 0 && GUI.GetKeyPress(FlipKey))
  1387. {
  1388. AntiAimFlip = !AntiAimFlip;
  1389. }
  1390.  
  1391.  
  1392.  
  1393. if (thirdpersonBool)
  1394. {
  1395. static bool rekt = false;
  1396. if (!rekt)
  1397. {
  1398. ConVar* sv_cheats = Interfaces::CVar->FindVar("sv_cheats");
  1399. SpoofedConvar* sv_cheats_spoofed = new SpoofedConvar(sv_cheats);
  1400. sv_cheats_spoofed->SetInt(1);
  1401. rekt = true;
  1402. }
  1403. }
  1404. static bool rekt1 = false;
  1405. if (thirdpersonBool && pLocal->IsAlive() && pLocal->IsScoped() == 0)
  1406. {
  1407. if (!rekt1)
  1408. {
  1409. Interfaces::Engine->ClientCmd_Unrestricted("thirdperson");
  1410. rekt1 = true;
  1411. }
  1412. }
  1413. else if (!thirdpersonBool)
  1414. {
  1415. rekt1 = false;
  1416. }
  1417.  
  1418. static bool rekt = false;
  1419. if (!thirdpersonBool || pLocal->IsAlive() == 0)
  1420. {
  1421. if (!rekt)
  1422. {
  1423. Interfaces::Engine->ClientCmd_Unrestricted("firstperson");
  1424. rekt = true;
  1425. }
  1426. }
  1427. else if (thirdpersonBool || pLocal->IsAlive() || pLocal->IsScoped() == 0)
  1428. {
  1429. rekt = false;
  1430. }
  1431.  
  1432. static bool meme = false;
  1433. if (thirdpersonBool && pLocal->IsScoped() == 0)
  1434. {
  1435. if (!meme)
  1436. {
  1437. Interfaces::Engine->ClientCmd_Unrestricted("thirdperson");
  1438. meme = true;
  1439. }
  1440. }
  1441. else if (pLocal->IsScoped())
  1442. {
  1443. meme = false;
  1444. }
  1445.  
  1446. static bool kek = false;
  1447. if (thirdpersonBool && pLocal->IsAlive())
  1448. {
  1449. if (!kek)
  1450. {
  1451. Interfaces::Engine->ClientCmd_Unrestricted("thirdperson");
  1452. kek = true;
  1453. }
  1454. }
  1455. else if (pLocal->IsAlive() == 0)
  1456. {
  1457. kek = false;
  1458. }
  1459. }
  1460.  
  1461. if (Menu::Window.RageBotTab.PVSFix.GetState())
  1462. {
  1463. for (int i = 1; i < Interfaces::Globals->maxClients; i++)
  1464. {
  1465. if (i == Interfaces::Engine->GetLocalPlayer()) continue;
  1466. IClientEntity* pCurEntity = Interfaces::EntList->GetClientEntity(i);
  1467. if (!pCurEntity) continue;
  1468. *(int*)((uintptr_t)pCurEntity + 0xA30) = Interfaces::Globals->framecount;
  1469. *(int*)((uintptr_t)pCurEntity + 0xA28) = 0;
  1470. }
  1471. }
  1472.  
  1473. if (Interfaces::Engine->IsConnected() && Interfaces::Engine->IsInGame() && curStage == FRAME_NET_UPDATE_POSTDATAUPDATE_START)
  1474. {
  1475. IClientEntity *pLocal = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  1476. ResolverSetup::GetInst().FSN(pEntity, curStage);
  1477. /*int iBayonet = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_bayonet.mdl");
  1478. int iButterfly = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_butterfly.mdl"); AVOZ HOOK
  1479. int iFlip = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_flip.mdl");
  1480. int iGut = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_gut.mdl");
  1481. int iKarambit = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_karam.mdl");
  1482. int iM9Bayonet = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_m9_bay.mdl");
  1483. int iHuntsman = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_tactical.mdl");
  1484. int iFalchion = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_falchion_advanced.mdl");
  1485. int iDagger = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_push.mdl");
  1486. int iBowie = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_survival_bowie.mdl");
  1487. int iGunGame = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_gg.mdl");*/
  1488. int iBayonet = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_bayonet.mdl");
  1489. int iButterfly = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_butterfly.mdl");
  1490. int iFlip = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_flip.mdl");
  1491. int iGut = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_gut.mdl");
  1492. int iKarambit = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_karam.mdl");
  1493. int iM9Bayonet = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_m9_bay.mdl");
  1494. int iHuntsman = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_tactical.mdl");
  1495. int iFalchion = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_falchion_advanced.mdl");
  1496. int iDagger = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_push.mdl");
  1497. int iBowie = Interfaces::ModelInfo->GetModelIndex("models/weapons/v_knife_survival_bowie.mdl");
  1498.  
  1499. int Model = Menu::Window.SkinchangerTab.KnifeModel.GetIndex();
  1500. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  1501.  
  1502. for (int i = 0; i <= Interfaces::EntList->GetHighestEntityIndex(); i++)
  1503. {
  1504. IClientEntity *pEntity = Interfaces::EntList->GetClientEntity(i);
  1505.  
  1506. if (pEntity)
  1507. {
  1508. ApplyCustomGloves(pLocal);
  1509.  
  1510. ULONG hOwnerEntity = *(PULONG)((DWORD)pEntity + 0x148);
  1511.  
  1512. IClientEntity* pOwner = Interfaces::EntList->GetClientEntityFromHandle((HANDLE)hOwnerEntity);
  1513.  
  1514. if (pOwner)
  1515. {
  1516. if (pOwner == pLocal)
  1517. {
  1518. std::string sWeapon = Interfaces::ModelInfo->GetModelName(pEntity->GetModel());
  1519.  
  1520. auto weps = pLocal->Weapons();
  1521. for (size_t i = 0; weps[i] != nullptr; i++) {
  1522. auto pWeapons = reinterpret_cast<CBaseCombatWeapon*>(Interfaces::EntList->GetClientEntityFromHandle(weps[i]));
  1523. }
  1524.  
  1525. if (sWeapon.find("c4_planted", 0) != std::string::npos)
  1526. continue;
  1527.  
  1528. if (sWeapon.find("thrown", 0) != std::string::npos)
  1529. continue;
  1530.  
  1531. if (sWeapon.find("smokegrenade", 0) != std::string::npos)
  1532. continue;
  1533.  
  1534. if (sWeapon.find("flashbang", 0) != std::string::npos)
  1535. continue;
  1536.  
  1537. if (sWeapon.find("fraggrenade", 0) != std::string::npos)
  1538. continue;
  1539.  
  1540. if (sWeapon.find("molotov", 0) != std::string::npos)
  1541. continue;
  1542.  
  1543. if (sWeapon.find("decoy", 0) != std::string::npos)
  1544. continue;
  1545.  
  1546. if (sWeapon.find("incendiarygrenade", 0) != std::string::npos)
  1547. continue;
  1548.  
  1549. if (sWeapon.find("ied", 0) != std::string::npos)
  1550. continue;
  1551.  
  1552. if (sWeapon.find("w_eq_", 0) != std::string::npos)
  1553. continue;
  1554.  
  1555. CBaseCombatWeapon* pWeapon = (CBaseCombatWeapon*)pEntity;
  1556.  
  1557. ClientClass *pClass = Interfaces::Client->GetAllClasses();
  1558.  
  1559. if (Menu::Window.SkinchangerTab.SkinEnable.GetState())
  1560. {
  1561. int Model = Menu::Window.SkinchangerTab.KnifeModel.GetIndex();
  1562. int M41S = Menu::Window.SkinchangerTab.M41SSkin.GetIndex();
  1563. int M4A4 = Menu::Window.SkinchangerTab.M4A4Skin.GetIndex();
  1564. int AK47 = Menu::Window.SkinchangerTab.AK47Skin.GetIndex();
  1565. int AWP = Menu::Window.SkinchangerTab.AWPSkin.GetIndex();
  1566. int GLOCK = Menu::Window.SkinchangerTab.GLOCKSkin.GetIndex();
  1567. int USPS = Menu::Window.SkinchangerTab.USPSSkin.GetIndex();
  1568. int DEAGLE = Menu::Window.SkinchangerTab.DEAGLESkin.GetIndex();
  1569. int FIVE7 = Menu::Window.SkinchangerTab.FIVESEVENSkin.GetIndex();
  1570. int AUG = Menu::Window.SkinchangerTab.AUGSkin.GetIndex();
  1571. int FAMAS = Menu::Window.SkinchangerTab.FAMASSkin.GetIndex();
  1572. int G3SG1 = Menu::Window.SkinchangerTab.G3SG1Skin.GetIndex();
  1573. int Galil = Menu::Window.SkinchangerTab.GALILSkin.GetIndex();
  1574. int M249 = Menu::Window.SkinchangerTab.M249Skin.GetIndex();
  1575. int MAC10 = Menu::Window.SkinchangerTab.MAC10Skin.GetIndex();
  1576. int P90 = Menu::Window.SkinchangerTab.P90Skin.GetIndex();
  1577. int UMP45 = Menu::Window.SkinchangerTab.UMP45Skin.GetIndex();
  1578. int XM1014 = Menu::Window.SkinchangerTab.XM1014Skin.GetIndex();
  1579. int BIZON = Menu::Window.SkinchangerTab.BIZONSkin.GetIndex();
  1580. int MAG7 = Menu::Window.SkinchangerTab.MAG7Skin.GetIndex();
  1581. int NEGEV = Menu::Window.SkinchangerTab.NEGEVSkin.GetIndex();
  1582. int SAWEDOFF = Menu::Window.SkinchangerTab.SAWEDOFFSkin.GetIndex();
  1583. int TEC9 = Menu::Window.SkinchangerTab.TECNINESkin.GetIndex();
  1584. int P2000 = Menu::Window.SkinchangerTab.P2000Skin.GetIndex();
  1585. int MP7 = Menu::Window.SkinchangerTab.MP7Skin.GetIndex();
  1586. int MP9 = Menu::Window.SkinchangerTab.MP9Skin.GetIndex();
  1587. int NOVA = Menu::Window.SkinchangerTab.NOVASkin.GetIndex();
  1588. int P250 = Menu::Window.SkinchangerTab.P250Skin.GetIndex();
  1589. int SCAR20 = Menu::Window.SkinchangerTab.SCAR20Skin.GetIndex();
  1590. int SG553 = Menu::Window.SkinchangerTab.SG553Skin.GetIndex();
  1591. int SSG08 = Menu::Window.SkinchangerTab.SSG08Skin.GetIndex();
  1592. int Magnum = Menu::Window.SkinchangerTab.RevolverSkin.GetIndex();
  1593. int Duals = Menu::Window.SkinchangerTab.DUALSSkin.GetIndex();
  1594.  
  1595. if (pEntity->GetClientClass()->m_ClassID != (int)CSGOClassID::CKnife)
  1596. {
  1597. if (Menu::Window.SkinchangerTab.SkinName.getText().length() > 1)
  1598. {
  1599. auto pCustomName = MakePtr(char*, pWeapon, 0x301C);
  1600. strcpy_s(pCustomName, 32, Menu::Window.SkinchangerTab.SkinName.getText().c_str());
  1601. }
  1602. }
  1603.  
  1604. if (Menu::Window.SkinchangerTab.StatTrackAmount.getText().c_str() != NULL && Menu::Window.SkinchangerTab.StatTrackAmount.getText().c_str() != "")
  1605. {
  1606. int st = atoi(Menu::Window.SkinchangerTab.StatTrackAmount.getText().c_str());
  1607.  
  1608. if (Menu::Window.SkinchangerTab.StatTrakEnable.GetState())
  1609. *pWeapon->FallbackStatTrak() = st;
  1610. }
  1611.  
  1612. int weapon = *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex();
  1613.  
  1614. switch (weapon)
  1615. {
  1616. case 7: // AK47
  1617. {
  1618. switch (AK47)
  1619. {
  1620. case 0:
  1621. *pWeapon->FallbackPaintKit() = 341;
  1622. break;
  1623. case 1:
  1624. *pWeapon->FallbackPaintKit() = 14;
  1625. break;
  1626. case 2:
  1627. *pWeapon->FallbackPaintKit() = 44;
  1628. break;
  1629. case 3:
  1630. *pWeapon->FallbackPaintKit() = 172;
  1631. break;
  1632. case 4:
  1633. *pWeapon->FallbackPaintKit() = 180;
  1634. break;
  1635. case 5:
  1636. *pWeapon->FallbackPaintKit() = 394;
  1637. break;
  1638. case 6:
  1639. *pWeapon->FallbackPaintKit() = 300;
  1640. break;
  1641. case 7:
  1642. *pWeapon->FallbackPaintKit() = 226;
  1643. break;
  1644. case 8:
  1645. *pWeapon->FallbackPaintKit() = 282;
  1646. break;
  1647. case 9:
  1648. *pWeapon->FallbackPaintKit() = 302;
  1649. break;
  1650. case 10:
  1651. *pWeapon->FallbackPaintKit() = 316;
  1652. break;
  1653. case 11:
  1654. *pWeapon->FallbackPaintKit() = 340;
  1655. break;
  1656. case 12:
  1657. *pWeapon->FallbackPaintKit() = 380;
  1658. break;
  1659. case 13:
  1660. *pWeapon->FallbackPaintKit() = 656;
  1661. break;
  1662. case 14:
  1663. *pWeapon->FallbackPaintKit() = 456;
  1664. break;
  1665. case 15:
  1666. *pWeapon->FallbackPaintKit() = 474;
  1667. break;
  1668. case 16:
  1669. *pWeapon->FallbackPaintKit() = 490;
  1670. break;
  1671. case 17:
  1672. *pWeapon->FallbackPaintKit() = 506;
  1673. break;
  1674. case 18:
  1675. *pWeapon->FallbackPaintKit() = 524;
  1676. break;
  1677. case 19:
  1678. *pWeapon->FallbackPaintKit() = 600;
  1679. break;
  1680. case 20:
  1681. *pWeapon->FallbackPaintKit() = 639;
  1682. break;
  1683. default:
  1684. break;
  1685. }
  1686. }
  1687. break;
  1688. case 16: // M4A4
  1689. {
  1690. switch (M4A4)
  1691. {
  1692. case 0:
  1693. *pWeapon->FallbackPaintKit() = 155;
  1694. break;
  1695. case 1:
  1696. *pWeapon->FallbackPaintKit() = 187;
  1697. break;
  1698. case 2:
  1699. *pWeapon->FallbackPaintKit() = 255;
  1700. break;
  1701. case 3:
  1702. *pWeapon->FallbackPaintKit() = 309;
  1703. break;
  1704. case 4:
  1705. *pWeapon->FallbackPaintKit() = 215;
  1706. break;
  1707. case 5:
  1708. *pWeapon->FallbackPaintKit() = 336;
  1709. break;
  1710. case 6:
  1711. *pWeapon->FallbackPaintKit() = 384;
  1712. break;
  1713. case 7:
  1714. *pWeapon->FallbackPaintKit() = 400;
  1715. break;
  1716. case 8:
  1717. *pWeapon->FallbackPaintKit() = 449;
  1718. break;
  1719. case 9:
  1720. *pWeapon->FallbackPaintKit() = 471;
  1721. break;
  1722. case 10:
  1723. *pWeapon->FallbackPaintKit() = 480;
  1724. break;
  1725. case 11:
  1726. *pWeapon->FallbackPaintKit() = 512;
  1727. break;
  1728. case 12:
  1729. *pWeapon->FallbackPaintKit() = 533;
  1730. break;
  1731. case 13:
  1732. *pWeapon->FallbackPaintKit() = 588;
  1733. break;
  1734. case 14:
  1735. *pWeapon->FallbackPaintKit() = 632;
  1736. break;
  1737. case 15:
  1738. *pWeapon->FallbackPaintKit() = 664;
  1739. break;
  1740. default:
  1741. break;
  1742. }
  1743. }
  1744. break;
  1745. case 60:
  1746. {
  1747. switch (M41S)
  1748. {
  1749. case 0:
  1750. *pWeapon->FallbackPaintKit() = 60;
  1751. break;
  1752. case 1:
  1753. *pWeapon->FallbackPaintKit() = 430;
  1754. break;
  1755. case 2:
  1756. *pWeapon->FallbackPaintKit() = 644;
  1757. break;
  1758. case 3:
  1759. *pWeapon->FallbackPaintKit() = 235;
  1760. break;
  1761. case 4:
  1762. *pWeapon->FallbackPaintKit() = 254;
  1763. break;
  1764. case 5:
  1765. *pWeapon->FallbackPaintKit() = 189;
  1766. break;
  1767. case 6:
  1768. *pWeapon->FallbackPaintKit() = 301;
  1769. break;
  1770. case 7:
  1771. *pWeapon->FallbackPaintKit() = 217;
  1772. break;
  1773. case 8:
  1774. *pWeapon->FallbackPaintKit() = 257;
  1775. break;
  1776. case 9:
  1777. *pWeapon->FallbackPaintKit() = 321;
  1778. break;
  1779. case 10:
  1780. *pWeapon->FallbackPaintKit() = 326;
  1781. break;
  1782. case 11:
  1783. *pWeapon->FallbackPaintKit() = 360;
  1784. break;
  1785. case 12:
  1786. *pWeapon->FallbackPaintKit() = 383;
  1787. break;
  1788. case 13:
  1789. *pWeapon->FallbackPaintKit() = 440;
  1790. break;
  1791. case 14:
  1792. *pWeapon->FallbackPaintKit() = 445;
  1793. break;
  1794. case 15:
  1795. *pWeapon->FallbackPaintKit() = 497;
  1796. break;
  1797. case 16:
  1798. *pWeapon->FallbackPaintKit() = 548;
  1799. break;
  1800. case 17:
  1801. *pWeapon->FallbackPaintKit() = 587;
  1802. break;
  1803. case 18:
  1804. *pWeapon->FallbackPaintKit() = 631;
  1805. break;
  1806. default:
  1807. break;
  1808. }
  1809. }
  1810. break;
  1811. case 9:
  1812. {
  1813. switch (AWP)
  1814. {
  1815. case 0:
  1816. *pWeapon->FallbackPaintKit() = 174;
  1817. break;
  1818. case 1:
  1819. *pWeapon->FallbackPaintKit() = 344;
  1820. break;
  1821. case 2:
  1822. *pWeapon->FallbackPaintKit() = 84;
  1823. break;
  1824. case 3:
  1825. *pWeapon->FallbackPaintKit() = 640;
  1826. break;
  1827. case 4:
  1828. *pWeapon->FallbackPaintKit() = 51;
  1829. break;
  1830. case 5:
  1831. *pWeapon->FallbackPaintKit() = 181;
  1832. break;
  1833. case 6:
  1834. *pWeapon->FallbackPaintKit() = 259;
  1835. break;
  1836. case 7:
  1837. *pWeapon->FallbackPaintKit() = 395;
  1838. break;
  1839. case 8:
  1840. *pWeapon->FallbackPaintKit() = 212;
  1841. break;
  1842. case 9:
  1843. *pWeapon->FallbackPaintKit() = 227;
  1844. break;
  1845. case 10:
  1846. *pWeapon->FallbackPaintKit() = 251;
  1847. break;
  1848. case 11:
  1849. *pWeapon->FallbackPaintKit() = 279;
  1850. break;
  1851. case 12:
  1852. *pWeapon->FallbackPaintKit() = 662;
  1853. break;
  1854. case 13:
  1855. *pWeapon->FallbackPaintKit() = 446;
  1856. break;
  1857. case 14:
  1858. *pWeapon->FallbackPaintKit() = 451;
  1859. break;
  1860. case 15:
  1861. *pWeapon->FallbackPaintKit() = 475;
  1862. break;
  1863. case 16:
  1864. *pWeapon->FallbackPaintKit() = 525;
  1865. break;
  1866. default:
  1867. break;
  1868. }
  1869. }
  1870. break;
  1871. case 61:
  1872. {
  1873. switch (USPS)
  1874. {
  1875. case 0:
  1876. *pWeapon->FallbackPaintKit() = 60;
  1877. break;
  1878. case 1:
  1879. *pWeapon->FallbackPaintKit() = 183;
  1880. break;
  1881. case 2:
  1882. *pWeapon->FallbackPaintKit() = 339;
  1883. break;
  1884. case 3:
  1885. *pWeapon->FallbackPaintKit() = 217;
  1886. break;
  1887. case 4:
  1888. *pWeapon->FallbackPaintKit() = 221;
  1889. break;
  1890. case 5:
  1891. *pWeapon->FallbackPaintKit() = 653;
  1892. break;
  1893. case 6:
  1894. *pWeapon->FallbackPaintKit() = 277;
  1895. break;
  1896. case 7:
  1897. *pWeapon->FallbackPaintKit() = 290;
  1898. break;
  1899. case 8:
  1900. *pWeapon->FallbackPaintKit() = 313;
  1901. break;
  1902. case 9:
  1903. *pWeapon->FallbackPaintKit() = 318;
  1904. break;
  1905. case 10:
  1906. *pWeapon->FallbackPaintKit() = 332;
  1907. break;
  1908. case 11:
  1909. *pWeapon->FallbackPaintKit() = 364;
  1910. break;
  1911. case 12:
  1912. *pWeapon->FallbackPaintKit() = 454;
  1913. break;
  1914. case 13:
  1915. *pWeapon->FallbackPaintKit() = 489;
  1916. break;
  1917. case 14:
  1918. *pWeapon->FallbackPaintKit() = 504;
  1919. break;
  1920. case 15:
  1921. *pWeapon->FallbackPaintKit() = 540;
  1922. break;
  1923. case 16:
  1924. *pWeapon->FallbackPaintKit() = 637;
  1925. break;
  1926. default:
  1927. break;
  1928. }
  1929. }
  1930. break;
  1931. case 4:
  1932. {
  1933. switch (GLOCK)
  1934. {
  1935. case 0:
  1936. *pWeapon->FallbackPaintKit() = 586;
  1937. break;
  1938. case 1:
  1939. *pWeapon->FallbackPaintKit() = 437;
  1940. break;
  1941. case 2:
  1942. *pWeapon->FallbackPaintKit() = 38;
  1943. break;
  1944. case 3:
  1945. *pWeapon->FallbackPaintKit() = 48;
  1946. break;
  1947. case 4:
  1948. *pWeapon->FallbackPaintKit() = 353;
  1949. break;
  1950. case 5:
  1951. *pWeapon->FallbackPaintKit() = 532;
  1952. break;
  1953. case 6:
  1954. *pWeapon->FallbackPaintKit() = 381;
  1955. break;
  1956. case 7:
  1957. *pWeapon->FallbackPaintKit() = 367;
  1958. break;
  1959. case 8:
  1960. *pWeapon->FallbackPaintKit() = 607;
  1961. break;
  1962. default:
  1963. break;
  1964. }
  1965. }
  1966. break;
  1967. case 1: // Deagle
  1968. {
  1969. switch (DEAGLE)
  1970. {
  1971. case 0:
  1972. *pWeapon->FallbackPaintKit() = 37;
  1973. break;
  1974. case 1:
  1975. *pWeapon->FallbackPaintKit() = 645;
  1976. break;
  1977. case 2:
  1978. *pWeapon->FallbackPaintKit() = 527;
  1979. break;
  1980. case 3:
  1981. *pWeapon->FallbackPaintKit() = 469;
  1982. break;
  1983. default:
  1984. break;
  1985. }
  1986. }
  1987. break;
  1988. case 2: //duals
  1989. {
  1990. switch (Duals)
  1991. {
  1992. case 0:
  1993. *pWeapon->FallbackPaintKit() = 491;
  1994. break;
  1995. case 1:
  1996. *pWeapon->FallbackPaintKit() = 28;
  1997. break;
  1998. case 2:
  1999. *pWeapon->FallbackPaintKit() = 447;
  2000. break;
  2001. case 3:
  2002. *pWeapon->FallbackPaintKit() = 220;
  2003. break;
  2004. case 4:
  2005. *pWeapon->FallbackPaintKit() = 261;
  2006. break;
  2007. case 5:
  2008. *pWeapon->FallbackPaintKit() = 396;
  2009. break;
  2010. default:
  2011. break;
  2012. }
  2013. }
  2014. break;
  2015. case 3: // Five Seven
  2016. {
  2017. switch (FIVE7)
  2018. {
  2019. case 0:
  2020. *pWeapon->FallbackPaintKit() = 44;
  2021. break;
  2022. case 1:
  2023. *pWeapon->FallbackPaintKit() = 352;
  2024. break;
  2025. case 2:
  2026. *pWeapon->FallbackPaintKit() = 510;
  2027. break;
  2028. case 3:
  2029. *pWeapon->FallbackPaintKit() = 530;
  2030. break;
  2031. case 4:
  2032. *pWeapon->FallbackPaintKit() = 464;
  2033. break;
  2034. case 5:
  2035. *pWeapon->FallbackPaintKit() = 427;
  2036. break;
  2037. case 6:
  2038. *pWeapon->FallbackPaintKit() = 274;
  2039. break;
  2040. case 7:
  2041. *pWeapon->FallbackPaintKit() = 660;
  2042. break;
  2043. default:
  2044. break;
  2045. }
  2046. }
  2047. break;
  2048. case 8: // AUG
  2049. {
  2050. switch (AUG)
  2051. {
  2052. case 0:
  2053. *pWeapon->FallbackPaintKit() = 9;
  2054. break;
  2055. case 1:
  2056. *pWeapon->FallbackPaintKit() = 33;
  2057. break;
  2058. case 2:
  2059. *pWeapon->FallbackPaintKit() = 280;
  2060. break;
  2061. case 3:
  2062. *pWeapon->FallbackPaintKit() = 305;
  2063. break;
  2064. case 4:
  2065. *pWeapon->FallbackPaintKit() = 375;
  2066. break;
  2067. case 5:
  2068. *pWeapon->FallbackPaintKit() = 442;
  2069. break;
  2070. case 6:
  2071. *pWeapon->FallbackPaintKit() = 444;
  2072. break;
  2073. case 7:
  2074. *pWeapon->FallbackPaintKit() = 455;
  2075. break;
  2076. case 8:
  2077. *pWeapon->FallbackPaintKit() = 507;
  2078. break;
  2079. case 9:
  2080. *pWeapon->FallbackPaintKit() = 541;
  2081. break;
  2082. case 10:
  2083. *pWeapon->FallbackPaintKit() = 601;
  2084. break;
  2085. default:
  2086. break;
  2087. }
  2088. }
  2089. break;
  2090. case 10: // Famas
  2091. {
  2092. switch (FAMAS)
  2093. {
  2094. case 0:
  2095. *pWeapon->FallbackPaintKit() = 429;
  2096. break;
  2097. case 1:
  2098. *pWeapon->FallbackPaintKit() = 154;
  2099. break;
  2100. case 2:
  2101. *pWeapon->FallbackPaintKit() = 178;
  2102. break;
  2103. case 3:
  2104. *pWeapon->FallbackPaintKit() = 194;
  2105. break;
  2106. case 4:
  2107. *pWeapon->FallbackPaintKit() = 244;
  2108. break;
  2109. case 5:
  2110. *pWeapon->FallbackPaintKit() = 218;
  2111. break;
  2112. case 6:
  2113. *pWeapon->FallbackPaintKit() = 260;
  2114. break;
  2115. case 7:
  2116. *pWeapon->FallbackPaintKit() = 288;
  2117. break;
  2118. case 8:
  2119. *pWeapon->FallbackPaintKit() = 371;
  2120. break;
  2121. case 9:
  2122. *pWeapon->FallbackPaintKit() = 477;
  2123. break;
  2124. case 10:
  2125. *pWeapon->FallbackPaintKit() = 492;
  2126. break;
  2127. case 11:
  2128. *pWeapon->FallbackPaintKit() = 529;
  2129. break;
  2130. case 12:
  2131. *pWeapon->FallbackPaintKit() = 604;
  2132. break;
  2133. case 13:
  2134. *pWeapon->FallbackPaintKit() = 626;
  2135. break;
  2136. default:
  2137. break;
  2138. }
  2139. }
  2140. break;
  2141. case 11: // G3SG1
  2142. {
  2143. switch (G3SG1)
  2144. {
  2145. case 0:
  2146. *pWeapon->FallbackPaintKit() = 195;
  2147. break;
  2148. case 1:
  2149. *pWeapon->FallbackPaintKit() = 229;
  2150. break;
  2151. case 2:
  2152. *pWeapon->FallbackPaintKit() = 294;
  2153. break;
  2154. case 3:
  2155. *pWeapon->FallbackPaintKit() = 465;
  2156. break;
  2157. case 4:
  2158. *pWeapon->FallbackPaintKit() = 464;
  2159. break;
  2160. case 5:
  2161. *pWeapon->FallbackPaintKit() = 382;
  2162. break;
  2163. case 6:
  2164. *pWeapon->FallbackPaintKit() = 438;
  2165. break;
  2166. case 7:
  2167. *pWeapon->FallbackPaintKit() = 493;
  2168. break;
  2169. case 8:
  2170. *pWeapon->FallbackPaintKit() = 511;
  2171. break;
  2172. default:
  2173. break;
  2174. }
  2175. }
  2176. break;
  2177. case 13: // Galil
  2178. {
  2179. switch (Galil)
  2180. {
  2181. case 0:
  2182. *pWeapon->FallbackPaintKit() = 83;
  2183. break;
  2184. case 1:
  2185. *pWeapon->FallbackPaintKit() = 428;
  2186. break;
  2187. case 2:
  2188. *pWeapon->FallbackPaintKit() = 494;
  2189. break;
  2190. case 3:
  2191. *pWeapon->FallbackPaintKit() = 379;
  2192. break;
  2193. case 4:
  2194. *pWeapon->FallbackPaintKit() = 460;
  2195. break;
  2196. case 5:
  2197. *pWeapon->FallbackPaintKit() = 398;
  2198. break;
  2199. case 6:
  2200. *pWeapon->FallbackPaintKit() = 546;
  2201. break;
  2202. case 7:
  2203. *pWeapon->FallbackPaintKit() = 478;
  2204. break;
  2205. case 8:
  2206. *pWeapon->FallbackPaintKit() = 661;
  2207. break;
  2208. default:
  2209. break;
  2210. }
  2211. }
  2212. break;
  2213. case 14: // M249
  2214. {
  2215. switch (M249)
  2216. {
  2217. case 0:
  2218. *pWeapon->FallbackPaintKit() = 401;
  2219. break;
  2220. case 1:
  2221. *pWeapon->FallbackPaintKit() = 452;
  2222. break;
  2223. case 2:
  2224. *pWeapon->FallbackPaintKit() = 472;
  2225. break;
  2226. case 3:
  2227. *pWeapon->FallbackPaintKit() = 496;
  2228. break;
  2229. case 4:
  2230. *pWeapon->FallbackPaintKit() = 547;
  2231. break;
  2232. default:
  2233. break;
  2234. }
  2235. }
  2236. break;
  2237. case 17: // Mac 10
  2238. {
  2239. switch (MAC10)
  2240. {
  2241. case 0:
  2242. *pWeapon->FallbackPaintKit() = 38;
  2243. break;
  2244. case 1:
  2245. *pWeapon->FallbackPaintKit() = 433;
  2246. break;
  2247. case 2:
  2248. *pWeapon->FallbackPaintKit() = 98;
  2249. break;
  2250. case 3:
  2251. *pWeapon->FallbackPaintKit() = 157;
  2252. break;
  2253. case 4:
  2254. *pWeapon->FallbackPaintKit() = 188;
  2255. break;
  2256. case 5:
  2257. *pWeapon->FallbackPaintKit() = 337;
  2258. break;
  2259. case 6:
  2260. *pWeapon->FallbackPaintKit() = 246;
  2261. break;
  2262. case 7:
  2263. *pWeapon->FallbackPaintKit() = 284;
  2264. break;
  2265. case 8:
  2266. *pWeapon->FallbackPaintKit() = 310;
  2267. break;
  2268. case 9:
  2269. *pWeapon->FallbackPaintKit() = 333;
  2270. break;
  2271. case 10:
  2272. *pWeapon->FallbackPaintKit() = 343;
  2273. break;
  2274. case 11:
  2275. *pWeapon->FallbackPaintKit() = 372;
  2276. break;
  2277. case 12:
  2278. *pWeapon->FallbackPaintKit() = 402;
  2279. break;
  2280. case 13:
  2281. *pWeapon->FallbackPaintKit() = 498;
  2282. break;
  2283. case 14:
  2284. *pWeapon->FallbackPaintKit() = 534;
  2285. break;
  2286. default:
  2287. break;
  2288. }
  2289. }
  2290. break;
  2291. case 19: // P90
  2292. {
  2293. switch (P90)
  2294. {
  2295. case 0:
  2296. *pWeapon->FallbackPaintKit() = 67;
  2297. break;
  2298. case 1:
  2299. *pWeapon->FallbackPaintKit() = 156;
  2300. break;
  2301. case 2:
  2302. *pWeapon->FallbackPaintKit() = 516;
  2303. break;
  2304. case 3:
  2305. *pWeapon->FallbackPaintKit() = 182;
  2306. break;
  2307. case 4:
  2308. *pWeapon->FallbackPaintKit() = 359;
  2309. break;
  2310. case 5:
  2311. *pWeapon->FallbackPaintKit() = 20;
  2312. break;
  2313. default:
  2314. break;
  2315. }
  2316. }
  2317. break;
  2318. case 24: // UMP-45
  2319. {
  2320. switch (UMP45)
  2321. {
  2322. case 0:
  2323. *pWeapon->FallbackPaintKit() = 37;
  2324. break;
  2325. case 1:
  2326. *pWeapon->FallbackPaintKit() = 556;
  2327. break;
  2328. case 2:
  2329. *pWeapon->FallbackPaintKit() = 441;
  2330. break;
  2331. case 3:
  2332. *pWeapon->FallbackPaintKit() = 436;
  2333. break;
  2334. default:
  2335. break;
  2336. }
  2337. }
  2338. break;
  2339. case 25: // XM1014
  2340. {
  2341. switch (XM1014)
  2342. {
  2343. case 0:
  2344. *pWeapon->FallbackPaintKit() = 393;
  2345. break;
  2346. case 1:
  2347. *pWeapon->FallbackPaintKit() = 521;
  2348. break;
  2349. case 2:
  2350. *pWeapon->FallbackPaintKit() = 505;
  2351. break;
  2352. case 3:
  2353. *pWeapon->FallbackPaintKit() = 314;
  2354. break;
  2355. case 4:
  2356. *pWeapon->FallbackPaintKit() = 407;
  2357. break;
  2358. default:
  2359. break;
  2360. }
  2361. }
  2362. break;
  2363. case 26: // Bizon
  2364. {
  2365. switch (BIZON)
  2366. {
  2367. case 0:
  2368. *pWeapon->FallbackPaintKit() = 13;
  2369. break;
  2370. case 1:
  2371. *pWeapon->FallbackPaintKit() = 267;
  2372. break;
  2373. case 2:
  2374. *pWeapon->FallbackPaintKit() = 542;
  2375. break;
  2376. case 3:
  2377. *pWeapon->FallbackPaintKit() = 349;
  2378. break;
  2379. case 4:
  2380. *pWeapon->FallbackPaintKit() = 508;
  2381. break;
  2382. default:
  2383. break;
  2384. }
  2385. }
  2386. break;
  2387. case 27: // Mag 7
  2388. {
  2389. switch (MAG7)
  2390. {
  2391. case 0:
  2392. *pWeapon->FallbackPaintKit() = 462;
  2393. break;
  2394. case 1:
  2395. *pWeapon->FallbackPaintKit() = 39;
  2396. break;
  2397. case 2:
  2398. *pWeapon->FallbackPaintKit() = 431;
  2399. break;
  2400. default:
  2401. break;
  2402. }
  2403. }
  2404. break;
  2405. case 28: // Negev
  2406. {
  2407. switch (NEGEV)
  2408. {
  2409. case 0:
  2410. *pWeapon->FallbackPaintKit() = 28;
  2411. break;
  2412. case 1:
  2413. *pWeapon->FallbackPaintKit() = 432;
  2414. break;
  2415. case 2:
  2416. *pWeapon->FallbackPaintKit() = 317;
  2417. break;
  2418. case 3:
  2419. *pWeapon->FallbackPaintKit() = 355;
  2420. break;
  2421. case 4:
  2422. *pWeapon->FallbackPaintKit() = 369;
  2423. break;
  2424. case 5:
  2425. *pWeapon->FallbackPaintKit() = 483;
  2426. break;
  2427. case 6:
  2428. *pWeapon->FallbackPaintKit() = 514;
  2429. break;
  2430. default:
  2431. break;
  2432. }
  2433. }
  2434. break;
  2435. case 29: // Sawed Off
  2436. {
  2437. switch (SAWEDOFF)
  2438. {
  2439. case 0:
  2440. *pWeapon->FallbackPaintKit() = 405;
  2441. break;
  2442. case 1:
  2443. *pWeapon->FallbackPaintKit() = 83;
  2444. break;
  2445. case 2:
  2446. *pWeapon->FallbackPaintKit() = 38;
  2447. break;
  2448. case 3:
  2449. *pWeapon->FallbackPaintKit() = 256;
  2450. break;
  2451. case 4:
  2452. *pWeapon->FallbackPaintKit() = 638;
  2453. break;
  2454. case 5:
  2455. *pWeapon->FallbackPaintKit() = 390;
  2456. break;
  2457. default:
  2458. break;
  2459. }
  2460. }
  2461. break;
  2462. case 30: // Tec 9
  2463. {
  2464. switch (TEC9)
  2465. {
  2466. case 0:
  2467. *pWeapon->FallbackPaintKit() = 463;
  2468. break;
  2469. case 1:
  2470. *pWeapon->FallbackPaintKit() = 303;
  2471. break;
  2472. case 2:
  2473. *pWeapon->FallbackPaintKit() = 248;
  2474. break;
  2475. case 3:
  2476. *pWeapon->FallbackPaintKit() = 520;
  2477. break;
  2478. case 4:
  2479. *pWeapon->FallbackPaintKit() = 374;
  2480. break;
  2481. case 5:
  2482. *pWeapon->FallbackPaintKit() = 614;
  2483. break;
  2484. case 6:
  2485. *pWeapon->FallbackPaintKit() = 555;
  2486. break;
  2487. case 7:
  2488. *pWeapon->FallbackPaintKit() = 459;
  2489. break;
  2490. case 8:
  2491. *pWeapon->FallbackPaintKit() = 179;
  2492. break;
  2493. default:
  2494. break;
  2495. }
  2496. }
  2497. break;
  2498. case 32: // P2000
  2499. {
  2500. switch (P2000)
  2501. {
  2502. case 0:
  2503. *pWeapon->FallbackPaintKit() = 485;
  2504. break;
  2505. case 1:
  2506. *pWeapon->FallbackPaintKit() = 184;
  2507. break;
  2508. case 2:
  2509. *pWeapon->FallbackPaintKit() = 211;
  2510. break;
  2511. case 3:
  2512. *pWeapon->FallbackPaintKit() = 389;
  2513. break;
  2514. case 4:
  2515. *pWeapon->FallbackPaintKit() = 591;
  2516. break;
  2517. case 5:
  2518. *pWeapon->FallbackPaintKit() = 246;
  2519. break;
  2520. default:
  2521. break;
  2522. }
  2523. }
  2524. break;
  2525. case 33: // MP7
  2526. {
  2527. switch (MP7)
  2528. {
  2529. case 0:
  2530. *pWeapon->FallbackPaintKit() = 102;
  2531. break;
  2532. case 1:
  2533. *pWeapon->FallbackPaintKit() = 481;
  2534. break;
  2535. case 2:
  2536. *pWeapon->FallbackPaintKit() = 536;
  2537. break;
  2538. default:
  2539. break;
  2540. }
  2541. }
  2542. break;
  2543. case 34: // MP9
  2544. {
  2545. switch (MP9)
  2546. {
  2547. case 0:
  2548. *pWeapon->FallbackPaintKit() = 482;
  2549. break;
  2550. case 1:
  2551. *pWeapon->FallbackPaintKit() = 33;
  2552. break;
  2553. default:
  2554. break;
  2555. }
  2556. }
  2557. break;
  2558. case 35: // Nova
  2559. {
  2560. switch (NOVA)
  2561. {
  2562. case 0:
  2563. *pWeapon->FallbackPaintKit() = 3;
  2564. break;
  2565. case 1:
  2566. *pWeapon->FallbackPaintKit() = 166;
  2567. break;
  2568. case 2:
  2569. *pWeapon->FallbackPaintKit() = 164;
  2570. break;
  2571. case 3:
  2572. *pWeapon->FallbackPaintKit() = 25;
  2573. break;
  2574. case 4:
  2575. *pWeapon->FallbackPaintKit() = 62;
  2576. break;
  2577. case 5:
  2578. *pWeapon->FallbackPaintKit() = 99;
  2579. break;
  2580. case 6:
  2581. *pWeapon->FallbackPaintKit() = 107;
  2582. break;
  2583. case 7:
  2584. *pWeapon->FallbackPaintKit() = 158;
  2585. break;
  2586. case 8:
  2587. *pWeapon->FallbackPaintKit() = 170;
  2588. break;
  2589. case 9:
  2590. *pWeapon->FallbackPaintKit() = 191;
  2591. break;
  2592. case 10:
  2593. *pWeapon->FallbackPaintKit() = 214;
  2594. break;
  2595. case 11:
  2596. *pWeapon->FallbackPaintKit() = 225;
  2597. break;
  2598. case 12:
  2599. *pWeapon->FallbackPaintKit() = 263;
  2600. break;
  2601. case 13:
  2602. *pWeapon->FallbackPaintKit() = 286;
  2603. break;
  2604. case 14:
  2605. *pWeapon->FallbackPaintKit() = 294;
  2606. break;
  2607. case 15:
  2608. *pWeapon->FallbackPaintKit() = 299;
  2609. break;
  2610. case 16:
  2611. *pWeapon->FallbackPaintKit() = 356;
  2612. break;
  2613. case 17:
  2614. *pWeapon->FallbackPaintKit() = 450;
  2615. break;
  2616. case 18:
  2617. *pWeapon->FallbackPaintKit() = 484;
  2618. break;
  2619. case 19:
  2620. *pWeapon->FallbackPaintKit() = 537;
  2621. break;
  2622. default:
  2623. break;
  2624. }
  2625. }
  2626. break;
  2627. case 36: // P250
  2628. {
  2629. switch (P250)
  2630. {
  2631. case 0:
  2632. *pWeapon->FallbackPaintKit() = 102;
  2633. break;
  2634. case 1:
  2635. *pWeapon->FallbackPaintKit() = 168;
  2636. break;
  2637. case 2:
  2638. *pWeapon->FallbackPaintKit() = 162;
  2639. break;
  2640. case 3:
  2641. *pWeapon->FallbackPaintKit() = 258;
  2642. break;
  2643. case 4:
  2644. *pWeapon->FallbackPaintKit() = 551;
  2645. break;
  2646. case 5:
  2647. *pWeapon->FallbackPaintKit() = 271;
  2648. break;
  2649. case 6:
  2650. *pWeapon->FallbackPaintKit() = 295;
  2651. break;
  2652. case 7:
  2653. *pWeapon->FallbackPaintKit() = 358;
  2654. break;
  2655. case 8:
  2656. *pWeapon->FallbackPaintKit() = 388;
  2657. break;
  2658. default:
  2659. break;
  2660. }
  2661. }
  2662. break;
  2663. case 38: // Scar 20
  2664. {
  2665. switch (SCAR20)
  2666. {
  2667. case 0:
  2668. *pWeapon->FallbackPaintKit() = 165;
  2669. break;
  2670. case 1:
  2671. *pWeapon->FallbackPaintKit() = 196;
  2672. break;
  2673. case 2:
  2674. *pWeapon->FallbackPaintKit() = 232;
  2675. break;
  2676. case 3:
  2677. *pWeapon->FallbackPaintKit() = 391;
  2678. break;
  2679. case 4:
  2680. *pWeapon->FallbackPaintKit() = 597;
  2681. break;
  2682. case 5:
  2683. *pWeapon->FallbackPaintKit() = 312;
  2684. break;
  2685. case 6:
  2686. *pWeapon->FallbackPaintKit() = 406;
  2687. break;
  2688. break;
  2689. }
  2690. }
  2691. break;
  2692. case 39: // SG553
  2693. {
  2694. switch (SG553)
  2695. {
  2696. case 0:
  2697. *pWeapon->FallbackPaintKit() = 39;
  2698. break;
  2699. case 1:
  2700. *pWeapon->FallbackPaintKit() = 98;
  2701. break;
  2702. case 2:
  2703. *pWeapon->FallbackPaintKit() = 410;
  2704. break;
  2705. case 3:
  2706. *pWeapon->FallbackPaintKit() = 347;
  2707. break;
  2708. case 4:
  2709. *pWeapon->FallbackPaintKit() = 287;
  2710. break;
  2711. case 5:
  2712. *pWeapon->FallbackPaintKit() = 298;
  2713. break;
  2714. case 6:
  2715. *pWeapon->FallbackPaintKit() = 363;
  2716. break;
  2717. case 7:
  2718. *pWeapon->FallbackPaintKit() = 378;
  2719. break;
  2720. case 8:
  2721. *pWeapon->FallbackPaintKit() = 487;
  2722. break;
  2723. case 9:
  2724. *pWeapon->FallbackPaintKit() = 519;
  2725. break;
  2726. case 10:
  2727. *pWeapon->FallbackPaintKit() = 553;
  2728. break;
  2729. default:
  2730. break;
  2731. }
  2732. }
  2733. break;
  2734. case 40: // SSG08
  2735. {
  2736. switch (SSG08)
  2737. {
  2738. case 0:
  2739. *pWeapon->FallbackPaintKit() = 624;
  2740. break;
  2741. case 1:
  2742. *pWeapon->FallbackPaintKit() = 222;
  2743. break;
  2744. case 2:
  2745. *pWeapon->FallbackPaintKit() = 554;
  2746. break;
  2747. case 3:
  2748. *pWeapon->FallbackPaintKit() = 319;
  2749. break;
  2750. case 4:
  2751. *pWeapon->FallbackPaintKit() = 361;
  2752. break;
  2753. case 5:
  2754. *pWeapon->FallbackPaintKit() = 503;
  2755. break;
  2756. default:
  2757. break;
  2758. }
  2759. }
  2760. break;
  2761. case 64: // Revolver
  2762. {
  2763. switch (Magnum)
  2764. {
  2765. case 0:
  2766. *pWeapon->FallbackPaintKit() = 522;
  2767. break;
  2768. case 1:
  2769. *pWeapon->FallbackPaintKit() = 12;
  2770. break;
  2771. case 2:
  2772. *pWeapon->FallbackPaintKit() = 523;
  2773. break;
  2774. case 3:
  2775. *pWeapon->FallbackPaintKit() = 595;
  2776. break;
  2777. default:
  2778. break;
  2779. }
  2780. }
  2781. break;
  2782. default:
  2783. break;
  2784. }
  2785.  
  2786. if (pEntity->GetClientClass()->m_ClassID == (int)CSGOClassID::CKnife)
  2787. {
  2788. auto pCustomName1 = MakePtr(char*, pWeapon, 0x301C);
  2789. if (Menu::Window.SkinchangerTab.KnifeName.getText().length() > 1)
  2790. {
  2791. strcpy_s(pCustomName1, 32, Menu::Window.SkinchangerTab.KnifeName.getText().c_str());
  2792. }
  2793.  
  2794. if (Model == 0) // Bayonet
  2795. {
  2796. *pWeapon->ModelIndex() = iBayonet; // m_nModelIndex
  2797. *pWeapon->ViewModelIndex() = iBayonet;
  2798. *pWeapon->WorldModelIndex() = iBayonet + 1;
  2799. *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 500;
  2800. *pWeapon->GetEntityQuality() = 3;
  2801.  
  2802. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  2803.  
  2804. if (Skin == 0)
  2805. {
  2806. *pWeapon->FallbackPaintKit() = 0; // Forest DDPAT
  2807. }
  2808. else if (Skin == 1)
  2809. {
  2810. *pWeapon->FallbackPaintKit() = 12; // Crimson Web
  2811. }
  2812. else if (Skin == 2)
  2813. {
  2814. *pWeapon->FallbackPaintKit() = 27; // Bone Mask
  2815. }
  2816. else if (Skin == 3)
  2817. {
  2818. *pWeapon->FallbackPaintKit() = 38; // Fade
  2819. }
  2820. else if (Skin == 4)
  2821. {
  2822. *pWeapon->FallbackPaintKit() = 40; // Night
  2823. }
  2824. else if (Skin == 5)
  2825. {
  2826. *pWeapon->FallbackPaintKit() = 42; // Blue Steel
  2827. }
  2828. else if (Skin == 6)
  2829. {
  2830. *pWeapon->FallbackPaintKit() = 43; // Stained
  2831. }
  2832. else if (Skin == 7)
  2833. {
  2834. *pWeapon->FallbackPaintKit() = 44; // Case Hardened
  2835. }
  2836. else if (Skin == 8)
  2837. {
  2838. *pWeapon->FallbackPaintKit() = 59; // Slaughter
  2839. }
  2840. else if (Skin == 9)
  2841. {
  2842. *pWeapon->FallbackPaintKit() = 72; // Safari Mesh
  2843. }
  2844. else if (Skin == 10)
  2845. {
  2846. *pWeapon->FallbackPaintKit() = 77; // Boreal Forest
  2847. }
  2848. else if (Skin == 11)
  2849. {
  2850. *pWeapon->FallbackPaintKit() = 98; // Ultraviolet
  2851. }
  2852. else if (Skin == 12)
  2853. {
  2854. *pWeapon->FallbackPaintKit() = 143; // Urban Masked
  2855. }
  2856. else if (Skin == 13)
  2857. {
  2858. *pWeapon->FallbackPaintKit() = 175; // Scorched
  2859. }
  2860. else if (Skin == 14)
  2861. {
  2862. *pWeapon->FallbackPaintKit() = 323; // Rust Coat
  2863. }
  2864. else if (Skin == 15)
  2865. {
  2866. *pWeapon->FallbackPaintKit() = 409; // Tiger Tooth
  2867. }
  2868. else if (Skin == 16)
  2869. {
  2870. *pWeapon->FallbackPaintKit() = 410; // Damascus Steel
  2871. }
  2872. else if (Skin == 17)
  2873. {
  2874. *pWeapon->FallbackPaintKit() = 411; // Damascus Steel
  2875. }
  2876. else if (Skin == 18)
  2877. {
  2878. *pWeapon->FallbackPaintKit() = 413; // Marble Fade
  2879. }
  2880. else if (Skin == 19)
  2881. {
  2882. *pWeapon->FallbackPaintKit() = 414; // Rust Coat
  2883. }
  2884. else if (Skin == 20)
  2885. {
  2886. *pWeapon->FallbackPaintKit() = 415; // Doppler Ruby
  2887. }
  2888. else if (Skin == 21)
  2889. {
  2890. *pWeapon->FallbackPaintKit() = 416; // Doppler Sapphire
  2891. }
  2892. else if (Skin == 22)
  2893. {
  2894. *pWeapon->FallbackPaintKit() = 417; // Doppler Blackpearl
  2895. }
  2896. else if (Skin == 23)
  2897. {
  2898. *pWeapon->FallbackPaintKit() = 418; // Doppler Phase 1
  2899. }
  2900. else if (Skin == 24)
  2901. {
  2902. *pWeapon->FallbackPaintKit() = 419; // Doppler Phase 2
  2903. }
  2904. else if (Skin == 25)
  2905. {
  2906. *pWeapon->FallbackPaintKit() = 420; // Doppler Phase 3
  2907. }
  2908. else if (Skin == 26)
  2909. {
  2910. *pWeapon->FallbackPaintKit() = 421; // Doppler Phase 4
  2911. }
  2912. else if (Skin == 27)
  2913. {
  2914. *pWeapon->FallbackPaintKit() = 569; // Gamma Doppler Phase1
  2915. }
  2916. else if (Skin == 28)
  2917. {
  2918. *pWeapon->FallbackPaintKit() = 570; // Gamma Doppler Phase2
  2919. }
  2920. else if (Skin == 29)
  2921. {
  2922. *pWeapon->FallbackPaintKit() = 571; // Gamma Doppler Phase3
  2923. }
  2924. else if (Skin == 30)
  2925. {
  2926. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Phase4
  2927. }
  2928. else if (Skin == 31)
  2929. {
  2930. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Emerald
  2931. }
  2932. else if (Skin == 32)
  2933. {
  2934. *pWeapon->FallbackPaintKit() = 558; // Lore
  2935. }
  2936. }
  2937. else if (Model == 1) // Bowie Knife
  2938. {
  2939. *pWeapon->ModelIndex() = iBowie; // m_nModelIndex
  2940. *pWeapon->ViewModelIndex() = iBowie;
  2941. *pWeapon->WorldModelIndex() = iBowie + 1;
  2942. *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 514;
  2943. *pWeapon->GetEntityQuality() = 3;
  2944.  
  2945. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  2946.  
  2947. if (Skin == 0)
  2948. {
  2949. *pWeapon->FallbackPaintKit() = 0; // Forest DDPAT
  2950. }
  2951. else if (Skin == 1)
  2952. {
  2953. *pWeapon->FallbackPaintKit() = 12; // Crimson Web
  2954. }
  2955. else if (Skin == 2)
  2956. {
  2957. *pWeapon->FallbackPaintKit() = 27; // Bone Mask
  2958. }
  2959. else if (Skin == 3)
  2960. {
  2961. *pWeapon->FallbackPaintKit() = 38; // Fade
  2962. }
  2963. else if (Skin == 4)
  2964. {
  2965. *pWeapon->FallbackPaintKit() = 40; // Night
  2966. }
  2967. else if (Skin == 5)
  2968. {
  2969. *pWeapon->FallbackPaintKit() = 42; // Blue Steel
  2970. }
  2971. else if (Skin == 6)
  2972. {
  2973. *pWeapon->FallbackPaintKit() = 43; // Stained
  2974. }
  2975. else if (Skin == 7)
  2976. {
  2977. *pWeapon->FallbackPaintKit() = 44; // Case Hardened
  2978. }
  2979. else if (Skin == 8)
  2980. {
  2981. *pWeapon->FallbackPaintKit() = 59; // Slaughter
  2982. }
  2983. else if (Skin == 9)
  2984. {
  2985. *pWeapon->FallbackPaintKit() = 72; // Safari Mesh
  2986. }
  2987. else if (Skin == 10)
  2988. {
  2989. *pWeapon->FallbackPaintKit() = 77; // Boreal Forest
  2990. }
  2991. else if (Skin == 11)
  2992. {
  2993. *pWeapon->FallbackPaintKit() = 98; // Ultraviolet
  2994. }
  2995. else if (Skin == 12)
  2996. {
  2997. *pWeapon->FallbackPaintKit() = 143; // Urban Masked
  2998. }
  2999. else if (Skin == 13)
  3000. {
  3001. *pWeapon->FallbackPaintKit() = 175; // Scorched
  3002. }
  3003. else if (Skin == 14)
  3004. {
  3005. *pWeapon->FallbackPaintKit() = 323; // Rust Coat
  3006. }
  3007. else if (Skin == 15)
  3008. {
  3009. *pWeapon->FallbackPaintKit() = 409; // Tiger Tooth
  3010. }
  3011. else if (Skin == 16)
  3012. {
  3013. *pWeapon->FallbackPaintKit() = 410; // Damascus Steel
  3014. }
  3015. else if (Skin == 17)
  3016. {
  3017. *pWeapon->FallbackPaintKit() = 411; // Damascus Steel
  3018. }
  3019. else if (Skin == 18)
  3020. {
  3021. *pWeapon->FallbackPaintKit() = 413; // Marble Fade
  3022. }
  3023. else if (Skin == 19)
  3024. {
  3025. *pWeapon->FallbackPaintKit() = 414; // Rust Coat
  3026. }
  3027. else if (Skin == 20)
  3028. {
  3029. *pWeapon->FallbackPaintKit() = 415; // Doppler Ruby
  3030. }
  3031. else if (Skin == 21)
  3032. {
  3033. *pWeapon->FallbackPaintKit() = 416; // Doppler Sapphire
  3034. }
  3035. else if (Skin == 22)
  3036. {
  3037. *pWeapon->FallbackPaintKit() = 417; // Doppler Blackpearl
  3038. }
  3039. else if (Skin == 23)
  3040. {
  3041. *pWeapon->FallbackPaintKit() = 418; // Doppler Phase 1
  3042. }
  3043. else if (Skin == 24)
  3044. {
  3045. *pWeapon->FallbackPaintKit() = 419; // Doppler Phase 2
  3046. }
  3047. else if (Skin == 25)
  3048. {
  3049. *pWeapon->FallbackPaintKit() = 420; // Doppler Phase 3
  3050. }
  3051. else if (Skin == 26)
  3052. {
  3053. *pWeapon->FallbackPaintKit() = 421; // Doppler Phase 4
  3054. }
  3055. else if (Skin == 27)
  3056. {
  3057. *pWeapon->FallbackPaintKit() = 569; // Gamma Doppler Phase1
  3058. }
  3059. else if (Skin == 28)
  3060. {
  3061. *pWeapon->FallbackPaintKit() = 570; // Gamma Doppler Phase2
  3062. }
  3063. else if (Skin == 29)
  3064. {
  3065. *pWeapon->FallbackPaintKit() = 571; // Gamma Doppler Phase3
  3066. }
  3067. else if (Skin == 30)
  3068. {
  3069. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Phase4
  3070. }
  3071. else if (Skin == 31)
  3072. {
  3073. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Emerald
  3074. }
  3075. else if (Skin == 32)
  3076. {
  3077. *pWeapon->FallbackPaintKit() = 558; // Lore
  3078. }
  3079.  
  3080. }
  3081. else if (Model == 2) // Butterfly Knife
  3082. {
  3083. *pWeapon->ModelIndex() = iButterfly; // m_nModelIndex
  3084. *pWeapon->ViewModelIndex() = iButterfly;
  3085. *pWeapon->WorldModelIndex() = iButterfly + 1;
  3086. *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 515;
  3087. *pWeapon->GetEntityQuality() = 3;
  3088.  
  3089. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  3090.  
  3091. if (Skin == 0)
  3092. {
  3093. *pWeapon->FallbackPaintKit() = 0; // Forest DDPAT
  3094. }
  3095. else if (Skin == 1)
  3096. {
  3097. *pWeapon->FallbackPaintKit() = 12; // Crimson Web
  3098. }
  3099. else if (Skin == 2)
  3100. {
  3101. *pWeapon->FallbackPaintKit() = 27; // Bone Mask
  3102. }
  3103. else if (Skin == 3)
  3104. {
  3105. *pWeapon->FallbackPaintKit() = 38; // Fade
  3106. }
  3107. else if (Skin == 4)
  3108. {
  3109. *pWeapon->FallbackPaintKit() = 40; // Night
  3110. }
  3111. else if (Skin == 5)
  3112. {
  3113. *pWeapon->FallbackPaintKit() = 42; // Blue Steel
  3114. }
  3115. else if (Skin == 6)
  3116. {
  3117. *pWeapon->FallbackPaintKit() = 43; // Stained
  3118. }
  3119. else if (Skin == 7)
  3120. {
  3121. *pWeapon->FallbackPaintKit() = 44; // Case Hardened
  3122. }
  3123. else if (Skin == 8)
  3124. {
  3125. *pWeapon->FallbackPaintKit() = 59; // Slaughter
  3126. }
  3127. else if (Skin == 9)
  3128. {
  3129. *pWeapon->FallbackPaintKit() = 72; // Safari Mesh
  3130. }
  3131. else if (Skin == 10)
  3132. {
  3133. *pWeapon->FallbackPaintKit() = 77; // Boreal Forest
  3134. }
  3135. else if (Skin == 11)
  3136. {
  3137. *pWeapon->FallbackPaintKit() = 98; // Ultraviolet
  3138. }
  3139. else if (Skin == 12)
  3140. {
  3141. *pWeapon->FallbackPaintKit() = 143; // Urban Masked
  3142. }
  3143. else if (Skin == 13)
  3144. {
  3145. *pWeapon->FallbackPaintKit() = 175; // Scorched
  3146. }
  3147. else if (Skin == 14)
  3148. {
  3149. *pWeapon->FallbackPaintKit() = 323; // Rust Coat
  3150. }
  3151. else if (Skin == 15)
  3152. {
  3153. *pWeapon->FallbackPaintKit() = 409; // Tiger Tooth
  3154. }
  3155. else if (Skin == 16)
  3156. {
  3157. *pWeapon->FallbackPaintKit() = 410; // Damascus Steel
  3158. }
  3159. else if (Skin == 17)
  3160. {
  3161. *pWeapon->FallbackPaintKit() = 411; // Damascus Steel
  3162. }
  3163. else if (Skin == 18)
  3164. {
  3165. *pWeapon->FallbackPaintKit() = 413; // Marble Fade
  3166. }
  3167. else if (Skin == 19)
  3168. {
  3169. *pWeapon->FallbackPaintKit() = 414; // Rust Coat
  3170. }
  3171. else if (Skin == 20)
  3172. {
  3173. *pWeapon->FallbackPaintKit() = 415; // Doppler Ruby
  3174. }
  3175. else if (Skin == 21)
  3176. {
  3177. *pWeapon->FallbackPaintKit() = 416; // Doppler Sapphire
  3178. }
  3179. else if (Skin == 22)
  3180. {
  3181. *pWeapon->FallbackPaintKit() = 417; // Doppler Blackpearl
  3182. }
  3183. else if (Skin == 23)
  3184. {
  3185. *pWeapon->FallbackPaintKit() = 418; // Doppler Phase 1
  3186. }
  3187. else if (Skin == 24)
  3188. {
  3189. *pWeapon->FallbackPaintKit() = 419; // Doppler Phase 2
  3190. }
  3191. else if (Skin == 25)
  3192. {
  3193. *pWeapon->FallbackPaintKit() = 420; // Doppler Phase 3
  3194. }
  3195. else if (Skin == 26)
  3196. {
  3197. *pWeapon->FallbackPaintKit() = 421; // Doppler Phase 4
  3198. }
  3199. else if (Skin == 27)
  3200. {
  3201. *pWeapon->FallbackPaintKit() = 569; // Gamma Doppler Phase1
  3202. }
  3203. else if (Skin == 28)
  3204. {
  3205. *pWeapon->FallbackPaintKit() = 570; // Gamma Doppler Phase2
  3206. }
  3207. else if (Skin == 29)
  3208. {
  3209. *pWeapon->FallbackPaintKit() = 571; // Gamma Doppler Phase3
  3210. }
  3211. else if (Skin == 30)
  3212. {
  3213. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Phase4
  3214. }
  3215. else if (Skin == 31)
  3216. {
  3217. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Emerald
  3218. }
  3219. else if (Skin == 32)
  3220. {
  3221. *pWeapon->FallbackPaintKit() = 558; // Lore
  3222. }
  3223.  
  3224. }
  3225. else if (Model == 3) // Falchion Knife
  3226. {
  3227. *pWeapon->ModelIndex() = iFalchion; // m_nModelIndex
  3228. *pWeapon->ViewModelIndex() = iFalchion;
  3229. *pWeapon->WorldModelIndex() = iFalchion + 1;
  3230. *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 512;
  3231. *pWeapon->GetEntityQuality() = 3;
  3232.  
  3233. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  3234.  
  3235. if (Skin == 0)
  3236. {
  3237. *pWeapon->FallbackPaintKit() = 0; // Forest DDPAT
  3238. }
  3239. else if (Skin == 1)
  3240. {
  3241. *pWeapon->FallbackPaintKit() = 12; // Crimson Web
  3242. }
  3243. else if (Skin == 2)
  3244. {
  3245. *pWeapon->FallbackPaintKit() = 27; // Bone Mask
  3246. }
  3247. else if (Skin == 3)
  3248. {
  3249. *pWeapon->FallbackPaintKit() = 38; // Fade
  3250. }
  3251. else if (Skin == 4)
  3252. {
  3253. *pWeapon->FallbackPaintKit() = 40; // Night
  3254. }
  3255. else if (Skin == 5)
  3256. {
  3257. *pWeapon->FallbackPaintKit() = 42; // Blue Steel
  3258. }
  3259. else if (Skin == 6)
  3260. {
  3261. *pWeapon->FallbackPaintKit() = 43; // Stained
  3262. }
  3263. else if (Skin == 7)
  3264. {
  3265. *pWeapon->FallbackPaintKit() = 44; // Case Hardened
  3266. }
  3267. else if (Skin == 8)
  3268. {
  3269. *pWeapon->FallbackPaintKit() = 59; // Slaughter
  3270. }
  3271. else if (Skin == 9)
  3272. {
  3273. *pWeapon->FallbackPaintKit() = 72; // Safari Mesh
  3274. }
  3275. else if (Skin == 10)
  3276. {
  3277. *pWeapon->FallbackPaintKit() = 77; // Boreal Forest
  3278. }
  3279. else if (Skin == 11)
  3280. {
  3281. *pWeapon->FallbackPaintKit() = 98; // Ultraviolet
  3282. }
  3283. else if (Skin == 12)
  3284. {
  3285. *pWeapon->FallbackPaintKit() = 143; // Urban Masked
  3286. }
  3287. else if (Skin == 13)
  3288. {
  3289. *pWeapon->FallbackPaintKit() = 175; // Scorched
  3290. }
  3291. else if (Skin == 14)
  3292. {
  3293. *pWeapon->FallbackPaintKit() = 323; // Rust Coat
  3294. }
  3295. else if (Skin == 15)
  3296. {
  3297. *pWeapon->FallbackPaintKit() = 409; // Tiger Tooth
  3298. }
  3299. else if (Skin == 16)
  3300. {
  3301. *pWeapon->FallbackPaintKit() = 410; // Damascus Steel
  3302. }
  3303. else if (Skin == 17)
  3304. {
  3305. *pWeapon->FallbackPaintKit() = 411; // Damascus Steel
  3306. }
  3307. else if (Skin == 18)
  3308. {
  3309. *pWeapon->FallbackPaintKit() = 413; // Marble Fade
  3310. }
  3311. else if (Skin == 19)
  3312. {
  3313. *pWeapon->FallbackPaintKit() = 414; // Rust Coat
  3314. }
  3315. else if (Skin == 20)
  3316. {
  3317. *pWeapon->FallbackPaintKit() = 415; // Doppler Ruby
  3318. }
  3319. else if (Skin == 21)
  3320. {
  3321. *pWeapon->FallbackPaintKit() = 416; // Doppler Sapphire
  3322. }
  3323. else if (Skin == 22)
  3324. {
  3325. *pWeapon->FallbackPaintKit() = 417; // Doppler Blackpearl
  3326. }
  3327. else if (Skin == 23)
  3328. {
  3329. *pWeapon->FallbackPaintKit() = 418; // Doppler Phase 1
  3330. }
  3331. else if (Skin == 24)
  3332. {
  3333. *pWeapon->FallbackPaintKit() = 419; // Doppler Phase 2
  3334. }
  3335. else if (Skin == 25)
  3336. {
  3337. *pWeapon->FallbackPaintKit() = 420; // Doppler Phase 3
  3338. }
  3339. else if (Skin == 26)
  3340. {
  3341. *pWeapon->FallbackPaintKit() = 421; // Doppler Phase 4
  3342. }
  3343. else if (Skin == 27)
  3344. {
  3345. *pWeapon->FallbackPaintKit() = 569; // Gamma Doppler Phase1
  3346. }
  3347. else if (Skin == 28)
  3348. {
  3349. *pWeapon->FallbackPaintKit() = 570; // Gamma Doppler Phase2
  3350. }
  3351. else if (Skin == 29)
  3352. {
  3353. *pWeapon->FallbackPaintKit() = 571; // Gamma Doppler Phase3
  3354. }
  3355. else if (Skin == 30)
  3356. {
  3357. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Phase4
  3358. }
  3359. else if (Skin == 31)
  3360. {
  3361. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Emerald
  3362. }
  3363. else if (Skin == 32)
  3364. {
  3365. *pWeapon->FallbackPaintKit() = 558; // Lore
  3366. }
  3367. }
  3368. else if (Model == 4) // Flip Knife
  3369. {
  3370. *pWeapon->ModelIndex() = iFlip; // m_nModelIndex
  3371. *pWeapon->ViewModelIndex() = iFlip;
  3372. *pWeapon->WorldModelIndex() = iFlip + 1;
  3373. *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 505;
  3374. *pWeapon->GetEntityQuality() = 3;
  3375.  
  3376. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  3377.  
  3378. if (Skin == 0)
  3379. {
  3380. *pWeapon->FallbackPaintKit() = 0; // Forest DDPAT
  3381. }
  3382. else if (Skin == 1)
  3383. {
  3384. *pWeapon->FallbackPaintKit() = 12; // Crimson Web
  3385. }
  3386. else if (Skin == 2)
  3387. {
  3388. *pWeapon->FallbackPaintKit() = 27; // Bone Mask
  3389. }
  3390. else if (Skin == 3)
  3391. {
  3392. *pWeapon->FallbackPaintKit() = 38; // Fade
  3393. }
  3394. else if (Skin == 4)
  3395. {
  3396. *pWeapon->FallbackPaintKit() = 40; // Night
  3397. }
  3398. else if (Skin == 5)
  3399. {
  3400. *pWeapon->FallbackPaintKit() = 42; // Blue Steel
  3401. }
  3402. else if (Skin == 6)
  3403. {
  3404. *pWeapon->FallbackPaintKit() = 43; // Stained
  3405. }
  3406. else if (Skin == 7)
  3407. {
  3408. *pWeapon->FallbackPaintKit() = 44; // Case Hardened
  3409. }
  3410. else if (Skin == 8)
  3411. {
  3412. *pWeapon->FallbackPaintKit() = 59; // Slaughter
  3413. }
  3414. else if (Skin == 9)
  3415. {
  3416. *pWeapon->FallbackPaintKit() = 72; // Safari Mesh
  3417. }
  3418. else if (Skin == 10)
  3419. {
  3420. *pWeapon->FallbackPaintKit() = 77; // Boreal Forest
  3421. }
  3422. else if (Skin == 11)
  3423. {
  3424. *pWeapon->FallbackPaintKit() = 98; // Ultraviolet
  3425. }
  3426. else if (Skin == 12)
  3427. {
  3428. *pWeapon->FallbackPaintKit() = 143; // Urban Masked
  3429. }
  3430. else if (Skin == 13)
  3431. {
  3432. *pWeapon->FallbackPaintKit() = 175; // Scorched
  3433. }
  3434. else if (Skin == 14)
  3435. {
  3436. *pWeapon->FallbackPaintKit() = 323; // Rust Coat
  3437. }
  3438. else if (Skin == 15)
  3439. {
  3440. *pWeapon->FallbackPaintKit() = 409; // Tiger Tooth
  3441. }
  3442. else if (Skin == 16)
  3443. {
  3444. *pWeapon->FallbackPaintKit() = 410; // Damascus Steel
  3445. }
  3446. else if (Skin == 17)
  3447. {
  3448. *pWeapon->FallbackPaintKit() = 411; // Damascus Steel
  3449. }
  3450. else if (Skin == 18)
  3451. {
  3452. *pWeapon->FallbackPaintKit() = 413; // Marble Fade
  3453. }
  3454. else if (Skin == 19)
  3455. {
  3456. *pWeapon->FallbackPaintKit() = 414; // Rust Coat
  3457. }
  3458. else if (Skin == 20)
  3459. {
  3460. *pWeapon->FallbackPaintKit() = 415; // Doppler Ruby
  3461. }
  3462. else if (Skin == 21)
  3463. {
  3464. *pWeapon->FallbackPaintKit() = 416; // Doppler Sapphire
  3465. }
  3466. else if (Skin == 22)
  3467. {
  3468. *pWeapon->FallbackPaintKit() = 417; // Doppler Blackpearl
  3469. }
  3470. else if (Skin == 23)
  3471. {
  3472. *pWeapon->FallbackPaintKit() = 418; // Doppler Phase 1
  3473. }
  3474. else if (Skin == 24)
  3475. {
  3476. *pWeapon->FallbackPaintKit() = 419; // Doppler Phase 2
  3477. }
  3478. else if (Skin == 25)
  3479. {
  3480. *pWeapon->FallbackPaintKit() = 420; // Doppler Phase 3
  3481. }
  3482. else if (Skin == 26)
  3483. {
  3484. *pWeapon->FallbackPaintKit() = 421; // Doppler Phase 4
  3485. }
  3486. else if (Skin == 27)
  3487. {
  3488. *pWeapon->FallbackPaintKit() = 569; // Gamma Doppler Phase1
  3489. }
  3490. else if (Skin == 28)
  3491. {
  3492. *pWeapon->FallbackPaintKit() = 570; // Gamma Doppler Phase2
  3493. }
  3494. else if (Skin == 29)
  3495. {
  3496. *pWeapon->FallbackPaintKit() = 571; // Gamma Doppler Phase3
  3497. }
  3498. else if (Skin == 30)
  3499. {
  3500. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Phase4
  3501. }
  3502. else if (Skin == 31)
  3503. {
  3504. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Emerald
  3505. }
  3506. else if (Skin == 32)
  3507. {
  3508. *pWeapon->FallbackPaintKit() = 559; // Lore
  3509. }
  3510.  
  3511. }
  3512. else if (Model == 5) // Gut Knife
  3513. {
  3514. *pWeapon->ModelIndex() = iGut; // m_nModelIndex
  3515. *pWeapon->ViewModelIndex() = iGut;
  3516. *pWeapon->WorldModelIndex() = iGut + 1;
  3517. *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 506;
  3518. *pWeapon->GetEntityQuality() = 3;
  3519.  
  3520. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  3521.  
  3522. if (Skin == 0)
  3523. {
  3524. *pWeapon->FallbackPaintKit() = 0; // Forest DDPAT
  3525. }
  3526. else if (Skin == 1)
  3527. {
  3528. *pWeapon->FallbackPaintKit() = 12; // Crimson Web
  3529. }
  3530. else if (Skin == 2)
  3531. {
  3532. *pWeapon->FallbackPaintKit() = 27; // Bone Mask
  3533. }
  3534. else if (Skin == 3)
  3535. {
  3536. *pWeapon->FallbackPaintKit() = 38; // Fade
  3537. }
  3538. else if (Skin == 4)
  3539. {
  3540. *pWeapon->FallbackPaintKit() = 40; // Night
  3541. }
  3542. else if (Skin == 5)
  3543. {
  3544. *pWeapon->FallbackPaintKit() = 42; // Blue Steel
  3545. }
  3546. else if (Skin == 6)
  3547. {
  3548. *pWeapon->FallbackPaintKit() = 43; // Stained
  3549. }
  3550. else if (Skin == 7)
  3551. {
  3552. *pWeapon->FallbackPaintKit() = 44; // Case Hardened
  3553. }
  3554. else if (Skin == 8)
  3555. {
  3556. *pWeapon->FallbackPaintKit() = 59; // Slaughter
  3557. }
  3558. else if (Skin == 9)
  3559. {
  3560. *pWeapon->FallbackPaintKit() = 72; // Safari Mesh
  3561. }
  3562. else if (Skin == 10)
  3563. {
  3564. *pWeapon->FallbackPaintKit() = 77; // Boreal Forest
  3565. }
  3566. else if (Skin == 11)
  3567. {
  3568. *pWeapon->FallbackPaintKit() = 98; // Ultraviolet
  3569. }
  3570. else if (Skin == 12)
  3571. {
  3572. *pWeapon->FallbackPaintKit() = 143; // Urban Masked
  3573. }
  3574. else if (Skin == 13)
  3575. {
  3576. *pWeapon->FallbackPaintKit() = 175; // Scorched
  3577. }
  3578. else if (Skin == 14)
  3579. {
  3580. *pWeapon->FallbackPaintKit() = 323; // Rust Coat
  3581. }
  3582. else if (Skin == 15)
  3583. {
  3584. *pWeapon->FallbackPaintKit() = 409; // Tiger Tooth
  3585. }
  3586. else if (Skin == 16)
  3587. {
  3588. *pWeapon->FallbackPaintKit() = 410; // Damascus Steel
  3589. }
  3590. else if (Skin == 17)
  3591. {
  3592. *pWeapon->FallbackPaintKit() = 411; // Damascus Steel
  3593. }
  3594. else if (Skin == 18)
  3595. {
  3596. *pWeapon->FallbackPaintKit() = 413; // Marble Fade
  3597. }
  3598. else if (Skin == 19)
  3599. {
  3600. *pWeapon->FallbackPaintKit() = 414; // Rust Coat
  3601. }
  3602. else if (Skin == 20)
  3603. {
  3604. *pWeapon->FallbackPaintKit() = 415; // Doppler Ruby
  3605. }
  3606. else if (Skin == 21)
  3607. {
  3608. *pWeapon->FallbackPaintKit() = 416; // Doppler Sapphire
  3609. }
  3610. else if (Skin == 22)
  3611. {
  3612. *pWeapon->FallbackPaintKit() = 417; // Doppler Blackpearl
  3613. }
  3614. else if (Skin == 23)
  3615. {
  3616. *pWeapon->FallbackPaintKit() = 418; // Doppler Phase 1
  3617. }
  3618. else if (Skin == 24)
  3619. {
  3620. *pWeapon->FallbackPaintKit() = 419; // Doppler Phase 2
  3621. }
  3622. else if (Skin == 25)
  3623. {
  3624. *pWeapon->FallbackPaintKit() = 420; // Doppler Phase 3
  3625. }
  3626. else if (Skin == 26)
  3627. {
  3628. *pWeapon->FallbackPaintKit() = 421; // Doppler Phase 4
  3629. }
  3630. else if (Skin == 27)
  3631. {
  3632. *pWeapon->FallbackPaintKit() = 569; // Gamma Doppler Phase1
  3633. }
  3634. else if (Skin == 28)
  3635. {
  3636. *pWeapon->FallbackPaintKit() = 570; // Gamma Doppler Phase2
  3637. }
  3638. else if (Skin == 29)
  3639. {
  3640. *pWeapon->FallbackPaintKit() = 571; // Gamma Doppler Phase3
  3641. }
  3642. else if (Skin == 30)
  3643. {
  3644. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Phase4
  3645. }
  3646. else if (Skin == 31)
  3647. {
  3648. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Emerald
  3649. }
  3650. else if (Skin == 32)
  3651. {
  3652. *pWeapon->FallbackPaintKit() = 560; // Lore
  3653. }
  3654.  
  3655.  
  3656. }
  3657. else if (Model == 6) // Huntsman Knife
  3658. {
  3659. *pWeapon->ModelIndex() = iHuntsman; // m_nModelIndex
  3660. *pWeapon->ViewModelIndex() = iHuntsman;
  3661. *pWeapon->WorldModelIndex() = iHuntsman + 1;
  3662. *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 509;
  3663. *pWeapon->GetEntityQuality() = 3;
  3664.  
  3665. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  3666.  
  3667. if (Skin == 0)
  3668. {
  3669. *pWeapon->FallbackPaintKit() = 0; // Forest DDPAT
  3670. }
  3671. else if (Skin == 1)
  3672. {
  3673. *pWeapon->FallbackPaintKit() = 12; // Crimson Web
  3674. }
  3675. else if (Skin == 2)
  3676. {
  3677. *pWeapon->FallbackPaintKit() = 27; // Bone Mask
  3678. }
  3679. else if (Skin == 3)
  3680. {
  3681. *pWeapon->FallbackPaintKit() = 38; // Fade
  3682. }
  3683. else if (Skin == 4)
  3684. {
  3685. *pWeapon->FallbackPaintKit() = 40; // Night
  3686. }
  3687. else if (Skin == 5)
  3688. {
  3689. *pWeapon->FallbackPaintKit() = 42; // Blue Steel
  3690. }
  3691. else if (Skin == 6)
  3692. {
  3693. *pWeapon->FallbackPaintKit() = 43; // Stained
  3694. }
  3695. else if (Skin == 7)
  3696. {
  3697. *pWeapon->FallbackPaintKit() = 44; // Case Hardened
  3698. }
  3699. else if (Skin == 8)
  3700. {
  3701. *pWeapon->FallbackPaintKit() = 59; // Slaughter
  3702. }
  3703. else if (Skin == 9)
  3704. {
  3705. *pWeapon->FallbackPaintKit() = 72; // Safari Mesh
  3706. }
  3707. else if (Skin == 10)
  3708. {
  3709. *pWeapon->FallbackPaintKit() = 77; // Boreal Forest
  3710. }
  3711. else if (Skin == 11)
  3712. {
  3713. *pWeapon->FallbackPaintKit() = 98; // Ultraviolet
  3714. }
  3715. else if (Skin == 12)
  3716. {
  3717. *pWeapon->FallbackPaintKit() = 143; // Urban Masked
  3718. }
  3719. else if (Skin == 13)
  3720. {
  3721. *pWeapon->FallbackPaintKit() = 175; // Scorched
  3722. }
  3723. else if (Skin == 14)
  3724. {
  3725. *pWeapon->FallbackPaintKit() = 323; // Rust Coat
  3726. }
  3727. else if (Skin == 15)
  3728. {
  3729. *pWeapon->FallbackPaintKit() = 409; // Tiger Tooth
  3730. }
  3731. else if (Skin == 16)
  3732. {
  3733. *pWeapon->FallbackPaintKit() = 410; // Damascus Steel
  3734. }
  3735. else if (Skin == 17)
  3736. {
  3737. *pWeapon->FallbackPaintKit() = 411; // Damascus Steel
  3738. }
  3739. else if (Skin == 18)
  3740. {
  3741. *pWeapon->FallbackPaintKit() = 413; // Marble Fade
  3742. }
  3743. else if (Skin == 19)
  3744. {
  3745. *pWeapon->FallbackPaintKit() = 414; // Rust Coat
  3746. }
  3747. else if (Skin == 20)
  3748. {
  3749. *pWeapon->FallbackPaintKit() = 415; // Doppler Ruby
  3750. }
  3751. else if (Skin == 21)
  3752. {
  3753. *pWeapon->FallbackPaintKit() = 416; // Doppler Sapphire
  3754. }
  3755. else if (Skin == 22)
  3756. {
  3757. *pWeapon->FallbackPaintKit() = 417; // Doppler Blackpearl
  3758. }
  3759. else if (Skin == 23)
  3760. {
  3761. *pWeapon->FallbackPaintKit() = 418; // Doppler Phase 1
  3762. }
  3763. else if (Skin == 24)
  3764. {
  3765. *pWeapon->FallbackPaintKit() = 419; // Doppler Phase 2
  3766. }
  3767. else if (Skin == 25)
  3768. {
  3769. *pWeapon->FallbackPaintKit() = 420; // Doppler Phase 3
  3770. }
  3771. else if (Skin == 26)
  3772. {
  3773. *pWeapon->FallbackPaintKit() = 421; // Doppler Phase 4
  3774. }
  3775. else if (Skin == 27)
  3776. {
  3777. *pWeapon->FallbackPaintKit() = 569; // Gamma Doppler Phase1
  3778. }
  3779. else if (Skin == 28)
  3780. {
  3781. *pWeapon->FallbackPaintKit() = 570; // Gamma Doppler Phase2
  3782. }
  3783. else if (Skin == 29)
  3784. {
  3785. *pWeapon->FallbackPaintKit() = 571; // Gamma Doppler Phase3
  3786. }
  3787. else if (Skin == 30)
  3788. {
  3789. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Phase4
  3790. }
  3791. else if (Skin == 31)
  3792. {
  3793. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Emerald
  3794. }
  3795. else if (Skin == 32)
  3796. {
  3797. *pWeapon->FallbackPaintKit() = 559; // Lore
  3798. }
  3799.  
  3800.  
  3801. }
  3802. else if (Model == 7) // Karambit
  3803. {
  3804. *pWeapon->ModelIndex() = iKarambit; // m_nModelIndex
  3805. *pWeapon->ViewModelIndex() = iKarambit;
  3806. *pWeapon->WorldModelIndex() = iKarambit + 1;
  3807. *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 507;
  3808. *pWeapon->GetEntityQuality() = 3;
  3809.  
  3810. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  3811.  
  3812. if (Skin == 0)
  3813. {
  3814. *pWeapon->FallbackPaintKit() = 0; // Forest DDPAT
  3815. }
  3816. else if (Skin == 1)
  3817. {
  3818. *pWeapon->FallbackPaintKit() = 12; // Crimson Web
  3819. }
  3820. else if (Skin == 2)
  3821. {
  3822. *pWeapon->FallbackPaintKit() = 27; // Bone Mask
  3823. }
  3824. else if (Skin == 3)
  3825. {
  3826. *pWeapon->FallbackPaintKit() = 38; // Fade
  3827. }
  3828. else if (Skin == 4)
  3829. {
  3830. *pWeapon->FallbackPaintKit() = 40; // Night
  3831. }
  3832. else if (Skin == 5)
  3833. {
  3834. *pWeapon->FallbackPaintKit() = 42; // Blue Steel
  3835. }
  3836. else if (Skin == 6)
  3837. {
  3838. *pWeapon->FallbackPaintKit() = 43; // Stained
  3839. }
  3840. else if (Skin == 7)
  3841. {
  3842. *pWeapon->FallbackPaintKit() = 44; // Case Hardened
  3843. }
  3844. else if (Skin == 8)
  3845. {
  3846. *pWeapon->FallbackPaintKit() = 59; // Slaughter
  3847. }
  3848. else if (Skin == 9)
  3849. {
  3850. *pWeapon->FallbackPaintKit() = 72; // Safari Mesh
  3851. }
  3852. else if (Skin == 10)
  3853. {
  3854. *pWeapon->FallbackPaintKit() = 77; // Boreal Forest
  3855. }
  3856. else if (Skin == 11)
  3857. {
  3858. *pWeapon->FallbackPaintKit() = 98; // Ultraviolet
  3859. }
  3860. else if (Skin == 12)
  3861. {
  3862. *pWeapon->FallbackPaintKit() = 143; // Urban Masked
  3863. }
  3864. else if (Skin == 13)
  3865. {
  3866. *pWeapon->FallbackPaintKit() = 175; // Scorched
  3867. }
  3868. else if (Skin == 14)
  3869. {
  3870. *pWeapon->FallbackPaintKit() = 323; // Rust Coat
  3871. }
  3872. else if (Skin == 15)
  3873. {
  3874. *pWeapon->FallbackPaintKit() = 409; // Tiger Tooth
  3875. }
  3876. else if (Skin == 16)
  3877. {
  3878. *pWeapon->FallbackPaintKit() = 410; // Damascus Steel
  3879. }
  3880. else if (Skin == 17)
  3881. {
  3882. *pWeapon->FallbackPaintKit() = 411; // Damascus Steel
  3883. }
  3884. else if (Skin == 18)
  3885. {
  3886. *pWeapon->FallbackPaintKit() = 413; // Marble Fade
  3887. }
  3888. else if (Skin == 19)
  3889. {
  3890. *pWeapon->FallbackPaintKit() = 414; // Rust Coat
  3891. }
  3892. else if (Skin == 20)
  3893. {
  3894. *pWeapon->FallbackPaintKit() = 415; // Doppler Ruby
  3895. }
  3896. else if (Skin == 21)
  3897. {
  3898. *pWeapon->FallbackPaintKit() = 416; // Doppler Sapphire
  3899. }
  3900. else if (Skin == 22)
  3901. {
  3902. *pWeapon->FallbackPaintKit() = 417; // Doppler Blackpearl
  3903. }
  3904. else if (Skin == 23)
  3905. {
  3906. *pWeapon->FallbackPaintKit() = 418; // Doppler Phase 1
  3907. }
  3908. else if (Skin == 24)
  3909. {
  3910. *pWeapon->FallbackPaintKit() = 419; // Doppler Phase 2
  3911. }
  3912. else if (Skin == 25)
  3913. {
  3914. *pWeapon->FallbackPaintKit() = 420; // Doppler Phase 3
  3915. }
  3916. else if (Skin == 26)
  3917. {
  3918. *pWeapon->FallbackPaintKit() = 421; // Doppler Phase 4
  3919. }
  3920. else if (Skin == 27)
  3921. {
  3922. *pWeapon->FallbackPaintKit() = 570; // Doppler Phase 4
  3923. }
  3924. else if (Skin == 28)
  3925. {
  3926. *pWeapon->FallbackPaintKit() = 568; // Doppler Phase 4
  3927. }
  3928. else if (Skin == 27)
  3929. {
  3930. *pWeapon->FallbackPaintKit() = 569; // Gamma Doppler Phase1
  3931. }
  3932. else if (Skin == 28)
  3933. {
  3934. *pWeapon->FallbackPaintKit() = 570; // Gamma Doppler Phase2
  3935. }
  3936. else if (Skin == 29)
  3937. {
  3938. *pWeapon->FallbackPaintKit() = 571; // Gamma Doppler Phase3
  3939. }
  3940. else if (Skin == 30)
  3941. {
  3942. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Phase4
  3943. }
  3944. else if (Skin == 31)
  3945. {
  3946. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Emerald
  3947. }
  3948. else if (Skin == 32)
  3949. {
  3950. *pWeapon->FallbackPaintKit() = 561; // Lore
  3951. }
  3952.  
  3953. }
  3954. else if (Model == 8) // M9 Bayonet
  3955. {
  3956. *pWeapon->ModelIndex() = iM9Bayonet; // m_nModelIndex
  3957. *pWeapon->ViewModelIndex() = iM9Bayonet;
  3958. *pWeapon->WorldModelIndex() = iM9Bayonet + 1;
  3959. *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 508;
  3960. *pWeapon->GetEntityQuality() = 3;
  3961.  
  3962. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  3963.  
  3964. if (Skin == 0)
  3965. {
  3966. *pWeapon->FallbackPaintKit() = 0; // Forest DDPAT
  3967. }
  3968. else if (Skin == 1)
  3969. {
  3970. *pWeapon->FallbackPaintKit() = 12; // Crimson Web
  3971. }
  3972. else if (Skin == 2)
  3973. {
  3974. *pWeapon->FallbackPaintKit() = 27; // Bone Mask
  3975. }
  3976. else if (Skin == 3)
  3977. {
  3978. *pWeapon->FallbackPaintKit() = 38; // Fade
  3979. }
  3980. else if (Skin == 4)
  3981. {
  3982. *pWeapon->FallbackPaintKit() = 40; // Night
  3983. }
  3984. else if (Skin == 5)
  3985. {
  3986. *pWeapon->FallbackPaintKit() = 42; // Blue Steel
  3987. }
  3988. else if (Skin == 6)
  3989. {
  3990. *pWeapon->FallbackPaintKit() = 43; // Stained
  3991. }
  3992. else if (Skin == 7)
  3993. {
  3994. *pWeapon->FallbackPaintKit() = 44; // Case Hardened
  3995. }
  3996. else if (Skin == 8)
  3997. {
  3998. *pWeapon->FallbackPaintKit() = 59; // Slaughter
  3999. }
  4000. else if (Skin == 9)
  4001. {
  4002. *pWeapon->FallbackPaintKit() = 72; // Safari Mesh
  4003. }
  4004. else if (Skin == 10)
  4005. {
  4006. *pWeapon->FallbackPaintKit() = 77; // Boreal Forest
  4007. }
  4008. else if (Skin == 11)
  4009. {
  4010. *pWeapon->FallbackPaintKit() = 98; // Ultraviolet
  4011. }
  4012. else if (Skin == 12)
  4013. {
  4014. *pWeapon->FallbackPaintKit() = 143; // Urban Masked
  4015. }
  4016. else if (Skin == 13)
  4017. {
  4018. *pWeapon->FallbackPaintKit() = 175; // Scorched
  4019. }
  4020. else if (Skin == 14)
  4021. {
  4022. *pWeapon->FallbackPaintKit() = 323; // Rust Coat
  4023. }
  4024. else if (Skin == 15)
  4025. {
  4026. *pWeapon->FallbackPaintKit() = 409; // Tiger Tooth
  4027. }
  4028. else if (Skin == 16)
  4029. {
  4030. *pWeapon->FallbackPaintKit() = 410; // Damascus Steel
  4031. }
  4032. else if (Skin == 17)
  4033. {
  4034. *pWeapon->FallbackPaintKit() = 411; // Damascus Steel
  4035. }
  4036. else if (Skin == 18)
  4037. {
  4038. *pWeapon->FallbackPaintKit() = 413; // Marble Fade
  4039. }
  4040. else if (Skin == 19)
  4041. {
  4042. *pWeapon->FallbackPaintKit() = 414; // Rust Coat
  4043. }
  4044. else if (Skin == 20)
  4045. {
  4046. *pWeapon->FallbackPaintKit() = 415; // Doppler Ruby
  4047. }
  4048. else if (Skin == 21)
  4049. {
  4050. *pWeapon->FallbackPaintKit() = 416; // Doppler Sapphire
  4051. }
  4052. else if (Skin == 22)
  4053. {
  4054. *pWeapon->FallbackPaintKit() = 417; // Doppler Blackpearl
  4055. }
  4056. else if (Skin == 23)
  4057. {
  4058. *pWeapon->FallbackPaintKit() = 418; // Doppler Phase 1
  4059. }
  4060. else if (Skin == 24)
  4061. {
  4062. *pWeapon->FallbackPaintKit() = 419; // Doppler Phase 2
  4063. }
  4064. else if (Skin == 25)
  4065. {
  4066. *pWeapon->FallbackPaintKit() = 420; // Doppler Phase 3
  4067. }
  4068. else if (Skin == 26)
  4069. {
  4070. *pWeapon->FallbackPaintKit() = 421; // Doppler Phase 4
  4071. }
  4072. else if (Skin == 27)
  4073. {
  4074. *pWeapon->FallbackPaintKit() = 570; // Doppler Phase 4
  4075. }
  4076. else if (Skin == 28)
  4077. {
  4078. *pWeapon->FallbackPaintKit() = 568; // Doppler Phase 4
  4079. }
  4080. else if (Skin == 27)
  4081. {
  4082. *pWeapon->FallbackPaintKit() = 569; // Gamma Doppler Phase1
  4083. }
  4084. else if (Skin == 28)
  4085. {
  4086. *pWeapon->FallbackPaintKit() = 570; // Gamma Doppler Phase2
  4087. }
  4088. else if (Skin == 29)
  4089. {
  4090. *pWeapon->FallbackPaintKit() = 571; // Gamma Doppler Phase3
  4091. }
  4092. else if (Skin == 30)
  4093. {
  4094. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Phase4
  4095. }
  4096. else if (Skin == 31)
  4097. {
  4098. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Emerald
  4099. }
  4100. else if (Skin == 32)
  4101. {
  4102. *pWeapon->FallbackPaintKit() = 562; // Lore
  4103. }
  4104.  
  4105. }
  4106.  
  4107.  
  4108. else if (Model == 9) // Shadow Daggers
  4109. {
  4110. *pWeapon->ModelIndex() = iDagger; // m_nModelIndex
  4111. *pWeapon->ViewModelIndex() = iDagger;
  4112. *pWeapon->WorldModelIndex() = iDagger + 1;
  4113. *pWeapon->m_AttributeManager()->m_Item()->ItemDefinitionIndex() = 516;
  4114. *pWeapon->GetEntityQuality() = 3;
  4115.  
  4116. int Skin = Menu::Window.SkinchangerTab.KnifeSkin.GetIndex();
  4117.  
  4118. if (Skin == 0)
  4119. {
  4120. *pWeapon->FallbackPaintKit() = 5; // Forest DDPAT
  4121. }
  4122. else if (Skin == 1)
  4123. {
  4124. *pWeapon->FallbackPaintKit() = 12; // Crimson Web
  4125. }
  4126. else if (Skin == 2)
  4127. {
  4128. *pWeapon->FallbackPaintKit() = 27; // Bone Mask
  4129. }
  4130. else if (Skin == 3)
  4131. {
  4132. *pWeapon->FallbackPaintKit() = 38; // Fade
  4133. }
  4134. else if (Skin == 4)
  4135. {
  4136. *pWeapon->FallbackPaintKit() = 40; // Night
  4137. }
  4138. else if (Skin == 5)
  4139. {
  4140. *pWeapon->FallbackPaintKit() = 42; // Blue Steel
  4141. }
  4142. else if (Skin == 6)
  4143. {
  4144. *pWeapon->FallbackPaintKit() = 43; // Stained
  4145. }
  4146. else if (Skin == 7)
  4147. {
  4148. *pWeapon->FallbackPaintKit() = 44; // Case Hardened
  4149. }
  4150. else if (Skin == 8)
  4151. {
  4152. *pWeapon->FallbackPaintKit() = 59; // Slaughter
  4153. }
  4154. else if (Skin == 9)
  4155. {
  4156. *pWeapon->FallbackPaintKit() = 72; // Safari Mesh
  4157. }
  4158. else if (Skin == 10)
  4159. {
  4160. *pWeapon->FallbackPaintKit() = 77; // Boreal Forest
  4161. }
  4162. else if (Skin == 11)
  4163. {
  4164. *pWeapon->FallbackPaintKit() = 98; // Ultraviolet
  4165. }
  4166. else if (Skin == 12)
  4167. {
  4168. *pWeapon->FallbackPaintKit() = 143; // Urban Masked
  4169. }
  4170. else if (Skin == 13)
  4171. {
  4172. *pWeapon->FallbackPaintKit() = 175; // Scorched
  4173. }
  4174. else if (Skin == 14)
  4175. {
  4176. *pWeapon->FallbackPaintKit() = 323; // Rust Coat
  4177. }
  4178. else if (Skin == 15)
  4179. {
  4180. *pWeapon->FallbackPaintKit() = 409; // Tiger Tooth
  4181. }
  4182. else if (Skin == 16)
  4183. {
  4184. *pWeapon->FallbackPaintKit() = 410; // Damascus Steel
  4185. }
  4186. else if (Skin == 17)
  4187. {
  4188. *pWeapon->FallbackPaintKit() = 411; // Damascus Steel
  4189. }
  4190. else if (Skin == 18)
  4191. {
  4192. *pWeapon->FallbackPaintKit() = 413; // Marble Fade
  4193. }
  4194. else if (Skin == 19)
  4195. {
  4196. *pWeapon->FallbackPaintKit() = 414; // Rust Coat
  4197. }
  4198. else if (Skin == 20)
  4199. {
  4200. *pWeapon->FallbackPaintKit() = 415; // Doppler Ruby
  4201. }
  4202. else if (Skin == 21)
  4203. {
  4204. *pWeapon->FallbackPaintKit() = 416; // Doppler Sapphire
  4205. }
  4206. else if (Skin == 22)
  4207. {
  4208. *pWeapon->FallbackPaintKit() = 417; // Doppler Blackpearl
  4209. }
  4210. else if (Skin == 23)
  4211. {
  4212. *pWeapon->FallbackPaintKit() = 418; // Doppler Phase 1
  4213. }
  4214. else if (Skin == 24)
  4215. {
  4216. *pWeapon->FallbackPaintKit() = 419; // Doppler Phase 2
  4217. }
  4218. else if (Skin == 25)
  4219. {
  4220. *pWeapon->FallbackPaintKit() = 420; // Doppler Phase 3
  4221. }
  4222. else if (Skin == 26)
  4223. {
  4224. *pWeapon->FallbackPaintKit() = 421; // Doppler Phase 4
  4225. }
  4226. else if (Skin == 27)
  4227. {
  4228. *pWeapon->FallbackPaintKit() = 569; // Gamma Doppler Phase1
  4229. }
  4230. else if (Skin == 28)
  4231. {
  4232. *pWeapon->FallbackPaintKit() = 570; // Gamma Doppler Phase2
  4233. }
  4234. else if (Skin == 29)
  4235. {
  4236. *pWeapon->FallbackPaintKit() = 571; // Gamma Doppler Phase3
  4237. }
  4238. else if (Skin == 30)
  4239. {
  4240. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Phase4
  4241. }
  4242. else if (Skin == 31)
  4243. {
  4244. *pWeapon->FallbackPaintKit() = 568; // Gamma Doppler Emerald
  4245. }
  4246. else if (Skin == 32)
  4247. {
  4248. *pWeapon->FallbackPaintKit() = 561; // Lore
  4249. }
  4250.  
  4251. }
  4252. }
  4253.  
  4254. *pWeapon->OwnerXuidLow() = 0;
  4255. *pWeapon->OwnerXuidHigh() = 0;
  4256. *pWeapon->FallbackWear() = 0.001f;
  4257. *pWeapon->m_AttributeManager()->m_Item()->ItemIDHigh() = 1;
  4258.  
  4259. }
  4260. }
  4261. }
  4262.  
  4263. }
  4264. }
  4265. }
  4266. }
  4267.  
  4268. oFrameStageNotify(curStage);
  4269. }
  4270.  
  4271. void __fastcall Hooked_OverrideView(void* ecx, void* edx, CViewSetup* pSetup)
  4272. {
  4273. IClientEntity* pLocal = (IClientEntity*)Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  4274.  
  4275. if (Interfaces::Engine->IsConnected() && Interfaces::Engine->IsInGame())
  4276. {
  4277. if (Menu::Window.VisualsTab.Active.GetState() && pLocal->IsAlive() && !pLocal->IsScoped())
  4278. {
  4279. if (pSetup->fov = 90)
  4280. pSetup->fov = Menu::Window.VisualsTab.OtherFOV.GetValue();
  4281. }
  4282.  
  4283. oOverrideView(ecx, edx, pSetup);
  4284. }
  4285.  
  4286. }
  4287.  
  4288. void GetViewModelFOV(float& fov)
  4289. {
  4290. IClientEntity* localplayer = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  4291.  
  4292. if (Interfaces::Engine->IsConnected() && Interfaces::Engine->IsInGame())
  4293. {
  4294.  
  4295. if (!localplayer)
  4296. return;
  4297.  
  4298.  
  4299. if (Menu::Window.VisualsTab.Active.GetState())
  4300. fov += Menu::Window.VisualsTab.OtherViewmodelFOV.GetValue();
  4301. }
  4302. }
  4303.  
  4304. float __stdcall GGetViewModelFOV()
  4305. {
  4306. float fov = Hooks::VMTClientMode.GetMethod<oGetViewModelFOV>(35)();
  4307.  
  4308. GetViewModelFOV(fov);
  4309.  
  4310. return fov;
  4311. }
  4312.  
  4313. void __fastcall Hooked_RenderView(void* ecx, void* edx, CViewSetup &setup, CViewSetup &hudViewSetup, int nClearFlags, int whatToDraw)
  4314. {
  4315. static DWORD oRenderView = Hooks::VMTRenderView.GetOriginalFunction(6);
  4316.  
  4317. IClientEntity* pLocal = Interfaces::EntList->GetClientEntity(Interfaces::Engine->GetLocalPlayer());
  4318.  
  4319. __asm
  4320. {
  4321. PUSH whatToDraw
  4322. PUSH nClearFlags
  4323. PUSH hudViewSetup
  4324. PUSH setup
  4325. MOV ECX, ecx
  4326. CALL oRenderView
  4327. }
  4328. }
Advertisement
Add Comment
Please, Sign In to add comment