daily pastebin goal
41%
SHARE
TWEET

Untitled

a guest May 20th, 2018 98 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
  2. {
  3.     if (dwReason == DLL_PROCESS_ATTACH)
  4.     {
  5.         CreateThread; while (true) loop{
  6.             if (pFrameWork && pFrameWork->GetClientActor(&pLclActor))
  7.         {
  8.                 if (SelfBools.recul)
  9.                 {
  10.                     pLclActor->GetPlayer()->m_ignoreRecoil = true;
  11.                     IActor *pLclActor = NULL;
  12.             }
  13.                 SSystemGlobalEnvironment* pSSGE = (SSystemGlobalEnvironment*)(*(DWORD*)(SsystemGlobalEnvironmentAdressEU));
  14.                 I3DEngine* p3DEngine = pSSGE->p3DEngine;
  15.                 IGame* pIGame = IGame::GetIGame();
  16.                 ICVar* pLclICVar = pIGame->GetICvar();
  17.                 IGameFramework* pFrameWork = IGameFramework::GetGameFramework();
  18.             )
  19.  
  20.  
  21.         if (!bInit) {
  22.             Original_Present = (Prototype_Present)DetourFunction((PBYTE)GetDeviceAddress(17), (PBYTE)Hooked_Present);
  23.             Original_DrawIndexedPrimitive = (Prototype_DrawIndexedPrimitive)DetourFunction((PBYTE)GetDeviceAddress(82), (PBYTE)Hooked_DrawIndexedPrimitive);
  24.             bInit = true;
  25.         }
  26.     }
  27.     else if (dwReason == DLL_PROCESS_DETACH)
  28.     {
  29.         DetourRemove((PBYTE)Original_Present, (PBYTE)Hooked_Present);
  30.         DetourRemove((PBYTE)Original_DrawIndexedPrimitive, (PBYTE)Hooked_DrawIndexedPrimitive);
  31.     }
  32.  
  33.     return TRUE;
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top