Guest User

Untitled

a guest
May 22nd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.02 KB | None | 0 0
  1. // GTA IV.cpp : Defines the exported functions for the DLL application.
  2. //
  3.  
  4. #include "stdafx.h"
  5.  
  6. struct VECTOR
  7. {
  8. float x; // 0x0 | 0
  9. float y; // 0x4 | 4
  10. float z; // 0x8 | 8
  11. float unk;
  12. };
  13.  
  14. struct CVector
  15. {
  16. VECTOR bodyHeading; // 0x0 | 0
  17. VECTOR visionHeading; // 0x10 | 16
  18. VECTOR unkVector; // 0x20 | 32
  19. VECTOR position; // 0x30 | 48
  20. };
  21.  
  22. class CVehicleInfo //Size=0x0110(272)
  23. {
  24. public:
  25. char sIdentifier[16]; //0x0000
  26. float fMass; //0x0010
  27. float centreOfMassX; //0x0020
  28. float centreOfMassY; //0x0024
  29. float centreOfMassZ; //0x0028
  30. __int32 nPercentSubmerged; //0x0030
  31. float m_fDriveInertia; //0x003C
  32. __int16 m_nDriveGears; //0x0040
  33. float m_fDriveForce; //0x0044
  34. float m_fBrakeForce; //0x0074
  35. float m_fTractionCurveMax; //0x008C
  36. float m_fTractionCurveMin; //0x0094
  37. float m_fSuspensionForce; //0x00B4
  38. float m_fSuspensionCompDamp; //0x00B8
  39. float m_fSuspensionReboundDamp; //0x00BC
  40. float m_fSuspensionUpperLimit; //0x00C0
  41. float m_fSuspensionLowerLimit; //0x00C4
  42. float m_fSuspensionRaise; //0x00C8
  43. float m_fCollisionDamageMult; //0x00D4
  44. float m_fWeaponDamageMult; //0x00D8
  45. float m_fDeformationDamageMult; //0x00DC
  46. float m_fEngineDamageMult; //0x00E0
  47. float m_fSeatOffsetDist; //0x00E4
  48. __int32 m_nMonetaryValue; //0x00E8
  49. DWORD mFlags; //0x00EC
  50. };
  51. CVehicleInfo *g_pVeh = (CVehicleInfo*)0x11E3BF0;
  52.  
  53. class CWeaponInfo // size: 0x110 (1.0.7.0)
  54. {
  55. public:
  56. // weapontype (index of array element)
  57. int weapontype; // 0x0 | 0
  58.  
  59. // slottype (index of array element)
  60. int slot; // 0x4 | 4
  61.  
  62. // firetype (index of array element)
  63. int firetype; // 0x8 | 8
  64.  
  65. // damagetype (index of array element)
  66. int damagetype; // 0xC | 12
  67.  
  68. // group (index of array element)
  69. int group; // 0x10 | 16
  70.  
  71. float targetrange; // 0x14 | 20
  72. float weaponrange; // 0x18 | 24
  73. int stattype; // 0x1C | 28
  74.  
  75. // Weaponflags stored as bitflags. Refer to corresponding array. (if n-th bit is 1, array element n is true)
  76. DWORD weaponflags; // 0x20 | 32
  77. DWORD modelhash; // 0x24 | 36
  78.  
  79. float aimaccuracy; // 0x34 | 52
  80. float aimaccuracyfps; // 0x38 | 52
  81.  
  82. float offset_x; // 0x40 | 64
  83. float offset_y; // 0x44 | 68
  84. float offset_z; // 0x48 | 72
  85. float crouchoffset_x; // 0x50 | 80
  86. float crouchoffset_y; // 0x54 | 84
  87. float crouchoffset_z; // 0x58 | 88
  88. float reticule_standing; // 0x64 | 100
  89. float reticule_ducked; // 0x68 | 104
  90. float reticule_scale; // 0x6C | 108
  91. int rumbleduration; // 0x70 | 112
  92. float rumbleintensity; // 0x74 | 116
  93. int pickup_regentime; // 0x78 | 120
  94. short pickup_ammoonstreet; // 0x80 | 124
  95.  
  96. // damage:
  97. short damage; // 0x82 | 130
  98. short damagefps; // 0x84 | 132
  99.  
  100. short clipsize; // 0x86 | 132
  101. short ammomax; // 0x88 | 136
  102. int timebetweenshots; // 0x8C | 140
  103. float physicsforce; // 0x90 | 144
  104. int reloadtime_normal; // 0x94 | 150
  105. int reloadtime_fast; // 0x98 | 154
  106. int reloadtime_crouch; // 0x9C | 160
  107. int projectiletype; // 0xA0
  108. int projectilefusetime; // 0xA4
  109.  
  110. float projectilephysicsexplodeimpactthreshold; // 0xD0
  111. float projectilephysicsexplodeimpactwithvehiclethreshold ;// 0xD4
  112. float projectilephysicsvehiclevelocity; // 0xD8
  113.  
  114. // damage, continued:
  115. float networkplayermod; // 0xF0 | 240
  116. float networkpedmod; // 0xF4 | 244
  117. float aimingaccuracytime; // 0xF8
  118. int aimingpellets; // 0xFC
  119. };
  120. CWeaponInfo *g_pWeap = (CWeaponInfo*)0x1540A20;
  121.  
  122.  
  123.  
  124. BOOL WINAPI Mozgato(VOID *lpArguments)
  125. {
  126. while(TRUE)
  127. {
  128. if (GetAsyncKeyState(VK_LEFT)&1)
  129. {
  130. g_pVeh->centreOfMassX += 10;
  131. }
  132. if (GetAsyncKeyState(VK_RIGHT)&1)
  133. {
  134. g_pVeh->centreOfMassX -= 10;
  135. }
  136. if (GetAsyncKeyState(VK_UP)&1)
  137. {
  138. g_pVeh->centreOfMassY += 10;
  139. }
  140. if (GetAsyncKeyState(VK_DOWN)&1)
  141. {
  142. g_pVeh->centreOfMassY += 10;
  143. }
  144. return TRUE;
  145. }
  146. }
  147.  
  148. BOOL WINAPI Fegyver(VOID *lpArguments)
  149. {
  150. while(TRUE)
  151. {
  152. if (GetAsyncKeyState(VK_F1)&1)
  153. {
  154. g_pWeap->weaponflags = 4;
  155. g_pWeap->slot = 3;
  156. g_pWeap->modelhash = 10;
  157. g_pWeap->firetype = 1;
  158. g_pWeap->damagetype = 2;
  159. g_pWeap->projectiletype = 2;
  160. g_pWeap->weapontype = 9;
  161. }
  162. }
  163. return TRUE;
  164. }
  165.  
  166. BOOL WINAPI DllMain( HMODULE hModule, DWORD Reason, VOID* Reserved )
  167. {
  168. if( Reason == DLL_PROCESS_ATTACH )
  169. CreateThread( NULL, 0, ( LPTHREAD_START_ROUTINE )Mozgato, NULL,0,NULL );
  170. CreateThread(NULL,NULL,(LPTHREAD_START_ROUTINE)Fegyver,0,0,0);
  171. return TRUE;
  172. }
Add Comment
Please, Sign In to add comment