Guest User

Untitled

a guest
Feb 21st, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.54 KB | None | 0 0
  1. #include <windows.h>
  2. #include <stdio.h>
  3.  
  4. #define HEX_ADR_PTR_PLAYERPOINTER       0x9E27B0
  5. #define DEC_ADR_PTR_PLAYERBASE          1169880
  6. #define DEC_ADR_OFS_PAUSEALLZOMBIES_1       66260
  7.  
  8. BOOL IsPlayer()
  9. {
  10.     DWORD dwPlayerPtr = *(DWORD*)(HEX_ADR_PTR_PLAYERPOINTER);
  11.     if(dwPlayerPtr != 0)
  12.     {
  13.         return TRUE;
  14.     }
  15.     else
  16.     {
  17.         return FALSE;
  18.     }
  19. }
  20.  
  21. struct CPauseAllZombies
  22. {
  23.     char xPauseAll[DEC_ADR_OFS_PAUSEALLZOMBIES_1]; // 0x0
  24.     BYTE PauseAll_1; // 0x102D4
  25.     BYTE PauseAll_2; // 0x102D5
  26.     BYTE PauseAll_3; // 0x102D6
  27.     BYTE PauseAll_4; // 0x102D7
  28. };
  29.  
  30. struct CBase
  31. {
  32.     char xUserbase[DEC_ADR_PTR_PLAYERBASE]; // 0x0
  33.     CPauseAllZombies** player; // 0x11D9D8
  34. };
  35.  
  36. CBase* pBase = (CBase*)(HEX_ADR_PTR_PLAYERPOINTER);
  37.  
  38. BOOL PauseAllZombies;
  39.  
  40. void PauseZombiesLoop()
  41. {
  42.     if(GetAsyncKeyState(VK_F4) &1)
  43.     {
  44.         PauseAllZombies = (!PauseAllZombies);
  45.     }
  46.     if(PauseAllZombies == TRUE)
  47.     {
  48.         for(int index = 4; index < 32; index ++)
  49.         {
  50.             CPauseAllZombies* pZombie = pBase->player[index];
  51.             pZombie->PauseAll_1=0;
  52.             pZombie->PauseAll_2=0;
  53.             pZombie->PauseAll_3=0;
  54.             pZombie->PauseAll_4=0;
  55.         }
  56.     }
  57. }
  58.  
  59. void PauseZombiesThread()
  60. {
  61.     for(;;)
  62.     {
  63.         if(PauseAllZombies == TRUE)
  64.         {
  65.             PauseZombiesLoop();
  66.         }
  67.         if(PauseAllZombies == FALSE)
  68.         {
  69.             Sleep(200);
  70.         }
  71.         else
  72.         {
  73.             Sleep(-0);
  74.         }
  75.     }
  76. }
  77.  
  78. BOOL WINAPI DllMain( HMODULE hDll, DWORD dwReason, LPVOID lpReserved )
  79. {
  80.     DisableThreadLibraryCalls(hDll);
  81.     if(dwReason == DLL_PROCESS_ATTACH)
  82.     {
  83.         CreateThread(0, 0, (LPTHREAD_START_ROUTINE)(PauseZombiesThread), 0, 0, 0);
  84.         return TRUE;
  85.     }
  86. }
Add Comment
Please, Sign In to add comment