Advertisement
n3k4a

code by n3k4a

Apr 22nd, 2019
348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.59 KB | None | 0 0
  1. Code:
  2. Function:
  3. void zNova(LPDIRECT3DDEVICE9 pDevice, D3DCOLOR Color)
  4. {
  5. D3DVIEWPORT9 Viewport;
  6. pDevice->GetViewport(&Viewport);
  7. DWORD ScreenX = Viewport.Width / 2;
  8. DWORD ScreenY = Viewport.Height / 2;
  9.  
  10. DrawRect(pDevice, ScreenX + 5, ScreenY - 1, 2, 20, Color);
  11. DrawRect(pDevice, ScreenX - 25, ScreenY - 1, 2, 20, Color);
  12. DrawRect(pDevice, ScreenX - 1, ScreenY + 5, 20, 2, Color);
  13. DrawRect(pDevice, ScreenX - 1, ScreenY - 25, 20, 2, Color);
  14. }
  15. In EndScene:
  16. if(opt.Item.crosshair == 14)
  17. {
  18. zNova(pDevice,RED);
  19. }
  20. still looking for Chams for CF ?
  21. (spoonfed)
  22. all you have to do is define the D3DColor (incomplete just search the D3D Colors)
  23. Code:
  24. #define RED D3DCOLOR_ARGB(255, 255, 0, 0)
  25. #define GREEN D3DCOLOR_ARGB(255, 0, 255, 0)
  26. #define BLUE D3DCOLOR_ARGB(255, 0, 0, 255)
  27. #define WHITE D3DCOLOR_ARGB(255, 255, 255, 255)
  28. #define BLACK D3DCOLOR_ARGB(255, 0, 0, 0)
  29. #define YELLOW D3DCOLOR_ARGB(255, 255, 255, 0)
  30. #define TEAL D3DCOLOR_ARGB(255, 0, 255, 255)
  31. #define PINK D3DCOLOR_ARGB(255, 255, 240, 0)
  32. #define ORANGE D3DCOLOR_ARGB(255, 255, 132, 0)
  33. #define LIME D3DCOLOR_ARGB(255, 198, 255, 0)
  34. #define SKYBLUE D3DCOLOR_ARGB(255, 0, 180, 255)
  35. #define MAROON D3DCOLOR_ARGB(255, 142, 30, 0)
  36. #define LGRAY D3DCOLOR_ARGB(255, 174, 174, 174)
  37. #define DGRAY D3DCOLOR_ARGB(255, 71, 65, 64)
  38. #define BROWN D3DCOLOR_ARGB(255, 77, 46, 38)
  39. #define TAE D3DCOLOR_ARGB(255, 74, 38, 38)
  40. Code:
  41. Globals:
  42. LPDIRECT3DVERTEXBUFFER9 Stream_Data;
  43. LPDIRECT3DTEXTURE9 BTEX = NULL;
  44. D3DSURFACE_DESC pDesc;
  45. D3DVIEWPORT9 Vwp;
  46. typedef HRESULT (WINAPI* tEndScene)(LPDIRECT3DDEVICE9 pDevice);
  47. tEndScene oEndScene = NULL;
  48.  
  49. typedef HRESULT (WINAPI* tDrawIndexedPrimitive)(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type,INT BaseVertexIndex,UINT MinIndex,UINT NumVertices,UINT startIndex,UINT PrimitiveCount);
  50. tDrawIndexedPrimitive oDrawIndexedPrimitive = NULL;
  51. Function:
  52. HRESULT WINAPI hkDrawIndexedPrimitive(LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type,INT BaseVertexIndex,UINT MinIndex,UINT NumVertices,UINT StartIndex,UINT PrimitiveCount)
  53. {
  54.  
  55. if(pDevice->GetStreamSource(0, &Stream_Data, &Offset, &Stride) == D3D_OK) Stream_Data->Release();
  56.  
  57. pDevice->GetViewport( &Vwp );
  58.  
  59. if (opt.Item.chams && (Stride == 40 || Stride == 44))
  60. {
  61. if(!ignore)
  62. {
  63. pDevice->SetRenderState(D3DRS_ZENABLE, FALSE);
  64. ignore = true;
  65. if(opt.Item.chams==2)pDevice->SetRenderState(D3DRS_ZENABLE,FALSE);
  66. if (opt.Item.bcolor == 1) pDevice->SetTexture(0, texGreen);
  67. if (opt.Item.bcolor == 2) pDevice->SetTexture(0, texRed);
  68. if (opt.Item.bcolor == 3) pDevice->SetTexture(0, texBlue);
  69. if (opt.Item.bcolor == 4) pDevice->SetTexture(0, texOrange);
  70. if (opt.Item.bcolor == 5) pDevice->SetTexture(0, texYellow);
  71. if (opt.Item.bcolor == 6) pDevice->SetTexture(0, texPink);
  72. if (opt.Item.bcolor == 7) pDevice->SetTexture(0, texCyan);
  73. if (opt.Item.bcolor == 8) pDevice->SetTexture(0, texPurple);
  74. if (opt.Item.bcolor == 9) pDevice->SetTexture(0, texBlack);
  75. if (opt.Item.bcolor == 10) pDevice->SetTexture(0, texWhite);
  76. if (opt.Item.bcolor == 12) pDevice->SetTexture(0, texSteelBlue);
  77. if (opt.Item.bcolor == 13) pDevice->SetTexture(0, texLightSteelBlue);
  78. if (opt.Item.bcolor == 14) pDevice->SetTexture(0, texLightBlue);
  79. if (opt.Item.bcolor == 15) pDevice->SetTexture(0, texSalmon);
  80. if (opt.Item.bcolor == 16) pDevice->SetTexture(0, texBrown);
  81. if (opt.Item.bcolor == 17) pDevice->SetTexture(0, texTeal);
  82. if (opt.Item.bcolor == 18) pDevice->SetTexture(0, texLime);
  83. if (opt.Item.bcolor == 19) pDevice->SetTexture(0, texElectricLime);
  84. if (opt.Item.bcolor == 20) pDevice->SetTexture(0, texGold);
  85. if (opt.Item.bcolor == 21) pDevice->SetTexture(0, texOrangeRed);
  86. if (opt.Item.bcolor == 22) pDevice->SetTexture(0, texGreenYellow);
  87. if (opt.Item.bcolor == 23) pDevice->SetTexture(0, texAquaMarine);
  88. if (opt.Item.bcolor == 24) pDevice->SetTexture(0, texSkyBlue);
  89. if (opt.Item.bcolor == 25) pDevice->SetTexture(0, texSlateBlue);
  90. if (opt.Item.bcolor == 26) pDevice->SetTexture(0, texCrimson);
  91. if (opt.Item.bcolor == 27) pDevice->SetTexture(0, texDarkOliveGreen);
  92. if (opt.Item.bcolor == 28) pDevice->SetTexture(0, texPaleGreen);
  93. if (opt.Item.bcolor == 29) pDevice->SetTexture(0, texDarkGoldenRod);
  94. if (opt.Item.bcolor == 30) pDevice->SetTexture(0, texFireBrick);
  95. if (opt.Item.bcolor == 31) pDevice->SetTexture(0, texDarkBlue);
  96. if (opt.Item.bcolor == 32) pDevice->SetTexture(0, texDarkerBlue);
  97. if (opt.Item.bcolor == 33) pDevice->SetTexture(0, texDarkYellow);
  98. if (opt.Item.bcolor == 34) pDevice->SetTexture(0, texLightYellow);
  99.  
  100. oDrawIndexedPrimitive(pDevice, Type, BaseVertexIndex, MinIndex, NumVertices, StartIndex, PrimitiveCount);
  101. pDevice->SetRenderState(D3DRS_ZENABLE, TRUE);
  102. if (opt.Item.fcolor == 1) pDevice->SetTexture(0, texGreen);
  103. if (opt.Item.fcolor == 2) pDevice->SetTexture(0, texRed);
  104. if (opt.Item.fcolor == 3) pDevice->SetTexture(0, texBlue);
  105. if (opt.Item.fcolor == 4) pDevice->SetTexture(0, texOrange);
  106. if (opt.Item.fcolor == 5) pDevice->SetTexture(0, texYellow);
  107. if (opt.Item.fcolor == 6) pDevice->SetTexture(0, texPink);
  108. if (opt.Item.fcolor == 7) pDevice->SetTexture(0, texCyan);
  109. if (opt.Item.fcolor == 8) pDevice->SetTexture(0, texPurple);
  110. if (opt.Item.fcolor == 9) pDevice->SetTexture(0, texBlack);
  111. if (opt.Item.fcolor == 10) pDevice->SetTexture(0,texWhite);
  112. if (opt.Item.fcolor == 11) pDevice->SetTexture(0, texSteelBlue);
  113. if (opt.Item.fcolor == 12) pDevice->SetTexture(0, texLightSteelBlue);
  114. if (opt.Item.fcolor == 13) pDevice->SetTexture(0, texLightBlue);
  115. if (opt.Item.fcolor == 14) pDevice->SetTexture(0, texSalmon);
  116. if (opt.Item.fcolor == 15) pDevice->SetTexture(0, texBrown);
  117. if (opt.Item.fcolor == 16) pDevice->SetTexture(0, texTeal);
  118. if (opt.Item.fcolor == 17) pDevice->SetTexture(0, texLime);
  119. if (opt.Item.fcolor == 18) pDevice->SetTexture(0, texElectricLime);
  120. if (opt.Item.fcolor == 19) pDevice->SetTexture(0, texGold);
  121. if (opt.Item.fcolor == 20) pDevice->SetTexture(0, texOrangeRed);
  122. if (opt.Item.fcolor == 21) pDevice->SetTexture(0, texGreenYellow);
  123. if (opt.Item.fcolor == 22) pDevice->SetTexture(0, texAquaMarine);
  124. if (opt.Item.fcolor == 23) pDevice->SetTexture(0, texSkyBlue);
  125. if (opt.Item.fcolor == 24) pDevice->SetTexture(0, texSlateBlue);
  126. if (opt.Item.fcolor == 25) pDevice->SetTexture(0, texCrimson);
  127. if (opt.Item.fcolor == 26) pDevice->SetTexture(0, texDarkOliveGreen);
  128. if (opt.Item.fcolor == 27) pDevice->SetTexture(0, texPaleGreen);
  129. if (opt.Item.fcolor == 28) pDevice->SetTexture(0, texDarkGoldenRod);
  130. if (opt.Item.fcolor == 29) pDevice->SetTexture(0, texFireBrick);
  131. if (opt.Item.fcolor == 30) pDevice->SetTexture(0, texDarkBlue);
  132. if (opt.Item.fcolor == 31) pDevice->SetTexture(0, texDarkerBlue);
  133. if (opt.Item.fcolor== 32) pDevice->SetTexture(0, texDarkYellow);
  134. if (opt.Item.fcolor == 33) pDevice->SetTexture(0, texLightYellow);
  135. if(opt.Item.chams==2)pDevice->SetRenderState(D3DRS_ZENABLE,TRUE);
  136. ignore = false;
  137. }
  138. }
  139. Simple CFPH Hack DLL with Hotkey
  140. Code:
  141. #include <windows.h>
  142.  
  143. #define Wall 0x00000//current addy look for it
  144. bool WallHack = true;
  145. DWORD WINAPI zNova(void*)
  146. {
  147. if(GetAsyncKeyState(VK_F7)&1) WallHack=(!WallHack);
  148. if(WallHack)
  149. {
  150. if((*(PDWORD)Wall) = 1)
  151. }
  152. {
  153. else if
  154. (*(PDWORD)Wall) = 0;
  155. }
  156. WallHack = false;
  157. }
  158. }
  159. bool GameHook()
  160. {
  161. if(GetModuleHandleA("CShell.dll") && GetModuleHandleA("i3Gfx.dll"))
  162. return 1;
  163. return 0;
  164. }
  165.  
  166. void Starter()
  167. {
  168. while(1)
  169. {
  170. GameHook();
  171. Sleep(200);
  172. }
  173. }
  174. BOOL APIENTRY DllMain(HMODULE hmodule,DWORD dwReason,LPVOID lpvreserved)
  175. {
  176. if(dwReason == DLL_PROCESS_ATTACH)
  177. {
  178. CreateThread(0,0,0,zNova,0,0);
  179. }
  180. }
  181. Code:
  182. struct BasicPlayerInfo
  183. {
  184. char Spacer00[4];
  185. float MovementSpeed;
  186. float MovementWalkRate;
  187. float MovementDuckWalkRate;
  188. float MovementSideMoveRate;
  189. float MovementFrontBackRunAnimationRate;
  190. float MovementLeftRightRunAnimationRate;
  191. float MovementFrontBackWalkAnimationRate;
  192. float MovementLeftRightWalkAnimationRate;
  193. float MovementAcceleration;
  194. float MovementFriction;
  195. float JumpTime;
  196. float JumpVelocity;
  197. float JumpLandedWaitTime;
  198. float JumpLandedNoJumpTimeRate;
  199. float JumpRepeatPenaltyMoveRate;
  200. float JumpRepeatPenaltyHeightRate;
  201. float JumpLandedMovePenaltyTimeRate;
  202. float JumpLandedMovePenaltyMoveRate;
  203. char Spacer01[40];
  204. float DamagePenaltyTime;
  205. float DamagePenaltyMoveRate;
  206. float C4PlantTime;
  207. float C4DefuseTime;
  208. float MaxCanDefuseDistance;
  209. float CharacterHiddenAlpha;
  210. float CharacterHiddenWalkAlpha;
  211. float CharacterHiddenRunAlpha;
  212. float MovementHiddenRate;
  213. DWORD CrossHairColor;
  214. float CrossHairRedChangeRate;
  215. float CrossHairGreenChangeRate;
  216. float CrossHairBlueChangeRate;
  217. };
  218. InGameMessageBox (using the crossfire messagebox)
  219. Code:
  220. void InGameMessageBox(char* message)
  221. {
  222. DWORD CShell = (DWORD)GetModuleHandleA("cshell.dll");
  223. DWORD MsgFunction = CShell + 101690B0//0x167AF0; // string: vertex lock failed
  224. __asm
  225. {
  226. push 0
  227. push 10B51284
  228. push 0
  229. push 77 // different in other country, you must find this, try from 1 to 200
  230. push 28
  231. call MsgFunction
  232. add esp,14
  233. }
  234. }
  235. InGameMessageBox(simple way)
  236. Code:
  237. globals:
  238. void ShowMessage(char* string, DWORD CShell);
  239.  
  240. void Hacks()
  241. {
  242. DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
  243. ShowMessage("MessageHere",CShell);
  244. while(1)
  245. {
  246. while(1)
  247. {
  248. //Hacks here
  249. }
  250. }
  251. }
  252. //After Dllmain
  253. void ShowMessage(char* string, DWORD CShell)
  254. {
  255. DWORD MsgBoxFunc = CShell + 0x838F0;
  256. __asm
  257. {
  258. push string;
  259. push 0;
  260. push 0x70;
  261. push 0x1C;
  262. call MsgBoxFunc;
  263. add esp, 16;
  264. }
  265. }
  266. DIP:
  267. Code:
  268. ( g_Stride == 44 )
  269.  
  270. if ( g_Stride == 40 && gNumVertices == 186 && gPrimitiveCount == 253 || g_Stride == 36 && gNumVertices == 196 && gPrimitiveCount == 274 || g_Stride == 44 && gNumVertices == 172 && gPrimitiveCount == 226)// GR Head
  271.  
  272. if( g_Stride == 40 && gNumVertices == 255 && gPrimitiveCount == 266 || g_Stride == 40 && gNumVertices == 157 && gPrimitiveCount == 208 || g_Stride == 36 && gNumVertices == 165 && gPrimitiveCount == 274 )//BL Head
  273.  
  274.  
  275. Stride 28 : Sky
  276. RepeatFire:
  277. Code:
  278. if(repeatfire)
  279. {
  280. if(Weapon)
  281. {
  282. for(int i=0; i<598; i++)
  283. {
  284. DWORD wep = *(DWORD*)(Weapon +(4*i));
  285. if(wep)
  286. {
  287. *(int*)(wep + 0xAA4) = 2;
  288. }
  289. }
  290. }
  291. }
  292. No KnockBack
  293. Code:
  294. if(noknockback)
  295. {
  296. if(Weapon)
  297. {
  298. for(int i=0; i<598; i++)
  299. {
  300. DWORD wep = *(DWORD*)(Weapon +(4*i));
  301. if(wep)
  302. {
  303. for(int y=0; y<10; y++)
  304. {
  305. *(float*)(wep + 0x2790+y*4) = 0.0f;
  306. }
  307. }
  308. }
  309. }
  310. }
  311. WireFrame (fill with either naked or with chams)
  312. Code:
  313. if (opt.Item.WireFrame && (Stride == 40 || Stride == 44)) pDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME);
  314. CF reference:
  315. ReloadAnimRatio - Weapon Reload (No Reload)
  316. ChangeWeaponAnimRatio - Weapon change delay (No weapon change delay)
  317. AmmoDamage - Weapon Damage (One hit kill)
  318. LowerAnimRate - Weapon Recoil (Less Recoil not full No Recoil)
  319. CharacterHiddenAlpha - See Ghost
  320. CharacterHiddenWalkAlpha - See Ghost
  321. CharacterHiddenRunAlpha - See Ghost
  322. MovementHiddenRate - See Ghost
  323. C4PlantTime - Obviously C4 Plant time
  324. C4DefuseTime - Obviously C4 Defuse time
  325. MaxCanDefuseDistance - Distance that you can defuse the bomb
  326. Range -Weapon Range
  327. ShotsPerAmmo - Shotgun Spread
  328. EdgeShotEnabled - Shoot Through Wall
  329. WallShotEnabled - Shoot Through Wall
  330. PerfectWallShotEnabled - Shoot Through Wall
  331.  
  332. Norecoil1: PerturbMin%d_%s
  333. Norecoil2: PerturbMax%d_%s
  334. Norecoil3: BulletOffset(second one)
  335. Norecoil4: ShotReactPitch%d_%d
  336. Norecoil5: DetailPerturbShot%d_%s
  337. Norecoil6: DetailReactPitchShot%d_%s
  338. Norecoil7: DetailReactYawShot%d_%s
  339. Noreload: ReloadAnimRatio
  340. NoWeaponWeight: MoveSpeedPenalty
  341. NoGrenadeDmg: AmmoDamage
  342. NoWeaponChangeDelay: ChangeWeaponAnimRatio
  343. NoKnockBack: KnockBack
  344. NoScope: HalfZomeNoImage
  345. FastKnife1: KnifeNormalAniRate
  346. FastKnife2: KnifeBigShotAniRate
  347. KnifeOHK1: KnifeNormalAmmoDamage
  348. KnifeOHK2: KnifeBigShotAmmoDamage
  349. SeeGhosts1: CharacterHiddenAlpha
  350. SeeGhosts2: CharacterHiddenWalkAlpha
  351. SeeGhosts3: CharacterHuddenRunAlpha
  352. RepeatFire: RepeatFire
  353. CrouchSpeed: MovementDuckWalkRate
  354. ShotGunSpread: ShotsPerAmmo
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement