rdsedmundo

pb hax

Jun 19th, 2012
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 40.07 KB | None | 0 0
  1. #include "Windows.h"
  2. #pragma warning(disable: 4700)
  3. LPTSTR TheBaseTread = "PointBlank.exe";
  4. LPTSTR TheBrother = "PointBlank.exe";
  5. //*_________________________________________________ ____________________
  6. //////////////////////////////////////////////////////////////////////////////////////////////////
  7. //////////////////////////////////////////////////////////////////////////////////////////////////
  8. DWORD dwI3EXEC, FsPeed, VK, VK1, Aim, Spion, Pasangg, Defusee, SpeedHacX, PI, PI1, Suicidee, TreadBase = 0;
  9. DWORD dwBase, ofsMNZ1, CheckProtection = 0;
  10. //////////////////////////////////////////////////////////////////////////////////////////////////
  11. //////////////////////////////////////////////////////////////////////////////////////////////////
  12. int Dewa = 0;
  13. BYTE FSPEED_ON [4] = {0x6F, 0x12, 0x83, 0x40};
  14. BYTE SPION_ON [2] = {0x00, 0x00};
  15. BYTE AVK_ON [6] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  16. BYTE AIM_ON [8] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  17. BYTE AIM_OFF [8] = {0x00, 0x00, 0x00, 0x20, 0x6C, 0xC1, 0x76, 0x3F};
  18. BYTE PASANG_ON [4] = {0x00, 0x00, 0xA0, 0x00};
  19. BYTE DEFUSE_ON [4] = {0x00, 0x00, 0xE0, 0x00};
  20. BYTE SPEED_ON [2] = {0x90, 0x3F};
  21. //BYTE HacX_OFF [2] = {0x84,, 0x3F};
  22. BYTE PI_ON [16] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  23. #define BrutalSG 0x4CF108 //PointBlank.exe+4CE108
  24. #define Anti_VK 0x58CFA4 //PointBlank.exe+58BFA4
  25. #define Anti_VK1 0x58D1E4 //PointBlank.exe+58C1E4
  26. #define Aim_Datar 0x4BE5E0 //PointBlank.exe+4BD5E0
  27. #define Pasang 0x4BD904 //PointBlank.exe+4BC904
  28. #define Defuse 0x4CA228 //PointBlank.exe+4C9228
  29. #define SpeedHack 0x4C4BD6 //PointBlank.exe+4C3BD6
  30. #define Anti_PI 0x4BEDDC //PointBlank.exe+4BDDDC
  31. #define Anti_PI1 0x4CF044 //PointBlank.exe+4CE044
  32. #define Suicide 0x4C4BD0 //PointBlank.exe+4C3BD0
  33. //////////////////////////////////////////////////////////////////////////////////////////////////
  34. #define Base_Player 0x632A58 //PointBlank.exe+00631A58
  35. #define Base_Weapon 0x632A3C //PointBlank.exe+00631A3C
  36. //////////////////////////////////////////////////////////////////////////////////////////////////
  37. //////////////////////////////////////////////////////////////////////////////////////////////////
  38. //================================================== ==============================​?================== ================================//
  39. DWORD dwBase,ofsMNZ1, CheckProtection, adrOTB=0;
  40. int StatusWeapon = 0;
  41. void AlldyTeamElite(void *adress, void *Pointer, int Byte)
  42. {
  43. memcpy (adress,Pointer,Byte);
  44. }
  45.  
  46. BOOL TreadCalled(unsigned long ADRexec, int OFSexec, int PTRexec)
  47. {
  48. }
  49. void HHack(DWORD DKK,DWORD CHT,DWORD PBExec, DWORD PTRExec, BYTE VirFS)
  50. {
  51. DWORD A=0;
  52. if (IsBadHugeReadPtr((LPDWORD)DKK,4)==0)
  53. {
  54. A=*(PDWORD)((DWORD)(DKK))+CHT;
  55. if (IsBadHugeReadPtr((LPDWORD)A,4)==0)
  56. {
  57. A=*(PDWORD)((DWORD)(A))+PBExec;
  58. if (IsBadHugeReadPtr((LPDWORD)A,4)==0)
  59. {
  60. A=*(PDWORD)((DWORD)(A))+PTRExec;
  61. if (IsBadHugeReadPtr((LPDWORD)A,4)==0)
  62. {
  63. *(PBYTE)A=VirFS;
  64. }
  65. }
  66. }
  67. }
  68. }
  69.  
  70. DWORD WINAPI PTAlldy(LPVOID param)
  71. {
  72. while (1)
  73. {
  74. /************************************************** ******************************​?****************** ***********************************/
  75. //====================== UNLIMITED AMMO =========================//
  76. if (StatusWeapon==1){
  77. DWORD dwI3EXEC = (DWORD)GetModuleHandleA(TheBaseTread);
  78. DWORD dwBasei3Exec = dwI3EXEC + (DWORD)Base_Weapon;
  79. int i;
  80. for(i=0x50;i<=0x347;i+=4)
  81. {
  82. HHack(dwBasei3Exec,0x174,i,0xF4B,0x46);
  83. HHack(dwBasei3Exec,0x174,i,0xEE0,0x46);
  84. HHack(dwBasei3Exec,0x174,i,0xEE1,0x46);
  85. HHack(dwBasei3Exec,0x174,i,0xEE2,0x46);
  86. }
  87. }
  88. ///====================== 1 hit+Burst =========================//
  89. if (StatusWeapon==2)
  90. {
  91. DWORD dwI3EXEC = (DWORD)GetModuleHandleA(TheBaseTread);
  92. DWORD dwBasei3Exec = dwI3EXEC + (DWORD)Base_Weapon;
  93. int i;
  94. for(i=0x50;i<=0x347;i+=4){
  95. HHack(dwBasei3Exec,0x174,i,0x4F0,0x46);
  96. HHack(dwBasei3Exec,0x174,i,0xEC4,0x30);
  97. HHack(dwBasei3Exec,0x174,i,0x50F,0x46);
  98. }
  99. }
  100. /*-------------------------------- Ammo Global ---------------------------------*/
  101. if(GetAsyncKeyState(VK_HOME)&1)
  102. {
  103. MessageBeep(MB_ICONINFORMATION);
  104. StatusWeapon =1;
  105. }
  106. /*--------------------------------Reset Pointer ---------------------------------*/
  107. {
  108. }
  109. /*_________________________________ Anti Ilegal __________________________________*/
  110. DWORD dwI3EXEC = (DWORD)GetModuleHandleA(TheBrother);
  111. if(dwI3EXEC > 0)
  112. {
  113. DWORD FsPeed = dwI3EXEC + BrutalSG;
  114. DWORD VK = dwI3EXEC + Anti_VK;
  115. DWORD VK1 = dwI3EXEC + Anti_VK1;
  116. DWORD PI = dwI3EXEC + Anti_PI;
  117. DWORD PI1 = dwI3EXEC + Anti_PI1;
  118. AlldyTeamElite((void *)(FsPeed),(void*)(PBYTE)FSPEED_ON,4);
  119. AlldyTeamElite((void *)(VK),(void*)(PBYTE)AVK_ON,6);
  120. AlldyTeamElite((void *)(VK1),(void*)(PBYTE)AVK_ON,6);
  121. AlldyTeamElite((void *)(PI),(void*)(PBYTE)PI_ON,16);
  122. AlldyTeamElite((void *)(PI1),(void*)(PBYTE)PI_ON,16);
  123. }
  124. //============================== Pasang+Defius ================================================== ===========//
  125. if(GetAsyncKeyState(VK_INSERT)&1){
  126. DWORD dwI3EXEC = (DWORD)GetModuleHandleA(TheBrother);
  127. if (dwI3EXEC > 0){
  128. Beep(523,500);
  129. Pasangg = dwI3EXEC + Pasang;
  130. Defusee = dwI3EXEC + Defuse;
  131. AlldyTeamElite((void*)Pasangg, (char *)PASANG_ON,4);
  132. AlldyTeamElite((void*)Defusee, (char *)DEFUSE_ON,4);
  133. }
  134. }
  135. //------------------------------ Aimbot Datar ----------------------------------
  136. if(GetAsyncKeyState(VK_F1)&1){
  137. DWORD dwI3EXEC = (DWORD)GetModuleHandleA(TheBrother);
  138. if (dwI3EXEC > 0){
  139. Beep(523,500);
  140. Aim = dwI3EXEC + Aim_Datar;
  141. AlldyTeamElite((void*)Aim, (char *)AIM_ON,8);
  142. }
  143. }
  144. if(GetAsyncKeyState(VK_F2)&1){
  145. DWORD dwI3EXEC = (DWORD)GetModuleHandleA(TheBrother);
  146. if (dwI3EXEC > 0){
  147. Beep(523,500);
  148. Aim = dwI3EXEC + Aim_Datar;
  149. AlldyTeamElite((void*)Aim, (char *)AIM_OFF,8);
  150. }
  151. }
  152. //------------------------------ SpeedHack ----------------------------------
  153. if(GetAsyncKeyState(VK_F3)&1){
  154. DWORD dwI3EXEC = (DWORD)GetModuleHandleA(TheBrother);
  155. if (dwI3EXEC > 0){
  156. Beep(523,500);
  157. SpeedHacX = dwI3EXEC + SpeedHack;
  158. AlldyTeamElite((void*)SpeedHacX, (char *)SPEED_ON,2);
  159. }
  160. }
  161. if(GetAsyncKeyState(VK_F4)&1){
  162. DWORD dwI3EXEC = (DWORD)GetModuleHandleA(TheBrother);
  163. if (dwI3EXEC > 0){
  164. Beep(523,500);
  165. SpeedHacX = dwI3EXEC + SpeedHack;
  166. AlldyTeamElite((void*)SpeedHacX, (char *)"\x84\x3F",2);
  167. }
  168. }
  169. //------------------------------------------------------------------------------
  170. }
  171. Sleep(15);
  172. }
  173. //================================================== ==========================
  174. BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
  175. {
  176. if(dwReason == DLL_PROCESS_ATTACH)
  177. {
  178. char strDLLName [_MAX_PATH];
  179. Sleep(200);
  180. GetModuleFileName(hModule, strDLLName , _MAX_PATH);
  181. if (strstr(strDLLName, "v2.dll") <= 0) {
  182. MessageBox(0, "", "RENAMER & RESHACKER", MB_OK + MB_ICONSTOP );
  183. ExitProcess(0);
  184. }
  185. Beep(1000, 500);
  186. MessageBox (0,"Credit : AlldyTeamElite","© PT.Alldy Software ©", MB_OKCANCEL + MB_ICONINFORMATION);
  187. MessageBox (0,"Special Thank To :\n- Heldy TeamElite\n- Vj AsWin DX\n- Zick TeamElite\n- All Member PT.Alldy","TERIMA KASIH", MB_OK + MB_ICONINFORMATION);
  188. MessageBox (0,"Fiture & Hotkey :\n- Ammo : Home\n- Pasang Or Defuse : Insert\n- Aimbot Datar : F1 ON & F2 OFF\n- SpeedHack : F3 ON & F4 OFF\n- Spion Mode : ?? ON & ?? OFF\n- Brutal SG : Auto ON\n- Anti PI : Auto ON\n- Anti VK : Auto ON","Hady_HacX", MB_OK + MB_ICONINFORMATION);
  189. system("start https://www.facebook.com/profile.php?id=100002343800542");
  190. system("start http://bpp-probase.******/forum/");
  191. CreateThread(0,0,(LPTHREAD_START_ROUTINE)PTAlldy,0 ,0,0);
  192. }
  193. return TRUE;
  194. }
  195. __________________________________________________ ___________
  196.  
  197. >> 2 HacX
  198.  
  199. #include <windows.h>
  200. #pragma warning(disable: 4700)
  201. LPTSTR PBlankExe = "PointBlank.exe"; //Target Yang Terbaru ^__^
  202. LPTSTR TheBrother = "PointBlank.exe";
  203. DWORD Gravity, adrSpeed, dwExe, adrProteck, AIM_DATAR, Enemy, adrRep, adrBrutal, FullHack, ofsMNZ1, dwBase, Change, CheckProtection;
  204.  
  205. void AlldyTeamEliteDX(void *adr, void *ptr, int size)
  206. {
  207. DWORD CheckProtection;
  208. VirtualProtect(adr,size,PAGE_EXECUTE_READWRITE, &ofsMNZ1);
  209. RtlMoveMemory(adr,ptr,size);
  210. VirtualProtect(adr,size,CheckProtection, &dwBase);
  211. }
  212. int SS = 0;
  213. int BB = 0;
  214. int __fastcall AlldyJk(void)
  215. {
  216. return 0;
  217. }
  218. int Alldy = 0;
  219. BOOL AlldyTeamElite(unsigned long ADRexec, int OFSexec, int PTRexec)
  220. {
  221. if (!IsBadWritePtr((void*)ADRexec, sizeof(unsigned long)))
  222. {
  223. if (!IsBadWritePtr((void*)(*(unsigned long*)ADRexec + OFSexec), sizeof(unsigned long)))
  224. {
  225. *(int*)(*(unsigned long*)ADRexec + OFSexec) = PTRexec;
  226. }
  227. }
  228. return (0);
  229. }
  230. int __fastcall AlldyGantengLho(void)
  231. {
  232. return (0);
  233. }
  234.  
  235. DWORD WINAPI AlldySpecialFullHack(LPVOID param)
  236. {
  237. while(1)
  238. {
  239. AlldyGantengLho();
  240. AlldyGantengLho();
  241. AlldyGantengLho();
  242. AlldyGantengLho();
  243. AlldyGantengLho();
  244. AlldyGantengLho();
  245. AlldyGantengLho();
  246. AlldyGantengLho();
  247. AlldyGantengLho();
  248. AlldyGantengLho();
  249. AlldyGantengLho();
  250.  
  251. //======================OFFSET====================== ==
  252. #define Plant 0x4BC904
  253. #define Deafuse 0x4C9228
  254. #define AntiIlegal 0x5C65F8 // Anti Ilegal
  255. #define TagName 0x26F9D5 // ESP Name
  256. #define BrutalAllWeapon 0x4CF168
  257. #define AntiVoteKick 0x4B9F78
  258. #define Darah 0X******
  259. #define DCin1ROOM 0X******
  260. //=======================Byte======================= ======
  261. int Dewa = 0;
  262. /*BYTE FSPEED [4] = {0x6F, 0x12, 0x83, 0x40};
  263. BYTE MSPEED [8] = {0x00, 0x00, 0x00, 0x40 , 0xE1 , 0x7A , 0x89 , 0x3F};
  264. BYTE KICKON [4] = {0xFF, 0xFF, 0xFF, 0x50};
  265. BYTE KICKOF [4] = {0x6F, 0x12, 0x83, 0x3C};
  266. BYTE AntiOF [4] = {0x00, 0x00, 0x00, 0x00};
  267. BYTE AntiON [4] = {0x00, 0x00, 0x20, 0x42};
  268. BYTE K400ON [2] = {0x00, 0x00};
  269. BYTE K400OF [2] = {0x2e, 0x40};
  270. BYTE TuyulOF [1] = {0x84};
  271. BYTE TuyulON [1] = {0xA0};
  272. BYTE defusOFF [4] = {0x40, 0x40, 0x40, 0x40};
  273. BYTE plantOFF [4] = {0x40, 0x40, 0x40, 0x40};
  274. BYTE defusON [4] = {0x00, 0x00, 0x00, 0x00};
  275. BYTE plantON [4] = {0x00, 0x00, 0x00, 0x00};
  276. BYTE FZ1ON [4] = {0x00, 0x00, 0x00, 0x00};
  277. BYTE FZ2ON [15] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
  278. BYTE DarahON [1] = {0xFF};
  279. BYTE DarahOFF [1] = {0x3F};
  280. BYTE AntiIlegal [7] = {x00,x00,x00,x00,x00,x00,xFF};
  281. BYTE ESPName [6] = {xE9,x01,x00,x00,x00,x00};
  282. BYTE BrutalSG[4] = {x6F,x12,x83,x40};
  283. */
  284. //=======================================Brutal SG==============================================//New
  285.  
  286. if(GetAsyncKeyState(VK_Delete)&1){
  287. FullHack = (DWORD)GetModuleHandleA("PointBlank.exe");
  288. DWORD Brutal_SG = FullHack + 0x4CF168;
  289. AlldyTeamEliteDX((void *)(AIM_DATAR),(void*)(PBYTE)"{x6F,x12,x83,x40};
  290. MessageBeep(MB_ICONWARNING);
  291. AlldyGantengLho();
  292. }
  293.  
  294. //=======================================Ambiot Datar ON=====================================//New
  295.  
  296. if(GetAsyncKeyState(VK_HOME)&1){
  297. FullHack = (DWORD)GetModuleHandleA("PointBlank.exe");
  298. DWORD AIM_DATAR = FullHack + 0x4BE5E0;
  299. AlldyTeamEliteDX((void *)(AIM_DATAR),(void*)(PBYTE)"\x00\x00\x00\x00\x00\ x00\x00\x00",8);
  300. MessageBeep(MB_ICONWARNING);
  301. AlldyGantengLho();
  302. }
  303.  
  304. //=======================================Aim Datar ( OFF )=====================================//New
  305.  
  306. if(GetAsyncKeyState(VK_INSERT)&1){
  307. FullHack = (DWORD)GetModuleHandleA("PointBlank.exe");
  308. DWORD AIM_DATAR = FullHack + 0x4BE5E0;
  309. AlldyTeamEliteDX((void *)(AIM_DATAR),(void*)(PBYTE)"\x00\x00\x00\x20\x6C\ xC1\x76\x3F",8);
  310. MessageBeep(MB_ICONWARNING);
  311. AlldyGantengLho();
  312. }
  313. //==================================Pasang bom 0 Detik Or Pasang===================================//New
  314.  
  315. if(GetAsyncKeyState(VK_END)&1){
  316. FullHack = (DWORD)GetModuleHandleA("PointBlank.exe");
  317. DWORD adrPlant = FullHack + 0x4CA288;
  318. DWORD adrDefuse = FullHack + 0x4BD904;
  319. AlldyTeamEliteDX((void *)(adrPlant),(int*)(PBYTE)"\x00\x00\xA0\x00",4);
  320. AlldyTeamEliteDX((void *)(adrDefuse),(int*)(PBYTE)"\x00\x00\xE0\x00",4);
  321. MessageBeep(MB_ICONWARNING);
  322. AlldyGantengLho();
  323. }
  324. ..=========================================Ghots On=============================================//New
  325. if(GetAsyncKeyState(VK_F3)&1)
  326. {
  327. FullHack= (DWORD)GetModuleHandleA("PointBlank.exe");
  328. DWORD Ghots= FullHack + 0x52A69E;
  329. AlldyTeamEliteDX((void *)(BOMB),(void*)(PBYTE)"\x00\x00",2);
  330. MessageBeep(MB_ICONWARNING);
  331. AlldyGantengLho();
  332. }
  333. //=========================================Ghots off=============================================//New
  334. if(GetAsyncKeyState(VK_F4)&1)
  335. {
  336. FullHack = (DWORD)GetModuleHandleA("PointBlank.exe");
  337. DWORD Ghots= FullHack + 0x52A69E;
  338. AlldyTeamEliteDX((void *)(BOMB),(void*)(PBYTE)"\x2E\x40",2);
  339. MessageBeep(MB_ICONWARNING);
  340. AlldyGantengLho();
  341. }
  342.  
  343. //------------------------------------------------------------------------------
  344. {
  345. Sleep(0);
  346. }
  347. }
  348. return(0);
  349. }
  350. //------------------------------------------------------------------------------
  351. DWORD WINAPI AlldySpecialHack(LPVOID param)
  352. {
  353. while (1)
  354. {
  355. //========================MENGHINDARI AHNHS_ENGINE_DETECT_GAMEHACK==============
  356. AlldyJk();
  357. //------------------------------------------------------------------------------
  358. {
  359. Sleep(100);// Terserah loe mao di ganti brpa !!( Yg Penting TAHAN LAMA )
  360. }
  361. }
  362. return(0);
  363. }
  364. //------------------------------------------------------------------------------
  365. BOOL WINAPI DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved)
  366. {
  367. if(dwReason == DLL_PROCESS_ATTACH) {
  368. char strDLLName [_MAX_PATH];
  369. Sleep(200);
  370. MessageBox (0,"Credit By : \n[X] Alldy TëàmÉlitë ( ME )\n[X] VJ AsWin Dx ( MY Suhu )","Alldy Cheaters Cupu", MB_OKCANCEL | MB_ICONINFORMATION); // Plzzz JANGAN DI GANTI ( AGAR TAHAN LAMA Big Grin)
  371. MessageBox (0,"Thank's to :\n[X] Devata Code Fredi ( MY FRIED )\n[X] AsWa*r TeamElite'Dx ( MY Fried )\n[X] All Member PT.Alldy ( My Grup )","PT.AlldySoft", MB_OK | MB_ICONINFORMATION); // Jangan Di ganti kalau mau tambah aja OK
  372. MessageBox (0,"http://n5hackercyber.********.com/" ,"WEB RESMI KAMI", MB_OKCANCEL | MB_ICONINFORMATION); // Agar Tahan lama Big Grin
  373. MessageBox (0,"https://www.facebook.com/profile.php?id=100002343800542" ,"FB RESMI DARI KAMI", MB_OKCANCEL | MB_ICONINFORMATION); // Agar Tahan lama Big Grin
  374. system("start http://n5hackercyber.********.com/"); //kalau Diganti Gax Akan Work All Windows Big Grin
  375. //------------------------------------------------------------------------------
  376. CreateThread(0, 0, (LPTHREAD_START_ROUTINE)AlldySpecialFullHack, 0, 0, 0);
  377. CreateThread(0, 0, (LPTHREAD_START_ROUTINE)AlldySpecialHack, 0, 0, 0);
  378. }
  379.  
  380. return TRUE;
  381. }
  382. __________________________________________________ ___________
  383.  
  384. >> 3 ESP Base
  385.  
  386. #define NAMESIZE 0x21
  387. #define OFS_NAMES 0x5D2C
  388. #define OFS_HEALTH 0x344
  389. #define HPSIZE 0x1C
  390. #define MAXPLAYERS 16
  391. #define PLAYERSIZE 0x11A8
  392. #define OFS_BASEPLAYER 0x631A58
  393. #define OFS_PLAYER 0x74BC
  394. #define OFS_TEAM 0x6150
  395. #define OFS_RDATA 0x189080
  396.  
  397.  
  398. #define OFS_Grade 0x5AD1
  399. #define GradeSIZE 0x26
  400.  
  401.  
  402.  
  403. CHAR FrameRate[20] = "[+]";
  404.  
  405.  
  406. DWORD dwGFX = (DWORD)GetModuleHandle("i3GfxDx.dll");
  407. RenderContext *pRC = (RenderContext*)(dwGFX + OFS_RDATA);
  408.  
  409.  
  410.  
  411. bool WorldToScreen(D3DVECTOR Player,D3DVECTOR &PlayerScaled)
  412. {
  413. D3DXVECTOR3 PlayerPos(Player.x,Player.y,Player.z);
  414. D3DXMATRIX identity;
  415. D3DXVECTOR3 vScreen;
  416.  
  417. npDevice->GetViewport(&g_ViewPort);
  418. g_ViewPort.X = g_ViewPort.Y = 0;
  419. g_ViewPort.MinZ = 0;
  420. g_ViewPort.MaxZ = 1;
  421. D3DXVec3Project(&vScreen, &PlayerPos, &g_ViewPort, &pRC->pRenderData->ProjMatrix, &pRC->pRenderData->ViewMatrix, &pRC->pRenderData->GetWorldMatrix);
  422.  
  423. if (vScreen.z < 1.0f && vScreen.x > 0.0f && vScreen.y > 0.0f && vScreen.x < g_ViewPort.Width && vScreen.y < g_ViewPort.Height)
  424. {
  425. PlayerScaled.x = vScreen.x;
  426. PlayerScaled.y = vScreen.y ;
  427. PlayerScaled.z = vScreen.z;
  428.  
  429. return true;
  430. }
  431. return false;
  432. }
  433.  
  434.  
  435.  
  436.  
  437.  
  438. void FillRGB( float x, float y, float w, float h, D3DCOLOR color)
  439. {
  440. if( w < 0 )w = 1;
  441. if( h < 0 )h = 1;
  442. if( x < 0 )x = 1;
  443. if( y < 0 )y = 1;
  444.  
  445. D3DRECT rec = { x, y, x + w, y + h };
  446. npDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
  447. }
  448.  
  449.  
  450.  
  451.  
  452. void DrawBox1(float x, float y, float w, float h, D3DCOLOR color )
  453. {
  454. D3DRECT rec;
  455. rec.x1 = x;
  456. rec.x2 = x + w;
  457. rec.y1 = y;
  458. rec.y2 = y + h;
  459. npDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
  460. }
  461.  
  462.  
  463.  
  464.  
  465.  
  466. void DrawString(float x, float y , DWORD color, const char *fmt, ...)
  467. {
  468. RECT FontPos = { x, y, x + 20, y + 10 };
  469. char buf[1024] = {'\0'};
  470. va_list va_alist;
  471. va_start(va_alist, fmt);
  472. vsprintf(buf, fmt, va_alist);
  473. va_end(va_alist);
  474. g_pFont->DrawText(NULL, buf, -1, &FontPos, DT_NOCLIP, color);
  475. }
  476.  
  477.  
  478.  
  479. D3DVECTOR HeadPos;
  480. D3DVECTOR FootPos;
  481. D3DVECTOR ScreenPos;
  482.  
  483.  
  484.  
  485. #define BLACK D3DCOLOR_ARGB(150, 000, 000, 000)
  486. #define WHITE D3DCOLOR_ARGB(255, 255, 255, 255)
  487. #define RED D3DCOLOR_ARGB(255, 255, 000, 000)
  488. #define GREEN D3DCOLOR_ARGB(255, 000, 255, 000)
  489. #define YELLOW D3DCOLOR_ARGB(255, 255, 255, 000)
  490. #define BLUE D3DCOLOR_ARGB(255, 000, 000, 255)
  491. #define SKYBLUE D3DCOLOR_ARGB(255, 0, 180, 255)
  492. #define RED2 D3DCOLOR_ARGB(100, 255, 000, 000)
  493.  
  494.  
  495.  
  496. void DrawBorder( float x, float y, float w, float h, int px, float Health)
  497. {
  498. DWORD HPcol = GREEN;
  499. if (Health < 90 )HPcol = BLUE;
  500. if (Health < 70 )HPcol = SKYBLUE;
  501. if (Health < 50 )HPcol = YELLOW;
  502. if (Health < 30) HPcol = RED;
  503. if (Health < 10) HPcol = RED2;
  504. if (Health = 0) HPcol = BLACK;
  505. FillRGB( x, (y + h - px), w, px, HPcol);
  506. FillRGB( x, y, px, h, HPcol);
  507. FillRGB( x, y, w, px, HPcol);
  508. FillRGB( (x + w - px), y, px, h, HPcol);
  509. }
  510.  
  511.  
  512. void FillRGB3( int x, int y, int w, int h, D3DCOLOR color, IDirect3DDevice9* pDevice )
  513. {
  514. if( w < 0 )w = 1;
  515. if( h < 0 )h = 1;
  516. if( x < 0 )x = 1;
  517. if( y < 0 )y = 1;
  518.  
  519. D3DRECT rec = { x, y, x + w, y + h };
  520. pDevice->Clear( 1, &rec, D3DCLEAR_TARGET, color, 0, 0 );
  521. }
  522.  
  523.  
  524.  
  525. void DrawBorder333( int x, int y, int w, int h, int px, D3DCOLOR BorderColor, IDirect3DDevice9* pDevice )
  526. {
  527. FillRGB3( x, (y + h - px), w, px, BorderColor, pDevice );
  528. FillRGB3( x, y, px, h, BorderColor, pDevice );
  529. FillRGB3( x, y, w, px, BorderColor, pDevice );
  530. FillRGB3( (x + w - px), y, px, h, BorderColor, pDevice );
  531. }
  532.  
  533.  
  534.  
  535.  
  536.  
  537. void Healthbar(int x, int y, float Health)
  538. {
  539. DWORD HPcol = GREEN;
  540. if (Health < 90 )HPcol = BLUE;
  541. if (Health < 70 )HPcol = SKYBLUE;
  542. if (Health < 50 )HPcol = YELLOW;
  543. if (Health < 30) HPcol = RED;
  544. if (Health < 10) HPcol = RED2;
  545. DrawBorder333(x-1,y-1,50,6,1,BLACK,npDevice);
  546. FillRGB3(x,y,Health/2,4,HPcol,npDevice);
  547. }
  548.  
  549.  
  550. void DrawRectangle(float x, float y, float w, int h)
  551. {
  552. D3DXVECTOR2 vLine1[2];
  553. D3DXVECTOR2 vLine2[2];
  554. D3DXVECTOR2 vLine3[2];
  555. D3DXVECTOR2 vLine4[2];
  556. vLine1[0].x = x;
  557. vLine1[0].y = y;
  558. vLine1[1].x = x;
  559. vLine1[1].y = y+h;
  560. vLine2[0].x = x+w;
  561. vLine2[0].y = y;
  562. vLine2[1].x = x+w;
  563. vLine2[1].y = y+h;
  564. vLine3[0].x = x;
  565. vLine3[0].y = y;
  566. vLine3[1].x = x+w;
  567. vLine3[1].y = y;
  568. vLine4[0].x = x;
  569. vLine4[0].y = y+h;
  570. vLine4[1].x = x+w;
  571. vLine4[1].y = y+h;
  572. g_pLine->SetWidth(2);
  573. g_pLine->SetAntialias(false);
  574. g_pLine->SetGLLines(false);
  575. g_pLine->Begin();
  576. g_pLine->Draw(vLine1, 2, 0xFF0000FF);
  577. g_pLine->Draw(vLine2, 2, 0xFF0000FF);
  578. g_pLine->Draw(vLine3, 2, 0xFF0000FF);
  579. g_pLine->Draw(vLine4, 2, 0xFF0000FF);
  580. g_pLine->End();
  581.  
  582. }
  583.  
  584. void DrawLine ( long Xa, long Ya, long Xb, long Yb, DWORD dwWidth, float Health)
  585. {
  586. DWORD HPcol = GREEN; // Deklarasi Health Protection Color
  587. if (Health < 90 )HPcol = BLUE; // Jika HP Di Bawah 90 = Color
  588. if (Health < 70 )HPcol = SKYBLUE; // Jika HP Di Bawah 70 = Color
  589. if (Health < 50 )HPcol = YELLOW; // Jika HP Di Bawah 50 = Color
  590. if (Health < 30) HPcol = RED; // Jika HP Di Bawah 30 = Color
  591. if (Health < 10) HPcol = RED2; // Jika HP Di Bawah 10 = Color
  592. if (Health = 0) HPcol = BLACK; // Jika HP Di Bawah 10 = Color
  593. D3DXVECTOR2 vLine[ 2 ]; // 2 Poin
  594. g_pLine->SetAntialias( 0 ); // Set Tepi
  595. g_pLine->SetWidth( dwWidth ); // Lebar Dari Line
  596. g_pLine->Begin();
  597. vLine[ 0 ][ 0 ] = Xa; // Jadikan Point Menjadi Array
  598. vLine[ 0 ][ 1 ] = Ya;
  599. vLine[ 1 ][ 0 ] = Xb;
  600. vLine[ 1 ][ 1 ] = Yb;
  601. g_pLine->Draw( vLine, 2, HPcol ); // Draw Garis , Jumlah Garis , Warna Garis
  602. g_pLine->End(); // Selesai
  603. }
  604.  
  605.  
  606. ID3DXLine *pLine; //Deklarasi pLine
  607.  
  608.  
  609. void Draw3DBox(float x_bottom_left, float y_bottom_left, float x_bottom_right, float y_bottom_right, float x_top_left, float y_top_left, float x_top_right, float y_top_right, float x_forward_bottom_left, float y_forward_bottom_left, float x_forward_bottom_right, float y_forward_bottom_right, float x_forward_top_left, float y_forward_top_left, float x_forward_top_right, float y_forward_top_right, int a, int r, int g, int b)
  610. {
  611. if(!IsBadReadPtr(pLine, sizeof(ID3DXLine)))
  612. {
  613. D3DXVECTOR2 vLine1[2];
  614. D3DXVECTOR2 vLine2[2];
  615. D3DXVECTOR2 vLine3[2];
  616. D3DXVECTOR2 vLine4[2];
  617. D3DXVECTOR2 vLine5[2];
  618. D3DXVECTOR2 vLine6[2];
  619. D3DXVECTOR2 vLine7[2];
  620. D3DXVECTOR2 vLine8[2];
  621. D3DXVECTOR2 vLine9[2];
  622. D3DXVECTOR2 vLine10[2];
  623. D3DXVECTOR2 vLine11[2];
  624. D3DXVECTOR2 vLine12[2];
  625.  
  626. float t=1;
  627. pLine->SetWidth( t );
  628. pLine->SetAntialias( false );
  629. pLine->SetGLLines( false );
  630.  
  631. //bottom left to bottom right
  632. vLine1[0].x = x_bottom_left;
  633. vLine1[0].y = y_bottom_left;
  634. vLine1[1].x = x_bottom_left+(x_bottom_right-x_bottom_left);
  635. vLine1[1].y = y_bottom_left;
  636.  
  637. //bottom left to top left
  638. vLine2[0].x = x_top_left;
  639. vLine2[0].y = y_top_left;
  640. vLine2[1].x = x_top_left;
  641. vLine2[1].y = y_top_left+(y_bottom_left-y_top_left);
  642.  
  643. //bottom right to top right
  644. vLine3[0].x = x_top_right;
  645. vLine3[0].y = y_top_right;
  646. vLine3[1].x = x_top_right;
  647. vLine3[1].y = y_top_right+(y_bottom_right-y_top_right);
  648.  
  649. //top left to top right
  650. vLine4[0].x = x_top_left;
  651. vLine4[0].y = y_top_left;
  652. vLine4[1].x = x_top_left+(x_top_right-x_top_left);
  653. vLine4[1].y = y_top_left;
  654.  
  655. //from top left to top left forward
  656. vLine5[0].x = x_top_left;
  657. vLine5[0].y = y_top_left;
  658. vLine5[1].x = x_top_left+(x_forward_top_left-x_top_left);
  659. vLine5[1].y = y_top_left+(y_forward_top_left-y_top_left);
  660.  
  661. //from bottom left to bottom left forward
  662. vLine6[0].x = x_bottom_left;
  663. vLine6[0].y = y_bottom_left;
  664. vLine6[1].x = x_bottom_left+(x_forward_bottom_left-x_bottom_left);//
  665. vLine6[1].y = y_bottom_left+(y_forward_bottom_left-y_bottom_left);//
  666.  
  667. //from bottom right to bottom right forward
  668. vLine7[0].x = x_bottom_right;
  669. vLine7[0].y = y_bottom_right;
  670. vLine7[1].x = x_bottom_right+(x_forward_bottom_right-x_bottom_right);//
  671. vLine7[1].y = y_bottom_right+(y_forward_bottom_right-y_bottom_right);//
  672.  
  673. //from top right to top right forward
  674. vLine8[0].x = x_top_right;
  675. vLine8[0].y = y_top_right;
  676. vLine8[1].x = x_top_right+(x_forward_top_right-x_top_right);//
  677. vLine8[1].y = y_top_right+(y_forward_top_right-y_top_right);//
  678.  
  679. //bottom left forward to bottom right forward
  680. vLine9[0].x = x_forward_bottom_left;
  681. vLine9[0].y = y_forward_bottom_left;
  682. vLine9[1].x = x_forward_bottom_left+(x_forward_bottom_right-x_forward_bottom_left);
  683. vLine9[1].y = y_forward_bottom_left;
  684.  
  685. //bottom left forward to top left forward
  686. vLine10[0].x = x_forward_top_left;
  687. vLine10[0].y = y_forward_top_left;
  688. vLine10[1].x = x_forward_top_left;
  689. vLine10[1].y = y_forward_top_left+(y_forward_bottom_left-y_forward_top_left);
  690.  
  691. //bottom right forward to top right forward
  692. vLine11[0].x = x_forward_top_right;
  693. vLine11[0].y = y_forward_top_right;
  694. vLine11[1].x = x_forward_top_right;
  695. vLine11[1].y = y_forward_top_right+(y_forward_bottom_right-y_forward_top_right);
  696.  
  697. //top left forward to top right forward
  698. vLine12[0].x = x_forward_top_left;
  699. vLine12[0].y = y_forward_top_left;
  700. vLine12[1].x = x_forward_top_left+(x_forward_top_right-x_forward_top_left);
  701. vLine12[1].y = y_forward_top_left;
  702.  
  703. pLine->Begin( );
  704. pLine->Draw( vLine1, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  705. pLine->Draw( vLine2, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  706. pLine->Draw( vLine3, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  707. pLine->Draw( vLine4, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  708. pLine->Draw( vLine5, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  709. pLine->Draw( vLine6, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  710. pLine->Draw( vLine7, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  711. pLine->Draw( vLine8, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  712. pLine->Draw( vLine9, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  713. pLine->Draw( vLine10, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  714. pLine->Draw( vLine11, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  715. pLine->Draw( vLine12, 2, D3DCOLOR_ARGB(a, r, g, b ) );
  716. pLine->End( );
  717. }
  718. }
  719.  
  720.  
  721. /*void DrawHealthbar(int x, int y, int w, int h, D3DCOLOR barCol, D3DCOLOR borCol, int hp, int maxhp)
  722. {
  723. FillRGB(x, y, ( hp / (double)maxhp ) * w, h, barCol, pDevice);
  724. DrawBorder(x, y, w, h, Green, Green);
  725. }*/
  726.  
  727.  
  728. static char FinalString[260];
  729. #define OFS_BASEPLAYER2 0x631A24
  730.  
  731. char dis[64];
  732.  
  733.  
  734. DWORD dwPointer;
  735. D3DXMATRIX ProjMatrix, World, ViewMatrix;//Place At Top Of Your Source Code
  736. bool DxInit = false;
  737.  
  738.  
  739. float FindDistance(D3DXVECTOR3 my,D3DXVECTOR3 other,CPlayers* pPlayer,CPlayers* pLocal)
  740. {
  741. return sqrt((pLocal->pos.x-pPlayer->pos.x)*(pLocal->pos.x-pPlayer->pos.x) + (pLocal->pos.y-pPlayer->pos.y)*(pLocal->pos.y-pPlayer->pos.y) + (pLocal->pos.z-pPlayer->pos.z)*(pLocal->pos.z-pPlayer->pos.z));
  742. }
  743.  
  744. void DrawESP()
  745. {
  746.  
  747. DWORD dwI3EXEC = (DWORD)GetModuleHandle("PointBlank.exe");
  748. unsigned long dwBase = *(DWORD*)(dwI3EXEC + OFS_BASEPLAYER);
  749. unsigned long dwBase2 = *(DWORD*)(dwI3EXEC + OFS_BASEPLAYER2);
  750. CTeam *pTeam = ((CTeam*)(dwBase + OFS_TEAM));
  751.  
  752. D3DVECTOR ScreenPos;
  753.  
  754.  
  755. for (int i = 0; i <= 16; i++)
  756. {
  757. CPlayers *pPlayer = (CPlayers*)((dwBase + OFS_PLAYER) + i * PLAYERSIZE);
  758. CPlayers *pLocal = (CPlayers*)((dwBase + OFS_PLAYER) + pTeam->iTeam * PLAYERSIZE);
  759. CNames *PNames = (CNames*) ((dwBase + OFS_NAMES) + NAMESIZE * i);
  760. CGrade *PGrade = (CGrade*) ((dwBase + OFS_Grade) + GradeSIZE * i);
  761. CHealth *pHealth = (CHealth*) ((dwBase2+ OFS_HEALTH) + i * HPSIZE);
  762. HeadPos.x = pPlayer->pos.x;
  763. HeadPos.y = 1.5f + pPlayer->pos.y;
  764. HeadPos.z = pPlayer->pos.z;
  765. FootPos.x = pPlayer->pos.x;
  766. FootPos.y = pPlayer->pos.y;
  767. FootPos.z = pPlayer->pos.z;
  768. D3DXVECTOR3 xDistance = pPlayer->pos - pLocal->pos;
  769. D3DXVECTOR3 MyDistance = pLocal->pos - pPlayer->pos;
  770. float xaDistance = D3DXVec3Length(&xDistance );
  771. float MyaDistance = D3DXVec3Length(&MyDistance );
  772.  
  773. if (WorldToScreen(pPlayer->pos,ScreenPos))
  774. {
  775.  
  776. if(pHealth->CurHP > 1)
  777. {
  778.  
  779. if (esphp == 1)
  780. {
  781. Healthbar((int)ScreenPos.x-23,(int)ScreenPos.y+15,pHealth->CurHP);
  782. }
  783.  
  784. if (ESPHack == 1)
  785. {
  786. DrawBorder(ScreenPos.x-(10000/MyaDistance)/40,ScreenPos.y-(35000/MyaDistance)/40,50000/MyaDistance/6*2/40,50000/MyaDistance/3*2/40,1,pHealth->CurHP);
  787. }
  788.  
  789. if(LineESP == 1)
  790. {
  791. DrawLine(ScreenCenterX,ScreenCenterY+550,ScreenPos .x-10,ScreenPos.y+20,1,pHealth->CurHP);
  792. }
  793.  
  794. if (DrawStringESP == 1)
  795. {
  796. DrawString(ScreenPos.x+10,ScreenPos.y-25,WHITE,"Name : [%s]",PNames->szNames);
  797. }
  798.  
  799.  
  800. if (HealthBarDD == 1)
  801. {
  802. DrawString(ScreenPos.x+10,ScreenPos.y-35,YELLOW,"Clan : [%s] ",PGrade->szGrade);
  803. }
  804.  
  805. __________________________________________________ ___________
  806.  
  807. >> 4 Middle Bomb
  808.  
  809. //==============================Midle=============== ===========================//
  810. if(MidleBom==0)
  811. {
  812. if(!MidleBom1)
  813. {
  814. DWORD MidleAOFF, MidleBOFF = 0;
  815. DWORD dwI3EXEC = (DWORD) GetModuleHandleA("PointBlank.Exe");
  816. if (dwI3EXEC!=0)
  817. {
  818. MidleAOFF = dwI3EXEC + (DWORD)0x4D16CC;
  819. MidleBOFF = dwI3EXEC + (DWORD)0x4D16DC;
  820. MEMpacht((void *)(MidleAOFF),(int*)(PBYTE)"\x00\x00\x00\x00",4);
  821. MEMpacht((void *)(MidleBOFF),(int*)(PBYTE)"\x00\x00\x00\x00",4);
  822. Sleep(1);
  823. return TRUE;
  824. }
  825. }
  826. }
  827. if(MidleBom==1)
  828. { if(!MidleBom1)
  829. { DWORD MidleAON, MidleBON = 0;
  830. DWORD dwI3EXEC = (DWORD) GetModuleHandleA("PointBlank.Exe");
  831. if (dwI3EXEC!=0)
  832. { MidleAON = dwI3EXEC + (DWORD)0x4D16CC;
  833. MidleBON = dwI3EXEC + (DWORD)0x4D16DC;
  834. MEMpacht((void *)(MidleAON),(int*)(PBYTE)"\x00\x00\x00\x00",4);
  835. MEMpacht((void *)(MidleBON),(int*)(PBYTE)"\x00\x00\x00\x00",4);
  836. Sleep(1);
  837. return TRUE;
  838. }
  839. }
  840. }
  841. //==============================Hollow============== ============================//
  842. if(Hollow==0)
  843. {
  844. if(!Hollow1)
  845. {
  846. DWORD HollowOFF = 0;
  847. DWORD dwI3EXEC = (DWORD) GetModuleHandleA("PointBlank.Exe");
  848. if (dwI3EXEC!=0)
  849. {
  850. HollowOFF = dwI3EXEC + (DWORD)0x4D9368;
  851. MEMpacht((void *)(HollowOFF),(int*)(PBYTE)"\x00\x00\x00\x00",4);
  852. Sleep(1);
  853. return TRUE;
  854. }
  855. }
  856. }
  857. if(Hollow==1)
  858. { if(!Hollow1)
  859. { DWORD HollowON = 0;
  860. DWORD dwI3EXEC = (DWORD) GetModuleHandleA("PointBlank.Exe");
  861. if (dwI3EXEC!=0){ HollowON = dwI3EXEC + (DWORD)0x4D9368;
  862. MEMpacht((void *)(HollowON),(int*)(PBYTE)"\x00\x00\x00\x00",4);
  863. Sleep(1);
  864. return TRUE;
  865. }
  866. }
  867. }
  868.  
  869. __________________________________________________ ___________
  870.  
  871. >> 5 Ammo 01 HacX
  872.  
  873. #include "VirtualizerSDK.h"
  874.  
  875. int pelor = 0;
  876. int Ammo = 0;
  877. //==============================Ammo================ ==========================//
  878. void MakeJMP(BYTE *p***ress, DWORD dwJumpTo, DWORD dwLen)
  879. {
  880. VIRTUALIZER_START
  881. DWORD dwOldProtect, dwBkup, dwRel***r;
  882. VirtualProtect(p***ress, dwLen, PAGE_EXECUTE_READWRITE, &dwOldProtect);
  883. dwRel***r = (DWORD) (dwJumpTo - (DWORD) p***ress) - 5;
  884. *p***ress = 0xE9;
  885. *((DWORD *)(p***ress + 0x1)) = dwRel***r;
  886. for(DWORD x = 0x5; x < dwLen; x++) *(p***ress + x) = 0x90;
  887. VirtualProtect(p***ress, dwLen, dwOldProtect, &dwBkup);
  888. VIRTUALIZER_START
  889. return;
  890. }
  891.  
  892. DWORD i3ExecBase = (DWORD)GetModuleHandleA("PointBlank.Exe");
  893. DWORD dwAMMO_Hook = (DWORD)i3ExecBase + 0x227975;
  894. DWORD dwAMMO_tmp = (DWORD)i3ExecBase + 0xD9DD0;
  895. DWORD dwAMMO_Ret = (DWORD)dwAMMO_Hook + 0x32;
  896.  
  897. __declspec(naked)void AmmoVoid()
  898. {
  899. __asm
  900. {
  901. mov [edx],0x03
  902. push edx
  903. call [dwAMMO_tmp]
  904. *** esp,0x08
  905. MOV EAX,DWORD PTR SS:[EBP-0x04]
  906. MOV ECX,DWORD PTR SS:[EBP+0x08]
  907. MOV DWORD PTR DS:[EAX+0x978],ECX
  908. mov esp,ebp
  909. pop ebp
  910. retn 0004
  911. jmp [dwAMMO_Ret]
  912. }}
  913.  
  914. void AMMO(void)
  915. {
  916. MakeJMP((PBYTE)dwAMMO_Hook,(DWORD)AmmoVoid,28);
  917. }
  918.  
  919. DWORD WINAPI Pelor(LPVOID){
  920. while(1){
  921. if(Ammo){
  922. AMMO();
  923. }
  924. }
  925. return(0);
  926. }
  927.  
  928. __________________________________________________ ___________
  929.  
  930. >> 6 Stride , dll !
  931.  
  932. #define SMOKE ( Stride == 24 && NumVertices == 256 ||(Stride == 24 && NumVertices == 192))
  933.  
  934.  
  935. #define Dino ((primCount == 57) || (primCount == 161) || (primCount ==
  936.  
  937. 186) || (primCount == 197) || (primCount == 349) || (primCount == 495)
  938.  
  939. || (primCount == 955) || (NumVertices == 2517 && primCount ==
  940.  
  941. 57) || (NumVertices == 3721 && primCount == 275) || (NumVertices
  942.  
  943. == 0 && primCount == 52) || (NumVertices == 0 &&
  944.  
  945. primCount == 105) || (NumVertices ==0 && primCount == 186) ||
  946.  
  947. (NumVertices == 0 && primCount == 197) || (primCount == 579) ||
  948.  
  949. (primCount == 488))
  950.  
  951. #define K400 ((NumVertices == 1002 && primCount == 980))
  952.  
  953. #define C5 ((NumVertices == 772 && primCount == 849))
  954.  
  955.  
  956. #define CT ( NumVertices == 490 || NumVertices == 221 || NumVertices ==
  957.  
  958. 611|| NumVertices == 102 ||(primCount == 526) || (primCount == 84) ||
  959.  
  960. (primCount == 64) || NumVertices == 67 || NumVertices == 92 ||
  961.  
  962. NumVertices == 95 || NumVertices == 114 || NumVertices == 504 ||
  963.  
  964. NumVertices == 108 || NumVertices == 398 || NumVertices == 520 ||
  965.  
  966. NumVertices == 684 || (primCount == 56) || (primCount == 93) )
  967.  
  968.  
  969. #define Badan ((primCount == 16 || primCount == 28 || primCount == 50 ||
  970.  
  971. primCount == 52 || primCount == 76 || primCount == 130))
  972.  
  973. #define
  974.  
  975. Tero ((NumVertices == 88 && primCount == 130) || (NumVertices ==
  976.  
  977. 142 && primCount == 266)|| (NumVertices == 472 &&
  978.  
  979. primCount == 304) || (NumVertices == 384 && primCount == 346) ||
  980.  
  981. (NumVertices == 348 && primCount == 520) || (NumVertices == 596
  982.  
  983. && primCount == 590)|| (NumVertices == 628 && primCount
  984.  
  985. == 748) || (NumVertices == 3487 && primCount == 1737)||
  986.  
  987. (NumVertices == 3487 && primCount == 1766) || (NumVertices ==
  988.  
  989. 262 && primCount == 196) || (NumVertices == 142 &&
  990.  
  991. primCount == 266) || (NumVertices == 244 && primCount == 406) ||
  992.  
  993. (NumVertices == 1846 && primCount == 414) || (NumVertices ==
  994.  
  995. 528 && primCount == 540) || (NumVertices == 520 &&
  996.  
  997. primCount == 593) || (NumVertices == 2728 && primCount == 1344)
  998.  
  999. || (NumVertices == 1091 && primCount == 1390) || (NumVertices ==
  1000.  
  1001. 1095 && primCount == 1460) || (NumVertices == 1846 &&
  1002.  
  1003. primCount == 2090) || (NumVertices == 2263 && primCount == 45)
  1004.  
  1005. || (NumVertices == 370 && primCount == 278) || (NumVertices ==
  1006.  
  1007. 482 && primCount == 390) || (NumVertices == 734 &&
  1008.  
  1009. primCount == 688) || (NumVertices == 2263 && primCount == 1023)
  1010.  
  1011. || (NumVertices == 812 && primCount == 1246) || (NumVertices ==
  1012.  
  1013. 2263 && primCount == 1434) || (NumVertices == 2041 &&
  1014.  
  1015. primCount == 1561) || (NumVertices == 1530 && primCount == 1534)
  1016.  
  1017. || (NumVertices == 749 && primCount == 1374) || (NumVertices ==
  1018.  
  1019. 1831 && primCount == 1267) || (NumVertices == 2010 &&
  1020.  
  1021. primCount == 426) || (NumVertices == 287 && primCount == 396) ||
  1022.  
  1023. (NumVertices == 1831 && primCount == 341) || (NumVertices ==
  1024.  
  1025. 1831 && primCount == 278) || (NumVertices == 185 &&
  1026.  
  1027. primCount == 254) || (NumVertices == 74 && primCount == 66) ||
  1028.  
  1029. (NumVertices == 56 && primCount == 40) || (NumVertices == 185
  1030.  
  1031. && primCount == 271) || (NumVertices == 45 && primCount
  1032.  
  1033. == 56) || (NumVertices == 92 && primCount == 56) || (NumVertices
  1034.  
  1035. == 611 && primCount == 114) || (NumVertices == 611 &&
  1036.  
  1037. primCount == 526) || (NumVertices == 18 && primCount == 12) ||
  1038.  
  1039. (NumVertices == 96 && primCount == 92) || (NumVertices == 99
  1040.  
  1041. && primCount == 61) || (NumVertices == 133 && primCount
  1042.  
  1043. == 205)|| (NumVertices == 245 && primCount == 276) ||
  1044.  
  1045. (NumVertices == 398 && primCount == 487) || (NumVertices == 26
  1046.  
  1047. && primCount == 20) || (NumVertices == 1204 && primCount
  1048.  
  1049. == 241) || (NumVertices == 80 && primCount == 52) ||
  1050.  
  1051. (NumVertices == 1204 && primCount == 124) || (NumVertices == 113
  1052.  
  1053. && primCount == 139) || (NumVertices == 1204 &&
  1054.  
  1055. primCount == 56) || (NumVertices == 684 && primCount == 740) ||
  1056.  
  1057. (NumVertices == 1204 && primCount == 42) || (NumVertices == 45
  1058.  
  1059. && primCount == 56) || (NumVertices == 1204 && primCount
  1060.  
  1061. == 35) || (NumVertices == 334 && primCount == 360) ||
  1062.  
  1063. (NumVertices == 175 && primCount == 246) || (NumVertices == 195
  1064.  
  1065. && primCount == 109) || (NumVertices == 71 && primCount
  1066.  
  1067. == 120) || (NumVertices == 88 && primCount == 130) ||
  1068.  
  1069. (NumVertices == 201 && primCount == 157) || (NumVertices == 224
  1070.  
  1071. && primCount == 200) || (NumVertices == 296 && primCount
  1072.  
  1073. == 166) || (NumVertices == 1353 && primCount == 386) ||
  1074.  
  1075. (NumVertices == 18 && primCount == 20) || (NumVertices == 41
  1076.  
  1077. && primCount == 30) || (NumVertices == 62 && primCount
  1078.  
  1079. == 67) || (NumVertices == 152 && primCount == 168) ||
  1080.  
  1081. (NumVertices == 202 && primCount == 174) || (NumVertices == 237
  1082.  
  1083. && primCount == 395) || (NumVertices == 647 && primCount
  1084.  
  1085. == 716) || (NumVertices == 727 && primCount == 936) ||
  1086.  
  1087. (NumVertices == 90 && primCount == 136) || (NumVertices == 120
  1088.  
  1089. && primCount == 170) || (NumVertices == 142 && primCount
  1090.  
  1091. == 128) || (NumVertices == 218 && primCount == 322) ||
  1092.  
  1093. (NumVertices == 285 && primCount == 94) || (NumVertices == 1316
  1094.  
  1095. && primCount == 1574) || (NumVertices == 1316 &&
  1096.  
  1097. primCount == 134) || (NumVertices == 56 && primCount == 158) ||
  1098.  
  1099. (NumVertices == 73 && primCount == 112) || (NumVertices == 143
  1100.  
  1101. && primCount == 94) || (NumVertices == 246 && primCount
  1102.  
  1103. == 120) || (NumVertices == 353 && primCount == 464) ||
  1104.  
  1105. (NumVertices == 381 && primCount == 234) || (NumVertices == 547
  1106.  
  1107. && primCount == 700) || (NumVertices == 1353 &&
  1108.  
  1109. primCount == 1404))
  1110.  
  1111. __________________________________________________ ___________
  1112.  
  1113. 7 >> WH Cacad
  1114.  
  1115. #include <windows.h>
  1116. #include <d3d9.h>
  1117. #include "resource.h"
  1118.  
  1119. #define WINDOW_TITLE "Initializing DirectX"
  1120. #define WINDOW_WIDTH 400
  1121. #define WINDOW_HEIGHT 400
  1122.  
  1123. #define SAFE_RELEASE(x) if( x ) { (x)->Release(); (x) = NULL; }
  1124. #define SAFE_DELETE(x) if( x ) { delete(x); (x) = NULL; }
  1125. #define SAFE_DELETE_ARRAY(x) if( x ) { delete [] (x); (x) = NULL; }
  1126.  
  1127. HWND hWnd;
  1128.  
  1129. LPDIRECT3D9 pD3D;
  1130. LPDIRECT3DDEVICE9 pD3DDevice;
  1131.  
  1132. //-----------------------------------------------------------------------------
  1133. // PROTOTYPES
  1134. //-----------------------------------------------------------------------------
  1135. int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
  1136. LPSTR lpCmdLine, int nCmdShow);
  1137. LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  1138. void InitD3D(void);
  1139. void shutDown(void);
  1140. void RenderD3DScene(void);
  1141.  
  1142. LRESULT CALLBACK WndProc( HWND hWnd , UINT message , WPARAM wParam , LPARAM lParam){
  1143. switch(message){
  1144. case WM_CLOSE:
  1145. PostQuitMessage(0);
  1146. return 0;
  1147. }
  1148. return DefWindowProc(hWnd,message,wParam,lParam);
  1149. }
  1150.  
  1151. bool CreateSimpWindow( HINSTANCE hInstance, HINSTANCE hPrevInstance,
  1152. LPSTR lpCmdLine, int nCmdShow,int width, int height){
  1153.  
  1154. // Create A Window Class Structure
  1155. // Define the window
  1156. WNDCLASSEX wc;
  1157. wc.cbClsExtra = 0;
  1158. wc.cbSize = sizeof(wc);
  1159. wc.cbWndExtra = 0;
  1160. wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
  1161. wc.hCursor = NULL;
  1162. wc.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_DIRECTX_ICON);
  1163. wc.hIconSm = LoadIcon(hInstance, (LPCTSTR)IDI_DIRECTX_ICON);
  1164. wc.hInstance = hInstance;
  1165. wc.lpfnWndProc = WndProc;
  1166. wc.lpszClassName = WINDOW_TITLE;
  1167. wc.lpszMenuName = NULL;
  1168. wc.style = CS_VREDRAW|CS_HREDRAW|CS_OWNDC;
  1169.  
  1170. // Register Window Class
  1171. RegisterClassEx(&wc);
  1172.  
  1173. // Create Window
  1174. hWnd = CreateWindowEx(0,
  1175. WINDOW_TITLE, "Initializing - Direct3D(DX9)",
  1176. WS_OVERLAPPEDWINDOW|WS_VISIBLE, 100,100,width,height,
  1177. NULL,NULL,hInstance,0);
  1178.  
  1179. if( hWnd == NULL )
  1180. return false;
  1181.  
  1182. ShowWindow( hWnd, nCmdShow );
  1183. UpdateWindow( hWnd );
  1184.  
  1185. return true;
  1186. }
  1187.  
  1188. void InitD3D( void )
  1189. {
  1190. pD3D = Direct3DCreate9( D3D_SDK_VERSION );
  1191.  
  1192. if( pD3D == NULL )
  1193. {
  1194. // TO DO: Respond to failure of Direct3DCreate8
  1195. return;
  1196. }
  1197.  
  1198. D3DDISPLAYMODE d3ddm;
  1199.  
  1200. if( FAILED( pD3D->GetAdapterDisplayMode( D3DADAPTER_DEFAULT, &d3ddm ) ) )
  1201. {
  1202. // TO DO: Respond to failure of GetAdapterDisplayMode
  1203. return;
  1204. }
  1205.  
  1206. HRESULT hr;
  1207.  
  1208. if( FAILED( hr = pD3D->CheckDeviceFormat( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,
  1209. d3ddm.Format, D3DUSAGE_DEPTHSTENCIL,
  1210. D3DRTYPE_SURFACE, D3DFMT_D16 ) ) )
  1211. {
  1212. if( hr == D3DERR_NOTAVAILABLE )
  1213. // POTENTIAL PROBLEM: We need at least a 16-bit z-buffer!
  1214. return;
  1215. }
  1216.  
  1217. //
  1218. // Do we support hardware vertex processing? if so, use it.
  1219. // If not, downgrade to software.
  1220. //
  1221.  
  1222. D3DCAPS9 d3dCaps;
  1223.  
  1224. if( FAILED( pD3D->GetDeviceCaps( D3DADAPTER_DEFAULT,
  1225. D3DDEVTYPE_HAL, &d3dCaps ) ) )
  1226. {
  1227. // TO DO: Respond to failure of GetDeviceCaps
  1228. return;
  1229. }
  1230.  
  1231. DWORD dwBehaviorFlags = 0;
  1232.  
  1233. if( d3dCaps.VertexProcessingCaps != 0 )
  1234. dwBehaviorFlags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
  1235. else
  1236. dwBehaviorFlags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
  1237.  
  1238. //
  1239. // Everything checks out - create a simple, windowed device.
  1240. //
  1241.  
  1242. D3DPRESENT_PARAMETERS d3dpp;
  1243. memset(&d3dpp, 0, sizeof(d3dpp));
  1244.  
  1245. d3dpp.BackBufferFormat = d3ddm.Format;
  1246. d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
  1247. d3dpp.Windowed = TRUE;
  1248. d3dpp.EnableAutoDepthStencil = TRUE;
  1249. d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
  1250. d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
  1251.  
  1252. if( FAILED( pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd,
  1253. dwBehaviorFlags, &d3dpp, &pD3DDevice ) ) )
  1254. {
  1255. // TO DO: Respond to failure of CreateDevice
  1256. return;
  1257. }
  1258. }
  1259.  
  1260. void MessageLoop(){
  1261. MSG msg;
  1262. memset(&msg,0,sizeof(msg));
  1263. while( msg.message != WM_QUIT )
  1264. {
  1265. if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
  1266. {
  1267. TranslateMessage( &msg );
  1268. DispatchMessage( &msg );
  1269. }
  1270. else
  1271. RenderD3DScene();
  1272. }
  1273.  
  1274. }
  1275.  
  1276. void RenderD3DScene( void )
  1277. { // background warna hitam
  1278. pD3DDevice->Clear(0,NULL,D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,0,1,0);
  1279. // background warna hijau muda
  1280. // pD3DDevice->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,
  1281. // D3DCOLOR_COLORVALUE(0.0f,1.0f,0.0f,1.0f), 1.0f, 0 );
  1282.  
  1283. pD3DDevice->BeginScene();
  1284.  
  1285. // Render geometry here...
  1286.  
  1287. pD3DDevice->EndScene();
  1288.  
  1289. pD3DDevice->Present( NULL, NULL, NULL, NULL );
  1290. }
  1291.  
  1292. void Shutdown(){
  1293. // Give back resources
  1294. SAFE_RELEASE( pD3DDevice );
  1295. SAFE_RELEASE( pD3D );
  1296. }
  1297.  
  1298. int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
  1299. LPSTR lpCmdLine, int nCmdShow){
  1300. //INT WINAPI WinMain( HINSTANCE hInstance , HINSTANCE , LPSTR , INT ){
  1301. if(!CreateSimpWindow(hInstance, hPrevInstance,
  1302. lpCmdLine, nCmdShow, WINDOW_WIDTH, WINDOW_HEIGHT))return 1;
  1303. //if(!InitD3D())return 2;
  1304. InitD3D();
  1305. MessageLoop();
  1306. Shutdown();
  1307. return 0;
  1308. }
Advertisement
Add Comment
Please, Sign In to add comment