Advertisement
Guest User

Untitled

a guest
Sep 18th, 2018
2,000
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 65.04 KB | None | 0 0
  1. //Hook By GAM
  2.  
  3. #include <windows.h>
  4. #include <d3d9.h>
  5. #include "imgui.h"
  6. #include "imgui_impl_dx9.h"
  7. #include "vtable.h"
  8. #include "main.h"
  9. #pragma comment(lib, "d3d9.lib")
  10. //#pragma comment(lib, "d3dx9.lib")
  11.  
  12. #define sleep Sleep
  13. #define D3D_VFUNCTIONS 119
  14. #define DEVICE_PTR 0xC97C28
  15. #define ENDSCENE_INDEX 42
  16. #define RESET_INDEX 16
  17. #define SAMP_CHAT_INFO_OFFSET 0x21A0E4
  18. #define SAMP_INFO 0x21A0F8
  19. #define SAMP_SETTINGS 0x3C5
  20. #define SAMP_FUNC_SAY 0x57F0
  21. #define SAMP_FUNC_SENDCMD 0x65C60
  22. #define M_PI 3.14159265358979323846
  23. #define DEFCOLOR_SRC(name, r, g, b) \
  24. static Color name## (uint8_t a = 240){ return Color (r, g, b, a); }
  25.  
  26.  
  27.  
  28. #define ExampleHWID -629155318
  29.  
  30.  
  31. class Color {
  32. public:
  33.  
  34. Color() {
  35. SetColor(0, 0, 0, 255);
  36. }
  37.  
  38. Color(uint8_t r, uint8_t g, uint8_t b) {
  39. SetColor(r, g, b, 255);
  40. }
  41.  
  42. Color(uint8_t r, uint8_t g, uint8_t b, uint8_t a) {
  43. SetColor(r, g, b, a);
  44. }
  45.  
  46. void SetColor(uint8_t r, uint8_t g, uint8_t b, uint8_t a = 255) {
  47. _color[0] = (uint8_t)r;
  48. _color[1] = (uint8_t)g;
  49. _color[2] = (uint8_t)b;
  50. _color[3] = (uint8_t)a;
  51. }
  52.  
  53. void GetColor(uint8_t &r, uint8_t &g, uint8_t &b, uint8_t &a) const {
  54. r = _color[0];
  55. g = _color[1];
  56. b = _color[2];
  57. a = _color[3];
  58. }
  59.  
  60. uint8_t &operator[](int index) {
  61. return _color[index];
  62. }
  63.  
  64. const uint8_t &operator[](int index) const {
  65. return _color[index];
  66. }
  67.  
  68. bool operator == (const Color &rhs) const {
  69. return (*((int *)this) == *((int *)&rhs));
  70. }
  71.  
  72. bool operator != (const Color &rhs) const {
  73. return !(operator==(rhs));
  74. }
  75.  
  76. int r() { return _color[0]; }
  77. int g() { return _color[1]; }
  78. int b() { return _color[2]; }
  79. int a() { return _color[3]; }
  80.  
  81. int GetR() { return _color[0]; }
  82. int GetG() { return _color[1]; }
  83. int GetB() { return _color[2]; }
  84. int GetA() { return _color[3]; }
  85.  
  86. void SetR(uint8_t _i) { _color[0] = _i; }
  87. void SetG(uint8_t _i) { _color[1] = _i; }
  88. void SetB(uint8_t _i) { _color[2] = _i; }
  89. void SetA(uint8_t _i) { _color[3] = _i; }
  90.  
  91. Color &operator=(const Color &rhs) {
  92. *(int*)(&_color[0]) = *(int*)&rhs._color[0];
  93. return *this;
  94. }
  95.  
  96. Color operator+(const Color &rhs) const {
  97. int red = _color[0] + rhs._color[0];
  98. int green = _color[1] + rhs._color[1];
  99. int blue = _color[2] + rhs._color[2];
  100. int alpha = _color[3] + rhs._color[3];
  101.  
  102. red = red > 255 ? 255 : red;
  103. green = green > 255 ? 255 : green;
  104. blue = blue > 255 ? 255 : blue;
  105. alpha = alpha > 255 ? 255 : alpha;
  106.  
  107. return Color(red, green, blue, alpha);
  108. }
  109.  
  110. Color operator-(const Color &rhs) const {
  111. int red = _color[0] - rhs._color[0];
  112. int green = _color[1] - rhs._color[1];
  113. int blue = _color[2] - rhs._color[2];
  114. int alpha = _color[3] - rhs._color[3];
  115.  
  116. red = red < 0 ? 0 : red;
  117. green = green < 0 ? 0 : green;
  118. blue = blue < 0 ? 0 : blue;
  119. alpha = alpha < 0 ? 0 : alpha;
  120. return Color(red, green, blue, alpha);
  121. }
  122.  
  123. operator const uint8_t*() {
  124. return (uint8_t*)(&_color[0]);
  125. }
  126.  
  127. static Color FromHSB(float hue, float saturation, float brightness)
  128. {
  129. float h = hue == 1.0f ? 0 : hue * 6.0f;
  130. float f = h - (int)h;
  131. float p = brightness * (1.0f - saturation);
  132. float q = brightness * (1.0f - saturation * f);
  133. float t = brightness * (1.0f - (saturation * (1.0f - f)));
  134.  
  135. if (h < 1)
  136. {
  137. return Color(
  138. (unsigned char)(brightness * 255),
  139. (unsigned char)(t * 255),
  140. (unsigned char)(p * 255)
  141. );
  142. }
  143. else if (h < 2)
  144. {
  145. return Color(
  146. (unsigned char)(q * 255),
  147. (unsigned char)(brightness * 255),
  148. (unsigned char)(p * 255)
  149. );
  150. }
  151. else if (h < 3)
  152. {
  153. return Color(
  154. (unsigned char)(p * 255),
  155. (unsigned char)(brightness * 255),
  156. (unsigned char)(t * 255)
  157. );
  158. }
  159. else if (h < 4)
  160. {
  161. return Color(
  162. (unsigned char)(p * 255),
  163. (unsigned char)(q * 255),
  164. (unsigned char)(brightness * 255)
  165. );
  166. }
  167. else if (h < 5)
  168. {
  169. return Color(
  170. (unsigned char)(t * 255),
  171. (unsigned char)(p * 255),
  172. (unsigned char)(brightness * 255)
  173. );
  174. }
  175. else
  176. {
  177. return Color(
  178. (unsigned char)(brightness * 255),
  179. (unsigned char)(p * 255),
  180. (unsigned char)(q * 255)
  181. );
  182. }
  183. }
  184.  
  185. ImU32 GetU32()
  186. {
  187. return ((_color[3] & 0xff) << 24) + ((_color[2] & 0xff) << 16) + ((_color[1] & 0xff) << 8)
  188. + (_color[0] & 0xff);
  189. //return (ImU32)(((_color[3] & 0xff) << 24) + ((_color[0] & 0xff) << 16) + ((_color[1] & 0xff) << 8) + (_color[2] & 0xff));
  190. }
  191.  
  192. DEFCOLOR_SRC(Black, 0, 0, 0);
  193. DEFCOLOR_SRC(White, 255, 255, 255);
  194. DEFCOLOR_SRC(Red, 255, 0, 0);
  195. DEFCOLOR_SRC(Green, 0, 255, 0);
  196. DEFCOLOR_SRC(Blue, 0, 0, 255);
  197. DEFCOLOR_SRC(Lime, 0, 255, 0);
  198. DEFCOLOR_SRC(Yellow, 255, 255, 0);
  199. DEFCOLOR_SRC(Cyan, 0, 255, 255);
  200. DEFCOLOR_SRC(Magenta, 255, 0, 255);
  201. DEFCOLOR_SRC(Silver, 192, 192, 192);
  202. DEFCOLOR_SRC(Gray, 128, 128, 128);
  203. DEFCOLOR_SRC(Maroon, 128, 0, 0);
  204. DEFCOLOR_SRC(Olive, 128, 128, 0);
  205. DEFCOLOR_SRC(Purple, 128, 0, 128);
  206. DEFCOLOR_SRC(Teal, 0, 128, 128);
  207. DEFCOLOR_SRC(Navy, 0, 0, 128);
  208. DEFCOLOR_SRC(DarkRed, 139, 0, 0);
  209. DEFCOLOR_SRC(Brown, 165, 42, 42);
  210. DEFCOLOR_SRC(Firebrick, 178, 34, 34);
  211. DEFCOLOR_SRC(Crimson, 220, 20, 60);
  212. DEFCOLOR_SRC(IndianRed, 205, 92, 92);
  213. DEFCOLOR_SRC(LightCoral, 240, 128, 128);
  214. DEFCOLOR_SRC(DarkSalmon, 233, 150, 122);
  215. DEFCOLOR_SRC(Salmon, 250, 128, 114);
  216. DEFCOLOR_SRC(LightSalmon, 255, 160, 122);
  217. DEFCOLOR_SRC(OrangeRed, 255, 69, 0);
  218. DEFCOLOR_SRC(DarkOrange, 255, 140, 0);
  219. DEFCOLOR_SRC(Orange, 255, 165, 0);
  220. DEFCOLOR_SRC(Gold, 255, 215, 0);
  221. DEFCOLOR_SRC(DarkGoldenRod, 184, 134, 11);
  222. DEFCOLOR_SRC(GoldenRod, 218, 165, 32);
  223. DEFCOLOR_SRC(YellowGreen, 154, 205, 50);
  224. DEFCOLOR_SRC(DarkOliveGreen, 85, 107, 47);
  225. DEFCOLOR_SRC(OliveDrab, 107, 142, 35);
  226. DEFCOLOR_SRC(LawnGreen, 124, 252, 0);
  227. DEFCOLOR_SRC(ChartReuse, 127, 255, 0);
  228. DEFCOLOR_SRC(GreenYellow, 173, 255, 47);
  229. DEFCOLOR_SRC(DarkGreen, 0, 100, 0);
  230. DEFCOLOR_SRC(ForestGreen, 34, 139, 34);
  231. DEFCOLOR_SRC(LimeGreen, 50, 205, 50);
  232. DEFCOLOR_SRC(DarkCyan, 0, 139, 139);
  233. DEFCOLOR_SRC(Aqua, 0, 255, 255);
  234. DEFCOLOR_SRC(LightCyan, 224, 255, 255);
  235. DEFCOLOR_SRC(DarkTurquoise, 0, 206, 209);
  236. DEFCOLOR_SRC(Turquoise, 64, 224, 208);
  237. DEFCOLOR_SRC(MediumTurquoise, 72, 209, 204);
  238. DEFCOLOR_SRC(PaleTurquoise, 175, 238, 238);
  239. DEFCOLOR_SRC(Aquamarine, 127, 255, 212);
  240. DEFCOLOR_SRC(PowderBlue, 176, 224, 230);
  241. DEFCOLOR_SRC(DodgerBlue, 30, 144, 255);
  242. DEFCOLOR_SRC(Lightblue, 173, 216, 230);
  243. DEFCOLOR_SRC(SkyBlue, 135, 206, 235);
  244. DEFCOLOR_SRC(LightSkyBlue, 135, 206, 250);
  245. DEFCOLOR_SRC(MidnightBlue, 25, 25, 112);
  246. DEFCOLOR_SRC(DarkBlue, 0, 0, 139);
  247. DEFCOLOR_SRC(MediumBlue, 0, 0, 205);
  248. DEFCOLOR_SRC(RoyalBlue, 65, 105, 225);
  249. DEFCOLOR_SRC(BlueViolet, 138, 43, 226);
  250. DEFCOLOR_SRC(Indigo, 75, 0, 130);
  251. DEFCOLOR_SRC(DarkSlateBlue, 72, 61, 139);
  252. DEFCOLOR_SRC(SlateBlue, 106, 90, 205);
  253. DEFCOLOR_SRC(MediumSlateBlue, 123, 104, 238);
  254. DEFCOLOR_SRC(MediumPurple, 147, 112, 219);
  255. DEFCOLOR_SRC(Darkmagenta, 139, 0, 139);
  256. DEFCOLOR_SRC(Darkviolet, 148, 0, 211);
  257. DEFCOLOR_SRC(DarkGray, 169, 169, 169);
  258. DEFCOLOR_SRC(LightGray, 211, 211, 211);
  259. DEFCOLOR_SRC(Gainsboro, 220, 220, 220);
  260. DEFCOLOR_SRC(LtBlue, 0, 150, 255);
  261. DEFCOLOR_SRC(LtGreen, 0, 255, 100);
  262. private:
  263. uint8_t _color[4];
  264. };
  265. struct Color2
  266. {
  267. int r;
  268. int g;
  269. int b;
  270. int a;
  271.  
  272. Color2()
  273. {
  274. this->r = 0;
  275. this->g = 0;
  276. this->b = 0;
  277. this->a = 255;
  278. }
  279.  
  280. Color2(int r, int g, int b)
  281. {
  282. this->r = r;
  283. this->g = g;
  284. this->b = b;
  285. this->a = 255;
  286. }
  287.  
  288. Color2(int r, int g, int b, int a)
  289. {
  290. this->r = r;
  291. this->g = g;
  292. this->b = b;
  293. this->a = a;
  294. }
  295.  
  296. Color2 operator / (float div)
  297. {
  298. Color2 color = *this;
  299. color.r = color.r / div;
  300. color.g = color.g / div;
  301. color.b = color.b / div;
  302. return color;
  303. }
  304.  
  305. Color2& operator /= (float div)
  306. {
  307. Color2& color = *this;
  308. color.r /= div;
  309. color.g /= div;
  310. color.b /= div;
  311. return color;
  312. }
  313.  
  314. Color2& operator *= (float coeff)
  315. {
  316. Color2& color = *this;
  317. color.r *= coeff;
  318. color.g *= coeff;
  319. color.b *= coeff;
  320. return color;
  321. }
  322.  
  323. static Color2 FromHSB(float hue, float saturation, float brightness)
  324. {
  325. float h = hue == 1.0f ? 0 : hue * 6.0f;
  326. float f = h - (int)h;
  327. float p = brightness * (1.0f - saturation);
  328. float q = brightness * (1.0f - saturation * f);
  329. float t = brightness * (1.0f - (saturation * (1.0f - f)));
  330.  
  331. if (h < 1)
  332. {
  333. return Color2(
  334. (unsigned char)(brightness * 255),
  335. (unsigned char)(t * 255),
  336. (unsigned char)(p * 255)
  337. );
  338. }
  339. else if (h < 2)
  340. {
  341. return Color2(
  342. (unsigned char)(q * 255),
  343. (unsigned char)(brightness * 255),
  344. (unsigned char)(p * 255)
  345. );
  346. }
  347. else if (h < 3)
  348. {
  349. return Color2(
  350. (unsigned char)(p * 255),
  351. (unsigned char)(brightness * 255),
  352. (unsigned char)(t * 255)
  353. );
  354. }
  355. else if (h < 4)
  356. {
  357. return Color2(
  358. (unsigned char)(p * 255),
  359. (unsigned char)(q * 255),
  360. (unsigned char)(brightness * 255)
  361. );
  362. }
  363. else if (h < 5)
  364. {
  365. return Color2(
  366. (unsigned char)(t * 255),
  367. (unsigned char)(p * 255),
  368. (unsigned char)(brightness * 255)
  369. );
  370. }
  371. else
  372. {
  373. return Color2(
  374. (unsigned char)(brightness * 255),
  375. (unsigned char)(p * 255),
  376. (unsigned char)(q * 255)
  377. );
  378. }
  379. }
  380.  
  381. static Color2 FromImColor(ImColor color)
  382. {
  383. return Color2(
  384. (int)(color.Value.x * 255),
  385. (int)(color.Value.y * 255),
  386. (int)(color.Value.z * 255),
  387. (int)(color.Value.w * 255)
  388. );
  389. }
  390.  
  391.  
  392. static ImColor ToImColor(Color2 color)
  393. {
  394. return ImColor(
  395. color.r / 255.f,
  396. color.g / 255.f,
  397. color.b / 255.f,
  398. color.a / 255.f
  399. );
  400. }
  401.  
  402. };
  403.  
  404.  
  405. extern HINSTANCE hAppInstance;
  406.  
  407. UCHAR szFileSys[255], szVolNameBuff[255];
  408. DWORD dwMFL, dwSysFlags;
  409. DWORD dwSerial;
  410. LPCTSTR szHD = "C:\\";
  411.  
  412. HINSTANCE HThisModule;
  413. bool DoUnload;
  414.  
  415. typedef HRESULT(__stdcall* _EndScene)(IDirect3DDevice9* pDevice);
  416. _EndScene oEndScene;
  417.  
  418. typedef long(__stdcall* _Reset)(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS* pp);
  419. _Reset oReset = nullptr;
  420.  
  421.  
  422. bool RainbowHud = false;
  423. static float misc_RainbowSpeed;
  424. int rrspeed;
  425. bool culoare_pusa;
  426. bool rainbowmenu = false;
  427. bool defaulttheme = false;
  428.  
  429.  
  430.  
  431. int setfakeping;
  432. bool fake_ping = false;
  433. bool teleportmap = false;
  434. bool teleportcp = false;
  435. bool upside = false;
  436. bool bEditFootSync = false;
  437.  
  438. bool atentat1 = false;//e c mortii lui de c++
  439. bool tick_done;
  440. DWORD tick;
  441. float fWeaponDamage[55] =
  442. {
  443. 82.5, // 0 - fist
  444. 1.0, // 1 - Brass knuckles
  445. 1.0, // 2 - Golf club
  446. 1.0, // 3 - Nitestick
  447. 1.0, // 4 - Knife
  448. 1.0, // 5 - Bat
  449. 1.0, // 6 - Shovel
  450. 1.0, // 7 - Pool cue
  451. 1.0, // 8 - Katana
  452. 1.0, // 9 - Chainsaw
  453. 1.0, // 10 - Dildo
  454. 1.0, // 11 - Dildo 2
  455. 1.0, // 12 - Vibrator
  456. 1.0, // 13 - Vibrator 2
  457. 1.0, // 14 - Flowers
  458. 1.0, // 15 - Cane
  459. 82.5, // 16 - Grenade
  460. 0.0, // 17 - Teargas
  461. 1.0, // 18 - Molotov
  462. 9.9, // 19 - Vehicle M4 (custom)
  463. 46.2, // 20 - Vehicle minigun (custom)
  464. 0.0, // 21
  465. 8.25, // 22 - Colt 45
  466. 13.2, // 23 - Silenced
  467. 46.2, // 24 - Deagle
  468. 49.5,//3.3, // 25 - Shotgun
  469. 49.5,//3.3, // 26 - Sawed-off
  470. 39.6,//4.95, // 27 - Spas
  471. 6.6, // 28 - UZI
  472. 8.25, // 29 - MP5
  473. 9.900001, // 30 - AK47
  474. 9.900001, // 31 - M4
  475. 6.6, // 32 - Tec9
  476. 24.750001, // 33 - Cuntgun
  477. 41.25, // 34 - Sniper
  478. 82.5, // 35 - Rocket launcher
  479. 82.5, // 36 - Heatseeker
  480. 1.0, // 37 - Flamethrower
  481. 46.2, // 38 - Minigun
  482. 82.5, // 39 - Satchel
  483. 0.0, // 40 - Detonator
  484. 0.33, // 41 - Spraycan
  485. 0.33, // 42 - Fire extinguisher
  486. 0.0, // 43 - Camera
  487. 0.0, // 44 - Night vision
  488. 0.0, // 45 - Infrared
  489. 0.0, // 46 - Parachute
  490. 0.0, // 47 - Fake pistol
  491. 2.64, // 48 - Pistol whip (custom)
  492. 9.9, // 49 - Vehicle
  493. 330.0, // 50 - Helicopter blades
  494. 82.5, // 51 - Explosion
  495. 1.0, // 52 - Car park (custom)
  496. 1.0, // 53 - Drowning
  497. 165.0 // 54 - Splat
  498. };
  499. bool OnSendPacket(BitStream *parameters, PacketPriority priority, PacketReliability reliability, char orderingChannel)
  500. {
  501. uint8_t packetId;
  502. stOnFootData OnFootData;
  503. parameters->ResetReadPointer();
  504. parameters->Read(packetId);
  505. parameters->Read((char *)&OnFootData, sizeof(stOnFootData));
  506. switch (packetId)
  507. {
  508. case ID_PLAYER_SYNC:
  509.  
  510. if (bEditFootSync)
  511. {
  512. parameters->Reset();
  513. parameters->Write((BYTE)ID_PLAYER_SYNC);
  514. parameters->Write((PCHAR)&OnFootData, sizeof(stOnFootData));
  515. pSAMP->sendPacket(parameters);
  516. return false;
  517. }
  518.  
  519. if (upside)
  520. {
  521. bEditFootSync = true;
  522.  
  523. D3DXQUATERNION Quat, Quat2;
  524. Quat.w = OnFootData.fQuaternion[0];
  525. Quat.x = OnFootData.fQuaternion[1];
  526. Quat.y = OnFootData.fQuaternion[2];
  527. Quat.z = OnFootData.fQuaternion[3];
  528. //
  529. D3DXVECTOR3 Axis;
  530. Axis.x = 0;
  531. Axis.y = 1;
  532. Axis.z = 0;
  533. OnFootData.fQuaternion[0] = Quat.w;
  534. OnFootData.fQuaternion[1] = Quat.x;
  535. OnFootData.fQuaternion[2] = Quat.y;
  536. OnFootData.fQuaternion[3] = Quat.z;
  537.  
  538. }
  539.  
  540. if (atentat1)
  541. {
  542.  
  543. if (!tick_done)
  544. {
  545. tick = GetTickCount64();
  546. tick_done = true;
  547. }
  548. if (GetTickCount64() - tick > 700)
  549. {
  550. static int current_tick = 1;
  551.  
  552. stBulletData BulletData;
  553. parameters->ResetReadPointer();
  554. parameters->Read(packetId);
  555. parameters->Read((PCHAR)&BulletData, sizeof(stBulletData));
  556.  
  557. int weaponid = pSAMP->getPlayers()->pLocalPlayer->byteCurrentWeapon;
  558.  
  559. for (int i = 0; i < SAMP_MAX_PLAYERS; i++)
  560. {
  561. if (pSAMP->getPlayers()->pRemotePlayer[i] == nullptr)
  562. continue;
  563. if (pSAMP->getPlayers()->pRemotePlayer[i]->pPlayerData == nullptr)
  564. continue;
  565. if (!pSAMP->getPlayers()->pRemotePlayer[i]->pPlayerData->fActorHealth)
  566. continue;
  567. float damage_t = pSAMP->getPlayers()->pRemotePlayer[i]->pPlayerData->fActorHealth / fWeaponDamage[pSAMP->getPlayers()->pLocalPlayer->byteCurrentWeapon];
  568.  
  569.  
  570. for (int z = 0; z < round(damage_t) + 1; z++)
  571. {
  572. BulletData.byteType = 1;
  573. BulletData.fOrigin[0] = pSAMP->getPlayers()->pRemotePlayer[i]->pPlayerData->fOnFootPos[0];
  574. BulletData.fOrigin[1] = pSAMP->getPlayers()->pRemotePlayer[i]->pPlayerData->fOnFootPos[1];
  575. BulletData.fOrigin[2] = pSAMP->getPlayers()->pRemotePlayer[i]->pPlayerData->fOnFootPos[2];
  576.  
  577. BulletData.fTarget[0] = pSAMP->getPlayers()->pRemotePlayer[i]->pPlayerData->fOnFootPos[0];
  578. BulletData.fTarget[1] = pSAMP->getPlayers()->pRemotePlayer[i]->pPlayerData->fOnFootPos[1];
  579. BulletData.fTarget[2] = pSAMP->getPlayers()->pRemotePlayer[i]->pPlayerData->fOnFootPos[2];
  580.  
  581. if (pSAMP->getPlayers()->pRemotePlayer[i]->pPlayerData->bytePlayerState == PLAYER_STATE_ONFOOT)
  582. {
  583. BulletData.fCenter[0] = (1.0f / 2) - ((rand() % (int)(1.0f * 10.0f) / 100.0f));
  584. BulletData.fCenter[1] = (1.0f / 2) - ((rand() % (int)(1.0f * 10.0f) / 100.0f));
  585. BulletData.fCenter[2] = 0.50f - ((rand() % 100) / 100.0f);
  586. }
  587.  
  588. else
  589. {
  590. BulletData.fCenter[0] = 0.0f;
  591. BulletData.fCenter[1] = 0.0f;
  592. BulletData.fCenter[2] = 0.56f - ((rand() % 5) / 100.0f);
  593. }
  594. BulletData.sTargetID = i;
  595. BulletData.byteWeaponID = weaponid;
  596. BitStream bsGiveDamage;
  597. bsGiveDamage.Write(false);
  598. bsGiveDamage.Write((USHORT)i);
  599. bsGiveDamage.Write((float)fWeaponDamage[weaponid]);
  600. bsGiveDamage.Write((int)weaponid);
  601. bsGiveDamage.Write((rand() % 7) + 3);
  602. pSAMP->sendRPC(RPC_GiveTakeDamage, &bsGiveDamage, HIGH_PRIORITY, RELIABLE_SEQUENCED, NULL, false);
  603.  
  604.  
  605. parameters->Reset();
  606. parameters->Write((BYTE)ID_BULLET_SYNC);
  607. parameters->Write((PCHAR)&BulletData, sizeof(stBulletData));
  608. pSAMP->sendPacket(parameters);
  609. }
  610.  
  611.  
  612. }
  613.  
  614. tick = 0;
  615. tick_done = false;
  616. }
  617. }
  618. }
  619. return TRUE;
  620. }
  621.  
  622. bool normalaim = false;
  623. bool nop = false;
  624. bool mp5checked = true;
  625. bool akchecked = true;
  626. bool sniperchecked = true;
  627. bool minigunchecked = true;
  628. bool silencedchecked = true;
  629. bool shotgunchecked = true;
  630. bool riflechecked = true;
  631. bool tecchecked = true;
  632. bool combatchecked = true;
  633. bool m4a1checked = true;
  634. bool deaglechecked = true;
  635. bool panic = false;
  636.  
  637.  
  638. //stuff
  639.  
  640. const char stunanims[12][15]
  641. {
  642. "DAM_armL_frmBK",
  643. "DAM_armL_frmFT",
  644. "DAM_armL_frmLT",
  645. "DAM_armR_frmBK",
  646. "DAM_armR_frmFT",
  647. "DAM_armR_frmRT",
  648. "DAM_LegL_frmBK",
  649. "DAM_LegL_frmFT",
  650. "DAM_LegL_frmLT",
  651. "DAM_LegR_frmBK",
  652. "DAM_LegR_frmFT",
  653. "DAM_LegR_frmRT"
  654. };
  655. const char stunanims2[4][18]
  656. {
  657. "DAM_stomach_frmBK",
  658. "DAM_stomach_frmFT",
  659. "DAM_stomach_frmLT",
  660. "DAM_stomach_frmRT"
  661. };
  662.  
  663.  
  664. char namechanger[256];
  665. bool namech = false;
  666.  
  667. int state = 0;
  668. bool checkpoint = false;
  669.  
  670. bool spawnme = false;
  671. int cheat_spammer_delay = 1;
  672. bool cheat_enable_spammer = false;
  673. char cheat_spammer_text[256];
  674. bool bAntiStun = false;
  675. bool bAntiStunned = false;
  676. bool taim = false;
  677. bool weather = false;
  678. int timeset;
  679. int weatherset;
  680. int tabb = 1;
  681. int whsize = 5;
  682. bool wall = false;
  683. BYTE* infRun = (BYTE*)0xB7CEE4;
  684. bool c_infRun = false;
  685. BYTE* GodMode = (BYTE*)0x96916D;
  686. bool c_GodMode = false;
  687. bool ioxygen = false;
  688. bool watercarvar = false;
  689. bool fake_kick = false;
  690. bool tp = false;
  691. bool megajumpvar = false;
  692. bool Trigger = false;
  693. //bool cnormal = false;
  694. bool mousefixvar = false;
  695. //nitro car
  696. bool nitrocar = false;
  697.  
  698. //tankmode
  699. bool tankmodecar = false;
  700. bool thermalvisionvar = false;
  701. bool aimbotvar = false;
  702. bool rotationvar = false;
  703. bool infammovar = false;
  704. bool fpsunlockvar = false;
  705. BYTE* bjump = (BYTE*)0x969161;
  706. bool c_bjump = false;
  707. bool c_cnormal = false;
  708. static bool no_resize = false;
  709. bool c_norecoil = false;
  710. bool KeyPressed(BYTE key)
  711. {
  712. return ((GetAsyncKeyState(key)&(1 << 16)) != 0);
  713. }
  714.  
  715. DWORD* pInfo = NULL;
  716. BYTE* ThroughWalls = NULL;
  717. float* fDistance = NULL;
  718. DWORD gpoint;
  719. bool c_aimbot = false;
  720. int t = 0;
  721. int keyt;
  722. float fcxpos;
  723. float fcypos;
  724. float camxpos;
  725. float fpvectorx;
  726. float fpvectory;
  727. float fxpos1;
  728. float fypos1;
  729. float fxpos2;
  730. float fypos2;
  731. float fxpos2a;
  732. float fypos2a;
  733. float fphp;
  734. float aa;
  735. float ab;
  736. float ac;
  737. float beta;
  738. float alpha;
  739. float fFps = NULL;
  740. float fLastTickCount = NULL;
  741. float fCurrentTickCount;
  742. float centerX = 0.0f;
  743. float centerY = 0.0f;
  744. float resX = 0.0f;
  745. float resY = 0.0f;
  746.  
  747. LONG x;
  748. LONG y;
  749. POINT pos;
  750. DWORD php;
  751. DWORD xpos1;
  752. DWORD ypos1;
  753. DWORD xpos2;
  754. DWORD ypos2;
  755. DWORD pmtrx1;
  756. DWORD pmtrx2;
  757. DWORD pvectorx;
  758. DWORD pvectory;
  759. DWORD ptarget;
  760. DWORD pped;
  761. DWORD pId;
  762. DWORD dwOldProtect = 0;
  763.  
  764.  
  765. DWORD* pTarget = (DWORD*)0xB6F3B8;//pointer of target object.
  766. DWORD* pActor = (DWORD*)0xB6F5F0;//pointer of player actor
  767. DWORD* pCamera = (DWORD*)0xB6F99C;//camera pointer
  768. float* camXpos = (float*)0xB6F258;//writeable camera Z angle
  769. int smooth_aim = 0;
  770. //stuff
  771.  
  772. // nu il mai gasesc pan
  773. bool g_bwasInitialized = false;
  774. bool m_IsGameFullyLoaded = false;
  775. bool menuOpen = false;
  776. bool wndproc = false;
  777. bool* p_open = NULL;
  778. bool recon = false;
  779. int item = 0;
  780. int startstop;
  781. int close;
  782. int hwndd;
  783. int startmenu;
  784.  
  785. DWORD key;
  786. HMODULE samp = GetModuleHandleA("samp.dll");
  787. DWORD address = (DWORD)samp + 0x64230;
  788. DWORD procID;
  789. DWORD g_dwSAMP_Addr = NULL;
  790. DWORD *g_Chat = NULL;
  791. HANDLE handle;
  792. HWND hWnd;
  793.  
  794. WNDPROC oriWndProc = NULL;
  795. extern LRESULT ImGui_ImplDX9_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
  796.  
  797. void everything()
  798. {
  799. GetWindowThreadProcessId(hWnd, &procID);
  800. handle = OpenProcess(PROCESS_ALL_ACCESS, FALSE, procID);
  801. }
  802.  
  803. //stuff
  804.  
  805.  
  806. void addSayToChatWindow(char *msg)
  807. {
  808. if (pSAMP == NULL)
  809. return;
  810.  
  811. if (msg == NULL)
  812. return;
  813.  
  814. if (msg == NULL)
  815. return;
  816.  
  817. if (msg[0] == '/')
  818. {
  819. ((void(__thiscall *) (void *_this, char *message)) (g_dwSAMP_Addr + SAMP_FUNC_SENDCMD))(pSAMP->getInput(), msg);
  820. }
  821. else
  822. {
  823. ((void(__thiscall *) (void *_this, char *message)) (g_dwSAMP_Addr + SAMP_FUNC_SAY)) (pSAMP->getPlayers()->pLocalPlayer, msg);
  824. }
  825. }
  826.  
  827. void say(char *text, ...)
  828. {
  829. if (pSAMP == NULL)
  830. return;
  831.  
  832. if (text == NULL)
  833. return;
  834.  
  835. va_list ap;
  836. char tmp[128];
  837. memset(tmp, 0, 128);
  838.  
  839. va_start(ap, text);
  840. vsprintf(tmp, text, ap);
  841. va_end(ap);
  842.  
  843. addSayToChatWindow(tmp);
  844. }
  845.  
  846. void MouseFix()
  847. {
  848. float xaxis;
  849. float yaxis;
  850. ReadProcessMemory(handle, (PBYTE*)0xB6EC1C, &xaxis, 4, 0);
  851. ReadProcessMemory(handle, (PBYTE*)0xB6EC18, &yaxis, 4, 0);
  852. if (xaxis != yaxis)
  853. {
  854. WriteProcessMemory(handle, (LPVOID)0xB6EC18, &xaxis, 4, 0);
  855. }
  856. }
  857.  
  858. // LCN
  859. int setLocalPlayerName(const char *name)
  860. {
  861. if (pSAMP->getPlayers() == NULL || pSAMP->getPlayers()->pLocalPlayer == NULL)
  862. return 0;
  863.  
  864. int strlen_name = strlen(name);
  865. if (strlen_name == 0 || strlen_name > SAMP_ALLOWED_PLAYER_NAME_LENGTH)
  866. return 0;
  867.  
  868. ((void(__thiscall *) (void *, const char *name, int len)) (g_dwSAMP_Addr + 0xB290)) (&pSAMP->getPlayers()->pVTBL_txtHandler, name, strlen_name);
  869. return 1;
  870. }
  871. //
  872.  
  873. void Fakekick()
  874. {
  875.  
  876. if (fake_ping)
  877. {
  878. DWORD fakeping = 1;
  879. ReadProcessMemory(handle, (LPVOID)((DWORD)samp + 0xEC0A8), &fakeping, sizeof(fakeping), 0);
  880.  
  881. if (fakeping != setfakeping)
  882. {
  883. fakeping = setfakeping;
  884. WriteProcessMemory(handle, (LPVOID)((DWORD)samp + 0xEC0A8), &fakeping, sizeof(fakeping), 0);
  885. }
  886. }
  887. if (!fake_ping)
  888. {
  889. DWORD fakeping = 1;
  890. ReadProcessMemory(handle, (LPVOID)((DWORD)samp + 0xEC0A8), &fakeping, sizeof(fakeping), 0);
  891.  
  892. if (fakeping != 100)
  893. {
  894. fakeping = 100;
  895. WriteProcessMemory(handle, (LPVOID)((DWORD)samp + 0xEC0A8), &fakeping, sizeof(fakeping), 0);
  896. }
  897. }
  898.  
  899.  
  900. if (fake_kick)
  901. {
  902. unsigned int func = (unsigned int)GetModuleHandleA("samp.dll") + 0x58C0;//g_dwSAMP_Addr + 0x4D70
  903. __asm {
  904. PUSH 00
  905. PUSH 0xFFFF
  906. CALL func
  907. }
  908. }
  909. }
  910.  
  911. void Functions()
  912. {
  913.  
  914. if (teleportcp)
  915. {
  916. if (GetAsyncKeyState(VK_F11) & 1)
  917. {
  918. int cpx, cpy, cpz, cped, matrix, cpon;
  919. ReadProcessMemory(handle, (LPVOID)0xC7DEC8, &cpx, sizeof(cpx), NULL);
  920. ReadProcessMemory(handle, (LPVOID)0xC7DECC, &cpy, sizeof(cpy), NULL);
  921. ReadProcessMemory(handle, (LPVOID)0xC7DED0, &cpz, sizeof(cpz), NULL);
  922. ReadProcessMemory(handle, (LPCVOID)0xB6F5F0, &cped, sizeof(cped), NULL);
  923. ReadProcessMemory(handle, (LPCVOID)(cped + 0x14), &matrix, sizeof(matrix), NULL);
  924. ReadProcessMemory(handle, (LPVOID)0xC7DEEA, &cpon, sizeof(cpon), NULL);
  925. if (cpon != 0) {
  926. WriteProcessMemory(handle, (LPVOID)(matrix + 0x30), &cpx, sizeof(cpx), NULL);
  927. WriteProcessMemory(handle, (LPVOID)(matrix + 0x34), &cpy, sizeof(cpy), NULL);
  928. WriteProcessMemory(handle, (LPVOID)(matrix + 0x38), &cpz, sizeof(cpz), NULL);
  929. }
  930.  
  931. }
  932. }
  933.  
  934. if (teleportmap)
  935. {
  936. if (GetAsyncKeyState(VK_F10))
  937. {
  938. DWORD mapx, mapy, cpz, cped, cpon, matrix;
  939. mapx = *(DWORD*)0xBA67B8;
  940. mapy = *(DWORD*)0xBA67BC;
  941. cped = *(DWORD*)0xB6F5F0;
  942. matrix = *(DWORD*)(cped + 0x14);
  943.  
  944. *(DWORD*)(matrix + 0x30) = mapx;
  945. *(DWORD*)(matrix + 0x34) = mapy;
  946. }
  947. }
  948.  
  949. if (namech)
  950. {
  951. if (strlen(namechanger))
  952. {
  953.  
  954. {
  955. setLocalPlayerName(namechanger);
  956. }
  957. }
  958.  
  959. }
  960.  
  961. if (cheat_enable_spammer)
  962. {
  963. if (strlen(cheat_spammer_text))
  964. {
  965. if (cheat_spammer_delay)
  966. {
  967. static int sent = 0;
  968.  
  969. if ((GetTickCount() - sent) >= cheat_spammer_delay)
  970. {
  971. say(cheat_spammer_text);
  972. sent = GetTickCount();
  973. }
  974. }
  975. else
  976. {
  977. say(cheat_spammer_text);
  978. }
  979. }
  980. }
  981.  
  982.  
  983. if (c_infRun)
  984. {
  985.  
  986. *infRun = 1;
  987. c_infRun = true;
  988.  
  989. }
  990. else {
  991. *infRun = 0;
  992. c_infRun = false;
  993. }
  994.  
  995. if (ioxygen)
  996. {
  997. DWORD infiniteoxygenAddr = 0x96916E;
  998. DWORD infiniteoxygen = 1;
  999.  
  1000. WriteProcessMemory(handle, (LPVOID)infiniteoxygenAddr, &infiniteoxygen, sizeof(infiniteoxygen), 0);
  1001. }
  1002.  
  1003. if (rotationvar)
  1004. {
  1005. DWORD cped = 0;
  1006. ReadProcessMemory(handle, (LPCVOID)0xB6F5F0, &cped, sizeof(DWORD), 0);
  1007. DWORD moveAddr = cped + 0x560;
  1008. DWORD move = 0; ReadProcessMemory(handle, (LPCVOID)moveAddr, &move, sizeof(move), 0);
  1009. if (move == 1103626240) {} if (move >= 1089470463) {
  1010. DWORD ceva = 1103626240;
  1011. WriteProcessMemory(handle, (LPVOID)moveAddr, &ceva, sizeof(ceva), 0);
  1012. }
  1013. }
  1014.  
  1015.  
  1016. // suicide MUIE
  1017. if (checkpoint)
  1018. {
  1019. float X, Y, Z;
  1020. DWORD PlayerPointer = *(DWORD*)(g_dwSAMP_Addr + 0x76F3B8);
  1021. if (GetAsyncKeyState(VK_F9) & 1)
  1022. {
  1023. X = *(float*)(*(DWORD*)(PlayerPointer + 0x14) + 0x30);
  1024. Y = *(float*)(*(DWORD*)(PlayerPointer + 0x14) + 0x34);
  1025. Z = *(float*)(*(DWORD*)(PlayerPointer + 0x14) + 0x38);
  1026. }
  1027. }
  1028.  
  1029. //suicide
  1030.  
  1031. if (Trigger)
  1032. {
  1033.  
  1034. int rem[5];
  1035. rem[0] = *(int *)0xB6F3B8;
  1036. rem[1] = rem[0];
  1037. rem[1] += 0x79C;
  1038. if (*(int *)rem[1] > 0)
  1039. {
  1040. INPUT Input = { 0 };
  1041. Input.type = INPUT_MOUSE;
  1042. Input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN;
  1043. SendInput(1, &Input, sizeof(INPUT));
  1044. Sleep(100);
  1045. ZeroMemory(&Input, sizeof(INPUT));
  1046. Input.type = INPUT_MOUSE;
  1047. Input.mi.dwFlags = MOUSEEVENTF_LEFTUP;
  1048. SendInput(1, &Input, sizeof(INPUT));
  1049. }
  1050. }
  1051.  
  1052. if (wall)
  1053. {
  1054. pInfo = (DWORD*)(g_dwSAMP_Addr + SAMP_INFO);
  1055. while (*pInfo == 0) Sleep(1000);
  1056. while (*(DWORD*)(*pInfo + SAMP_SETTINGS) == 0) Sleep(1000);
  1057. ThroughWalls = (BYTE*)(*(DWORD*)(*pInfo + SAMP_SETTINGS) + 0x2F);
  1058. fDistance = (float*)((DWORD*)(*(DWORD*)(*pInfo + SAMP_SETTINGS) + 0x27));
  1059.  
  1060. DWORD OldProt;
  1061. VirtualProtect((LPVOID)ThroughWalls, 0x100, PAGE_EXECUTE_READWRITE, &OldProt);
  1062. VirtualProtect((LPVOID)fDistance, 0x100, PAGE_EXECUTE_READWRITE, &OldProt);
  1063.  
  1064. if (*ThroughWalls != 512)
  1065. {
  1066.  
  1067. *fDistance = (float)whsize * 15;
  1068. *ThroughWalls = 512;
  1069. }
  1070.  
  1071. if (GetAsyncKeyState(VK_F8))
  1072. {
  1073. *fDistance = 70;
  1074. Sleep(100);
  1075. *ThroughWalls = 513;
  1076. }
  1077. }
  1078. else
  1079. {
  1080. pInfo = (DWORD*)(g_dwSAMP_Addr + SAMP_INFO);
  1081. while (*pInfo == 0) Sleep(1000);
  1082. while (*(DWORD*)(*pInfo + SAMP_SETTINGS) == 0) Sleep(1000);
  1083. ThroughWalls = (BYTE*)(*(DWORD*)(*pInfo + SAMP_SETTINGS) + 0x2F);
  1084. fDistance = (float*)((DWORD*)(*(DWORD*)(*pInfo + SAMP_SETTINGS) + 0x27));
  1085.  
  1086. DWORD OldProt;
  1087. VirtualProtect((LPVOID)ThroughWalls, 0x100, PAGE_EXECUTE_READWRITE, &OldProt);
  1088. VirtualProtect((LPVOID)fDistance, 0x100, PAGE_EXECUTE_READWRITE, &OldProt);
  1089.  
  1090. if (*ThroughWalls != 513)
  1091. {
  1092.  
  1093. *fDistance = 70;
  1094. *ThroughWalls = 513;
  1095. }
  1096. }
  1097.  
  1098. if (c_norecoil)
  1099. {
  1100. DWORD norecoilAddr = 0xB7CDC8;
  1101. DWORD norecoil = 1;
  1102.  
  1103. ReadProcessMemory(handle, (LPCVOID)norecoilAddr, &norecoil, sizeof(norecoil), 0);
  1104.  
  1105. norecoil = 1;
  1106. DWORD valuetherm = 1.074754357;
  1107. WriteProcessMemory(handle, (LPVOID)norecoilAddr, &valuetherm, sizeof(valuetherm), 0);
  1108. Sleep(10);
  1109.  
  1110. }
  1111.  
  1112. if (bAntiStun)
  1113. {
  1114. if (!pSAMP->getPlayers())
  1115. return;
  1116. if (!bAntiStunned)
  1117. {
  1118. // but it doesn't work only for sniper
  1119. DWORD dwStunAddr = *(DWORD*)0x00B6F5F0;
  1120. *(BYTE*)(dwStunAddr + 0x478) = 4;
  1121. }
  1122.  
  1123. // for sniper stun
  1124. float fRate = 100.f;
  1125. bAntiStunned = true;
  1126. }
  1127. else
  1128. {
  1129. if (bAntiStunned)
  1130. {
  1131. DWORD dwStunAddr = *(DWORD*)0x00B6F5F0;
  1132. *(BYTE*)(dwStunAddr + 0x478) = 0;
  1133.  
  1134. float fRate = 1.f;
  1135. bAntiStunned = false;
  1136. }
  1137. }
  1138. //JUMP BIKE
  1139. if (c_bjump)
  1140. {
  1141. *bjump = 1;
  1142. c_bjump = true;
  1143. }
  1144. else
  1145. {
  1146. *bjump = 0;
  1147. c_bjump = false;
  1148. }
  1149. //JUMP BIKE
  1150. // FPS UNLOCKER
  1151. if (fpsunlockvar)
  1152. {
  1153. DWORD fps = 0;
  1154. ReadProcessMemory(handle, (LPCVOID)((DWORD)samp + 0x9D9D0), &fps, sizeof(fps), 0);
  1155.  
  1156. if (fps != 1347550997)
  1157. {
  1158. DWORD pFps = 1347550997;
  1159. WriteProcessMemory(handle, (LPVOID)((DWORD)samp + 0x9D9D0), &pFps, sizeof(pFps), 0);
  1160.  
  1161. }
  1162. }
  1163. //FPS UNLOCKER STOP
  1164. if (!fpsunlockvar)
  1165. {
  1166. DWORD fps = 0;
  1167. ReadProcessMemory(handle, (LPCVOID)((DWORD)samp + 0x9D9D0), &fps, sizeof(fps), 0);
  1168.  
  1169. if (fps == 1347550997)
  1170. {
  1171. DWORD pFps = 1347550997;
  1172. WriteProcessMemory(handle, (LPVOID)((DWORD)samp + 0x9D9D0), &pFps, sizeof(pFps), 0);
  1173.  
  1174. }
  1175. }
  1176.  
  1177. // inf ammo
  1178. if (infammovar)
  1179. {
  1180. DWORD infiniteammoAddr = 0x969178;
  1181. DWORD infiniteammo3 = 1;
  1182. WriteProcessMemory(handle, (LPVOID)infiniteammoAddr, &infiniteammo3, sizeof(infiniteammo3), 0);
  1183. }
  1184.  
  1185. if (!infammovar)
  1186. {
  1187. DWORD infiniteammoAddr = 0x969178;
  1188. DWORD infiniteammo3 = 0;
  1189. WriteProcessMemory(handle, (LPVOID)infiniteammoAddr, &infiniteammo3, sizeof(infiniteammo3), 0);
  1190.  
  1191. infiniteammo3 = 0;
  1192. Sleep(10);
  1193.  
  1194. }
  1195.  
  1196. //rotatie
  1197. /*if (rotationvar)
  1198. {
  1199. DWORD cped = 0;
  1200. ReadProcessMemory(handle, (LPCVOID)0xB6F5F0, &cped, sizeof(DWORD), 0);
  1201. DWORD moveAddr = cped + 0x560;
  1202. DWORD move = 0; ReadProcessMemory(handle, (LPCVOID)moveAddr, &move, sizeof(move), 0);
  1203. if (move == 1103626240) {} if (move >= 1089470463) {
  1204. DWORD ceva = 1103626240;
  1205. WriteProcessMemory(handle, (LPVOID)moveAddr, &ceva, sizeof(ceva), 0);
  1206. }
  1207. }*/
  1208. //GodMode
  1209. if (c_GodMode)
  1210. {
  1211. *GodMode = 1;
  1212. c_GodMode = true;
  1213. }
  1214. else
  1215. {
  1216. *GodMode = 0;
  1217. c_GodMode = false;
  1218. }
  1219. //GodMode
  1220. // aimbot -> nefacut inca
  1221. // start aimbot
  1222. if (c_aimbot)
  1223. {
  1224. c_aimbot = true;
  1225.  
  1226. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F5F0, &gpoint, 4, 0);
  1227.  
  1228. if ((gpoint > 0) && (t == 0))
  1229. {
  1230. t = 1;
  1231. }
  1232. if (gpoint > 0)
  1233. {
  1234. pmtrx1 = gpoint + 0x14;
  1235. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pmtrx1, &pmtrx1, 4, 0);
  1236. xpos1 = pmtrx1 + 0x30;
  1237. ypos1 = pmtrx1 + 0x34;
  1238. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)xpos1, &fxpos1, 4, 0);
  1239. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)ypos1, &fypos1, 4, 0);
  1240. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F9CC, &fcxpos, 4, 0);
  1241. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F9D0, &fcypos, 4, 0);
  1242. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB6F3B8, &ptarget, 4, 0);
  1243. pped = ptarget + 0x79C;
  1244. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pped, &pped, 4, 0);
  1245.  
  1246. if (pped > 0)
  1247. {
  1248. pvectorx = pped + 0x44;
  1249. pvectory = pped + 0x48;
  1250. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pvectorx, &fpvectorx, 4, 0);
  1251. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pvectory, &fpvectory, 4, 0);
  1252. pmtrx2 = pped + 0x14;
  1253. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)pmtrx2, &pmtrx2, 4, 0);
  1254. xpos2 = pmtrx2 + 0x30;
  1255. ypos2 = pmtrx2 + 0x34;
  1256. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)xpos2, &fxpos2, 4, 0);
  1257. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)ypos2, &fypos2, 4, 0);
  1258. php = pped + 0x540;
  1259. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)php, &fphp, 4, 0);
  1260. if (fphp > 0)
  1261. {
  1262. fxpos2a = fxpos2;
  1263. fypos2a = fypos2;
  1264. aa = fabs(fcxpos - fxpos2);
  1265. ab = fabs(fcypos - fypos2);
  1266. ac = sqrt(aa*aa + ab * ab);
  1267. alpha = asin(aa / ac);
  1268. beta = acos(aa / ac);
  1269. if ((fxpos1 > fxpos2) && (fypos1 < fypos2))
  1270. {
  1271. beta = -beta;
  1272. }
  1273. if ((fxpos1 > fxpos2) && (fypos1 > fypos2))
  1274. {
  1275. beta = beta;
  1276. }
  1277. if ((fxpos1 < fxpos2) && (fypos1 > fypos2))
  1278. {
  1279. beta = (alpha + (3.14 / 2));
  1280. }
  1281. if ((fxpos1 < fxpos2) && (fypos1 < fypos2))
  1282. {
  1283. beta = (-alpha - (3.14 / 2));
  1284. }
  1285. camxpos = beta + 0.0389;
  1286. ReadProcessMemory(GetCurrentProcess(), (LPCVOID)0xB7347A, &keyt, 4, 0);
  1287. if (keyt > 0)
  1288. {
  1289. WriteProcessMemory(GetCurrentProcess(), (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL);
  1290. }
  1291. }
  1292. }
  1293. }
  1294. }
  1295. else {
  1296. everything();
  1297. c_aimbot = false;
  1298. }
  1299. // Thermalvision
  1300. //start thermal
  1301. if (thermalvisionvar)
  1302. {
  1303.  
  1304. DWORD thermalvisionAddr = 0xC402B8;
  1305. DWORD thermalvision = 1;
  1306.  
  1307. ReadProcessMemory(handle, (LPCVOID)thermalvisionAddr, &thermalvision, sizeof(thermalvision), 0);
  1308.  
  1309. thermalvision = 1;
  1310. DWORD valuetherm = 256;
  1311. WriteProcessMemory(handle, (LPVOID)thermalvisionAddr, &valuetherm, sizeof(valuetherm), 0);
  1312. Sleep(10);
  1313.  
  1314. }
  1315. //stop thermal
  1316. if (!thermalvisionvar)
  1317. {
  1318. DWORD thermalvisionAddr = 0xC402B8;
  1319. DWORD thermalvision = 0;
  1320.  
  1321. ReadProcessMemory(handle, (LPCVOID)thermalvisionAddr, &thermalvision, sizeof(thermalvision), 0);
  1322.  
  1323. thermalvision = 0;
  1324. DWORD valuetherm = 0;
  1325. WriteProcessMemory(handle, (LPVOID)thermalvisionAddr, &thermalvision, sizeof(valuetherm), 0);
  1326.  
  1327. }
  1328. else
  1329. {
  1330. pInfo = (DWORD*)(g_dwSAMP_Addr + SAMP_INFO);
  1331. while (*pInfo == 0) Sleep(1000);
  1332. while (*(DWORD*)(*pInfo + SAMP_SETTINGS) == 0) Sleep(1000);
  1333. ThroughWalls = (BYTE*)(*(DWORD*)(*pInfo + SAMP_SETTINGS) + 0x2F);
  1334. fDistance = (float*)((DWORD*)(*(DWORD*)(*pInfo + SAMP_SETTINGS) + 0x27));
  1335.  
  1336. DWORD OldProt;
  1337. VirtualProtect((LPVOID)ThroughWalls, 0x100, PAGE_EXECUTE_READWRITE, &OldProt);
  1338. VirtualProtect((LPVOID)fDistance, 0x100, PAGE_EXECUTE_READWRITE, &OldProt);
  1339.  
  1340. if (*ThroughWalls != 513)
  1341. {
  1342.  
  1343. *fDistance = 70;
  1344. *ThroughWalls = 513;
  1345. }
  1346. }
  1347. // Mousefix
  1348. if (mousefixvar) // CREDITE GARRET PENTRU SURSA MOUSEFIX
  1349. {
  1350. float xaxis;
  1351. float yaxis;
  1352. ReadProcessMemory(handle, (PBYTE*)0xB6EC1C, &xaxis, 4, 0);
  1353. ReadProcessMemory(handle, (PBYTE*)0xB6EC18, &yaxis, 4, 0);
  1354. if (xaxis != yaxis)
  1355. {
  1356. WriteProcessMemory(handle, (LPVOID)0xB6EC18, &xaxis, 4, 0);
  1357. }
  1358. }
  1359. //Mega jump
  1360. // start megajump
  1361. if (megajumpvar)
  1362. {
  1363. DWORD megajumpAddr = 0x96916C;
  1364. DWORD megajump = 1;
  1365. ReadProcessMemory(handle, (LPCVOID)megajumpAddr, &megajump, sizeof(megajump), 0);
  1366.  
  1367. megajump = 1;
  1368. WriteProcessMemory(handle, (LPVOID)megajumpAddr, &megajump, sizeof(megajump), 0);
  1369. Sleep(10);
  1370.  
  1371. }
  1372. //stop megajump
  1373. if (!megajumpvar)
  1374. {
  1375. DWORD megajumpAddr = 0x96916C;
  1376. DWORD megajump = 0;
  1377. ReadProcessMemory(handle, (LPCVOID)megajumpAddr, &megajump, sizeof(megajump), 0);
  1378.  
  1379. if (megajump == 1)
  1380. {
  1381. megajump = 0;
  1382. WriteProcessMemory(handle, (LPVOID)megajumpAddr, &megajump, sizeof(megajump), 0);
  1383. Sleep(10);
  1384. }
  1385. }
  1386.  
  1387. //WaterCar
  1388. // start watercar
  1389. if (watercarvar)
  1390. {
  1391. DWORD watercarAddr = 0x6C2759;
  1392. DWORD watercar = 1;
  1393. ReadProcessMemory(handle, (LPVOID)watercarAddr, &watercar, sizeof(watercar), 0);
  1394.  
  1395. watercar = 1;
  1396. WriteProcessMemory(handle, (LPVOID)watercarAddr, &watercar, sizeof(watercar), 0);
  1397. Sleep(10);
  1398.  
  1399. }
  1400. // stop watercar
  1401. if (!watercarvar)
  1402. {
  1403. DWORD watercarAddr = 0x6C2759;
  1404. DWORD watercar = 0;
  1405. ReadProcessMemory(handle, (LPVOID)watercarAddr, &watercar, sizeof(watercar), 0);
  1406.  
  1407. if (watercar = 1)
  1408. {
  1409. watercar = 0;
  1410. WriteProcessMemory(handle, (LPVOID)watercarAddr, &watercar, sizeof(watercar), 0);
  1411. Sleep(10);
  1412. }
  1413.  
  1414. }
  1415. // inf run
  1416. if (c_infRun)
  1417. {
  1418.  
  1419. *infRun = 1;
  1420. c_infRun = true;
  1421.  
  1422. }
  1423. else {
  1424. *infRun = 0;
  1425. c_infRun = false;
  1426. }
  1427. // Infinite oxygen
  1428. // start oxygen
  1429. if (ioxygen)
  1430. {
  1431. DWORD infiniteoxygenAddr = 0x96916E;
  1432. DWORD infiniteoxygen = 1;
  1433.  
  1434. WriteProcessMemory(handle, (LPVOID)infiniteoxygenAddr, &infiniteoxygen, sizeof(infiniteoxygen), 0);
  1435. }
  1436.  
  1437. // stop oxygen
  1438. if (!ioxygen)
  1439. {
  1440. DWORD infiniteoxygenAddr = 0x96916E;
  1441. DWORD infiniteoxygen = 0;
  1442.  
  1443. WriteProcessMemory(handle, (LPVOID)infiniteoxygenAddr, &infiniteoxygen, sizeof(infiniteoxygen), 0);
  1444. }
  1445. //tankmode
  1446. if (tankmodecar)
  1447. {
  1448. DWORD tankmodeAddr = 0x969164;
  1449. DWORD tankmode = 1;
  1450. ReadProcessMemory(handle, (LPVOID)tankmodeAddr, &tankmode, sizeof(tankmode), 0);
  1451.  
  1452. tankmode = 1;
  1453. WriteProcessMemory(handle, (LPVOID)tankmodeAddr, &tankmode, sizeof(tankmode), 0);
  1454. Sleep(10);
  1455.  
  1456. }
  1457. // stop tank
  1458. if (!tankmodecar)
  1459. {
  1460. DWORD tankmodeAddr = 0x969164;
  1461. DWORD tankmode = 0;
  1462. ReadProcessMemory(handle, (LPVOID)tankmodeAddr, &tankmode, sizeof(tankmode), 0);
  1463.  
  1464. if (tankmode = 1)
  1465. {
  1466. tankmode = 0;
  1467. WriteProcessMemory(handle, (LPVOID)tankmodeAddr, &tankmode, sizeof(tankmode), 0);
  1468. Sleep(10);
  1469. }
  1470.  
  1471. }
  1472. //nitro
  1473. if (nitrocar)
  1474. {
  1475. DWORD nitromodeAddr = 0x969165;
  1476. DWORD nitromode = 1;
  1477. ReadProcessMemory(handle, (LPVOID)nitromodeAddr, &nitromode, sizeof(nitromode), 0);
  1478.  
  1479. nitromode = 1;
  1480. WriteProcessMemory(handle, (LPVOID)nitromodeAddr, &nitromode, sizeof(nitromode), 0);
  1481. Sleep(10);
  1482.  
  1483. }
  1484. // stop nitro
  1485. if (!nitrocar)
  1486. {
  1487. DWORD nitromodeAddr = 0x969165;
  1488. DWORD nitromode = 0;
  1489. ReadProcessMemory(handle, (LPVOID)nitromodeAddr, &nitromode, sizeof(nitromode), 0);
  1490.  
  1491. if (nitromode = 1)
  1492. {
  1493. nitromode = 0;
  1494. WriteProcessMemory(handle, (LPVOID)nitromodeAddr, &nitromode, sizeof(nitromode), 0);
  1495. Sleep(10);
  1496. }
  1497.  
  1498. }
  1499. if (normalaim)
  1500. {
  1501. float fcxpos;
  1502. float fcypos;
  1503. float camxpos;
  1504. float camypos;
  1505. float fpvectorx;
  1506. float fpvectory;
  1507. float fxpos1;
  1508. float fypos1;
  1509. float fzpos1;
  1510. float fxpos2;
  1511. float fypos2;
  1512. float fzpos2;
  1513. float fxpos2a;
  1514. float fypos2a;
  1515. float fzpos2a;
  1516. float fphp;
  1517. float aa;
  1518. float ab;
  1519. float ac;
  1520. float beta;
  1521. float alpha;
  1522. int t;
  1523. int wID;
  1524. int keyt;
  1525. t = 0;
  1526.  
  1527. DWORD php;
  1528. DWORD xpos1;
  1529. DWORD ypos1;
  1530. DWORD zpos1;
  1531. DWORD xpos2;
  1532. DWORD ypos2;
  1533. DWORD zpos2;
  1534. DWORD pmtrx1;
  1535. DWORD pmtrx2;
  1536. DWORD pvectorx;
  1537. DWORD pvectory;
  1538. DWORD gpoint;
  1539. DWORD ptarget;
  1540. DWORD pped;
  1541. DWORD pId;
  1542. ReadProcessMemory(handle, (LPCVOID)0xBAA410, &wID, sizeof(int), 0);
  1543. ReadProcessMemory(handle, (LPCVOID)0xB6F5F0, &gpoint, 4, 0);
  1544.  
  1545.  
  1546.  
  1547. if (gpoint > 0) {
  1548. pmtrx1 = gpoint + 0x14; // location pointer of player XYZ
  1549. ReadProcessMemory(handle, (LPCVOID)pmtrx1, &pmtrx1, 4, 0);
  1550.  
  1551. xpos1 = pmtrx1 + 0x30; // x position of player
  1552. ypos1 = pmtrx1 + 0x34; // y position of player
  1553. zpos1 = pmtrx1 + 0x38; // z position of player
  1554.  
  1555. ReadProcessMemory(handle, (LPCVOID)xpos1, &fxpos1, 4, 0);
  1556. ReadProcessMemory(handle, (LPCVOID)ypos1, &fypos1, 4, 0);
  1557. ReadProcessMemory(handle, (LPCVOID)zpos1, &fzpos1, 4, 0);
  1558.  
  1559. ReadProcessMemory(handle, (LPCVOID)0xB6F9CC, &fcxpos, 4, 0); // not really sure
  1560. ReadProcessMemory(handle, (LPCVOID)0xB6F9D0, &fcypos, 4, 0); // not really sure
  1561.  
  1562. ReadProcessMemory(handle, (LPCVOID)0xB6F3B8, &ptarget, 4, 0); // pointer to target
  1563.  
  1564. pped = ptarget + 0x79C; // our current target
  1565. ReadProcessMemory(handle, (LPCVOID)pped, &pped, 4, 0);
  1566.  
  1567. if (pped > 0)
  1568. {
  1569. pvectorx = pped + 0x44; // border (x) (hitbox)
  1570. pvectory = pped + 0x48; // border (y) (hitbox)
  1571.  
  1572. ReadProcessMemory(handle, (LPCVOID)pvectorx, &fpvectorx, 4, 0);
  1573. ReadProcessMemory(handle, (LPCVOID)pvectory, &fpvectory, 4, 0);
  1574.  
  1575. pmtrx2 = pped + 0x14; // pointer to XYZ of target
  1576. ReadProcessMemory(handle, (LPCVOID)pmtrx2, &pmtrx2, 4, 0);
  1577.  
  1578. xpos2 = pmtrx2 + 0x30; // x position (of target)
  1579. ypos2 = pmtrx2 + 0x34; // y position (of target)
  1580. zpos2 = pmtrx2 + 0x38; // position (of target)
  1581.  
  1582. ReadProcessMemory(handle, (LPCVOID)xpos2, &fxpos2, 4, 0);
  1583. ReadProcessMemory(handle, (LPCVOID)ypos2, &fypos2, 4, 0);
  1584. ReadProcessMemory(handle, (LPCVOID)zpos2, &fzpos2, 4, 0);
  1585.  
  1586. php = pped + 0x540; // ped health
  1587. ReadProcessMemory(handle, (LPCVOID)php, &fphp, 4, 0);
  1588.  
  1589. float theta, dist;
  1590. if (fphp > 0) // if ped health > 0
  1591. {
  1592. //dist = sqrt((float)(xpos2-xpos1)*(xpos2-xpos1) + (ypos2-ypos1)*(ypos2-ypos1) + (zpos2-zpos1)*(zpos2-zpos1));
  1593.  
  1594. dist = sqrt((fxpos2 - fxpos1)*(fxpos2 - fxpos1) + (fypos2 - fypos1)*(fypos2 - fypos1) + (fzpos2 - fzpos1)*(fzpos2 - fzpos1));
  1595. theta = asin((fzpos2 - fzpos1) / dist);
  1596. theta -= (90 / (3.14 * 180));
  1597.  
  1598. fxpos2a = fxpos2;
  1599. fypos2a = fypos2;
  1600.  
  1601. aa = fabs(fcxpos - fxpos2);
  1602. ab = fabs(fcypos - fypos2);
  1603. ac = sqrt(aa*aa + ab * ab);
  1604.  
  1605. alpha = asin(aa / ac);
  1606. beta = acos(aa / ac);
  1607.  
  1608. if ((fxpos1 > fxpos2) && (fypos1 < fypos2))
  1609. {
  1610. beta = -beta;
  1611. }
  1612. if ((fxpos1 > fxpos2) && (fypos1 > fypos2))
  1613. {
  1614. beta = beta;
  1615. }
  1616. if ((fxpos1 < fxpos2) && (fypos1 > fypos2))
  1617. {
  1618. beta = (alpha + (3.14 / 2));
  1619. }
  1620. if ((fxpos1 < fxpos2) && (fypos1 < fypos2))
  1621. {
  1622. beta = (-alpha - (3.14 / 2));
  1623. }
  1624.  
  1625. if (wID == 24 && deaglechecked) {
  1626. camxpos = beta + 0.0410;
  1627. camypos = theta + 0.0389 + dist / 3000;
  1628. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1629. }
  1630. if (wID == 31 && m4a1checked) {
  1631. camxpos = beta + 0.0300 + (dist / 14000);
  1632. camypos = theta + 0.0389 + dist / 3000;
  1633. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1634. }
  1635. if (wID == 27 && combatchecked) {
  1636. camxpos = beta + 0.0300 + (dist / 14000);
  1637. camypos = theta + 0.0389 + dist / 3000;
  1638. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1639. }
  1640. if (wID == 32 && tecchecked) {
  1641. camxpos = beta + 0.0300 + (dist / 14000);
  1642. camypos = theta + 0.0389 + dist / 3000;
  1643. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1644. }
  1645. if (wID == 33 && riflechecked) {
  1646. camypos = theta + 0.0389 + dist / 3000;
  1647. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1648. camxpos = beta + 0.0300 + (dist / 14000);
  1649. }
  1650. if (wID == 25 && shotgunchecked) {
  1651. camxpos = beta + 0.0300 + (dist / 14000);
  1652. camypos = theta + 0.0389 + dist / 3000;
  1653. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1654. }
  1655. if (wID == 23 && silencedchecked) {
  1656. camxpos = beta + 0.0300 + (dist / 14000);
  1657. camypos = theta + 0.0389 + dist / 3000;
  1658. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1659. }
  1660. if (wID == 38 && minigunchecked) {
  1661. camxpos = beta + 0.0300 + (dist / 14000);
  1662. camypos = theta + 0.0389 + dist / 3000;
  1663. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1664. }
  1665. if (wID == 34 && sniperchecked) {
  1666. camxpos = beta + 0.0300 + (dist / 14000);
  1667. camypos = theta + 0.0389 + dist / 3000;
  1668. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1669. }
  1670. if (wID == 30 && akchecked) {
  1671. camxpos = beta + 0.0300 + (dist / 14000);
  1672. camypos = theta + 0.0389 + dist / 3000;
  1673. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1674. }
  1675. if (wID == 29 && mp5checked) {
  1676. camxpos = beta + 0.0300 + (dist / 14000);
  1677. camypos = theta + 0.0389 + dist / 3000;
  1678. WriteProcessMemory(handle, (LPVOID)0xB6F258, (LPVOID)&camxpos, 4, NULL); // write X-coordinate vector to X-coordinate vector of camera
  1679. }
  1680. }
  1681. }
  1682. }
  1683. }
  1684. }
  1685.  
  1686. void Pleata()
  1687. {
  1688. ImGuiStyle& style = ImGui::GetStyle();
  1689. style.Colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f);
  1690. style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
  1691. style.Colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.70f);
  1692. style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
  1693. style.Colors[ImGuiCol_PopupBg] = ImVec4(0.05f, 0.05f, 0.10f, 0.90f);
  1694. style.Colors[ImGuiCol_Border] = ImVec4(0.70f, 0.70f, 0.70f, 0.65f);
  1695. style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
  1696. style.Colors[ImGuiCol_FrameBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.30f);
  1697. style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.90f, 0.80f, 0.80f, 0.40f);
  1698. style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.90f, 0.65f, 0.65f, 0.45f);
  1699. style.Colors[ImGuiCol_TitleBg] = ImVec4(0.69f, 0.08f, 0.00f, 1.00f);
  1700. style.Colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 0.00f, 0.00f, 1.00f);
  1701. style.Colors[ImGuiCol_TitleBgActive] = ImVec4(0.69f, 0.08f, 0.00f, 1.00f);
  1702. style.Colors[ImGuiCol_MenuBarBg] = ImVec4(0.42f, 0.00f, 0.00f, 0.78f);
  1703. style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.20f, 0.25f, 0.30f, 0.60f);
  1704. style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.51f, 0.00f, 0.00f, 0.78f);
  1705. style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.84f, 0.01f, 0.01f, 0.59f);
  1706. style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(1.00f, 0.00f, 0.00f, 1.00f);
  1707. style.Colors[ImGuiCol_ComboBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.99f);
  1708. style.Colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.50f);
  1709. style.Colors[ImGuiCol_SliderGrab] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f);
  1710. style.Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f);
  1711. style.Colors[ImGuiCol_Button] = ImVec4(0.51f, 0.00f, 0.00f, 0.78f);
  1712. style.Colors[ImGuiCol_ButtonHovered] = ImVec4(0.67f, 0.40f, 0.40f, 1.00f);
  1713. style.Colors[ImGuiCol_ButtonActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f);
  1714. style.Colors[ImGuiCol_Header] = ImVec4(0.84f, 0.01f, 0.01f, 0.59f);
  1715. style.Colors[ImGuiCol_HeaderHovered] = ImVec4(0.59f, 0.00f, 0.00f, 0.59f);
  1716. style.Colors[ImGuiCol_HeaderActive] = ImVec4(0.84f, 0.01f, 0.01f, 0.59f);
  1717. style.Colors[ImGuiCol_Column] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
  1718. style.Colors[ImGuiCol_ColumnHovered] = ImVec4(0.70f, 0.60f, 0.60f, 1.00f);
  1719. style.Colors[ImGuiCol_ColumnActive] = ImVec4(0.90f, 0.70f, 0.70f, 1.00f);
  1720. style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f);
  1721. style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.60f);
  1722. style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f);
  1723. style.Colors[ImGuiCol_CloseButton] = ImVec4(0.50f, 0.50f, 0.90f, 0.50f);
  1724. style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.70f, 0.70f, 0.90f, 0.60f);
  1725. style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.70f, 0.70f, 0.70f, 1.00f);
  1726. style.Colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
  1727. style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
  1728. style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
  1729. style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
  1730. style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
  1731. style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
  1732. //style.WindowTitleAlign = ImVec2(0.5f, 0.5f);
  1733. style.WindowTitleAlign = ImGuiAlign_Center;
  1734.  
  1735. }
  1736.  
  1737. //stuff
  1738.  
  1739. void toggleSAMPCursor(int iToggle)
  1740. {
  1741. void *obj = *(void **)((DWORD)samp + 0x21A10C);
  1742. ((void(__thiscall *) (void *, int, bool)) ((DWORD)samp + 0x9BD30))(obj, iToggle ? 3 : 0, !iToggle);
  1743. if (!iToggle)
  1744. ((void(__thiscall *) (void *)) ((DWORD)samp + 0x9BC10))(obj);
  1745. }
  1746.  
  1747. void toggleChat(int toggle)
  1748. {
  1749. int togchattrue = 0xC3;
  1750. int togchatfalse = 2347862870;
  1751. everything();
  1752.  
  1753. if (toggle == 1)
  1754. {
  1755. WriteProcessMemory(handle, (LPVOID)((DWORD)samp + 0x64230), &togchattrue, sizeof(togchattrue), 0);
  1756. }
  1757. else
  1758. {
  1759. WriteProcessMemory(handle, (LPVOID)((DWORD)samp + 0x64230), &togchatfalse, sizeof(togchatfalse), 0);
  1760. }
  1761. }
  1762.  
  1763. void Shutdown()
  1764. {
  1765. void** vTableDevice = *(void***)(*(DWORD*)DEVICE_PTR);
  1766. VTableHookManager* vmtHooks = new VTableHookManager(vTableDevice, D3D_VFUNCTIONS);
  1767. vmtHooks->Unhook(ENDSCENE_INDEX);
  1768. menuOpen = false;
  1769. toggleSAMPCursor(0);
  1770. toggleChat(0);
  1771. close = 1;
  1772. wall = false;
  1773. c_infRun = false;
  1774. ioxygen = false;
  1775. fake_kick = false;
  1776. watercarvar = false;
  1777. megajumpvar = false;
  1778. mousefixvar = false;
  1779. thermalvisionvar = false;
  1780. aimbotvar = false;
  1781. rotationvar = false;
  1782. infammovar = false;
  1783. fpsunlockvar = false;
  1784. c_GodMode = false;
  1785. c_aimbot = false;
  1786. Trigger = false;
  1787. tp = false;
  1788. c_bjump = false;
  1789. c_cnormal = false;
  1790. wall = false;
  1791. c_norecoil = false;
  1792. atentat1 = false;
  1793. normalaim = false;
  1794. nitrocar = false;
  1795. tankmodecar = false;
  1796. weather = false;
  1797. taim = false;
  1798. bAntiStun = false;
  1799. checkpoint = false;
  1800. spawnme = false;
  1801. RainbowHud = false;
  1802. culoare_pusa = false;
  1803. fake_ping = false;
  1804. rainbowmenu = false;
  1805. teleportmap = false;
  1806. teleportcp = false;
  1807. upside = false;
  1808. }
  1809.  
  1810. SAMPFramework *pSAMP;
  1811. CD3DHook *pD3DHook;
  1812.  
  1813.  
  1814. void RenderGUI()
  1815. {
  1816. static float f = 0.0f;
  1817. ImGuiWindowFlags window_flags = 0;
  1818. window_flags |= ImGuiWindowFlags_NoResize;
  1819. window_flags |= ImGuiWindowFlags_NoCollapse;
  1820. window_flags |= ImGuiWindowFlags_MenuBar;
  1821. ImGuiWindowFlags window_flags_about = 0;
  1822. window_flags_about |= ImGuiWindowFlags_NoResize;
  1823. window_flags_about |= ImGuiWindowFlags_NoCollapse;
  1824. window_flags_about |= ImGuiWindowFlags_NoMove;
  1825. ImGui::SetNextWindowSize(ImVec2(700.f, 450.f));
  1826.  
  1827. if (!ImGui::Begin("RedEye v2.0", p_open = NULL, window_flags))
  1828. {
  1829. ImGui::End();
  1830. return;
  1831. }
  1832. if (ImGui::BeginMenuBar())
  1833. {
  1834. ImGui::SetNextWindowSize(ImVec2(140.f, 60.f));
  1835. if (ImGui::BeginMenu("Panic"))
  1836. {
  1837. if (ImGui::Button("Close ASI", ImVec2(125.f, 20.f)))
  1838. {
  1839. ImGui::OpenPopup("Close ASI");
  1840. }
  1841. if (ImGui::BeginPopupModal("Close ASI", p_open = NULL, window_flags_about))
  1842. {
  1843. ImGui::SetWindowSize(ImVec2(293.f, 80.f));
  1844. ImGui::Text("Esti sigur ca doresti sa inchizi ASI-ul?");
  1845. if (ImGui::Button("DA", ImVec2(135.f, 20.f)))
  1846. {
  1847. Shutdown();
  1848. }
  1849. ImGui::SameLine();
  1850. if (ImGui::Button("NU", ImVec2(135.f, 20.f)))
  1851. {
  1852. ImGui::CloseCurrentPopup();
  1853. }
  1854. ImGui::EndPopup();
  1855. }
  1856. if (ImGui::Button("Close Game", ImVec2(125.f, 20.f)))
  1857. {
  1858. ImGui::OpenPopup("Close Game");
  1859. }
  1860. if (ImGui::BeginPopupModal("Close Game", p_open = NULL, window_flags_about))
  1861. {
  1862. ImGui::SetWindowSize(ImVec2(290.f, 80.f));
  1863. ImGui::Text("Esti sigur ca doresti sa inchizi jocul?");
  1864. if (ImGui::Button("DA", ImVec2(134.f, 20.f)))
  1865. {
  1866. TerminateProcess(handle, 1);
  1867. CloseHandle(handle);
  1868. }
  1869. ImGui::SameLine();
  1870. if (ImGui::Button("NU", ImVec2(134.f, 20.f)))
  1871. {
  1872. ImGui::CloseCurrentPopup();
  1873. }
  1874. ImGui::EndPopup();
  1875. }
  1876. ImGui::EndMenu();
  1877. }
  1878. if (ImGui::BeginMenu("Settings"))
  1879. {
  1880. if (ImGui::Button("Disable All", ImVec2(125.f, 20.f)))
  1881. {
  1882. wall = false;
  1883. c_infRun = false;
  1884. ioxygen = false;
  1885. watercarvar = false;
  1886. megajumpvar = false;
  1887. mousefixvar = false;
  1888. thermalvisionvar = false;
  1889. aimbotvar = false;
  1890. rotationvar = false;
  1891. infammovar = false;
  1892. fpsunlockvar = false;
  1893. c_GodMode = false;
  1894. fake_kick = false;
  1895. c_aimbot = false;
  1896. tp = false;
  1897. Trigger = false;
  1898. c_bjump = false;
  1899. wall = false;
  1900. c_norecoil = false;
  1901. atentat1 = false;
  1902. normalaim = false;
  1903. nitrocar = false;
  1904. tankmodecar = false;
  1905. weather = false;
  1906. taim = false;
  1907. bAntiStun = false;
  1908. checkpoint = false;
  1909. spawnme = false;
  1910. RainbowHud = false;
  1911. culoare_pusa = false;
  1912. fake_ping = false;
  1913. rainbowmenu = false;
  1914. teleportmap = false;
  1915. teleportcp = false;
  1916. upside = false;
  1917. }
  1918. const char* items[] = { "Insert", "Home", "Delete","End" };
  1919. ImGui::PushItemWidth(125.f);
  1920. ImGui::Combo("##2000", &startmenu, items, 4);
  1921. if (startmenu == 0)
  1922. {
  1923. key = VK_INSERT;
  1924. }
  1925. if (startmenu == 1)
  1926. {
  1927. key = VK_HOME;
  1928. }
  1929. if (startmenu == 2)
  1930. {
  1931. key = VK_DELETE;
  1932. }
  1933. if (startmenu == 3)
  1934. {
  1935. key = VK_END;
  1936. }
  1937. ImGui::EndMenu();
  1938. }
  1939. if (ImGui::BeginMenu("More"))
  1940. {
  1941. if (ImGui::Button("About", ImVec2(125.f, 20.f)))
  1942. ImGui::OpenPopup("About");
  1943. if (ImGui::BeginPopupModal("About", p_open = NULL, window_flags_about))
  1944. {
  1945. ImGui::Text("Developer: Ryon.SiLENT");
  1946. ImGui::Separator();
  1947. ImGui::Text("Contribuitori:");
  1948. ImGui::Text("NULL");
  1949. ImGui::Separator();
  1950. ImGui::Text("Special Thanks:");
  1951. ImGui::Text("Dark");
  1952. ImGui::Text("Vali aka Nilmer");
  1953. ImGui::Text("Serban1337");
  1954. ImGui::Separator();
  1955. if (ImGui::Button("Close", ImVec2(200.f, 20.f)))
  1956. {
  1957. ImGui::CloseCurrentPopup();
  1958. }
  1959. ImGui::EndPopup();
  1960. }
  1961.  
  1962. ImGui::PushItemWidth(125.f);
  1963. const char* items[] = { "RedEye Theme"};
  1964. ImGui::Combo("##1000", &item, items, 1);
  1965. if (item == 0)
  1966. {
  1967. Pleata();
  1968. }
  1969. ImGui::EndMenu();
  1970. }
  1971. ImGui::EndMenuBar();
  1972. }
  1973. ImGui::BeginChild(1, ImVec2(100, 400));
  1974. if (ImGui::Button("Weapon", ImVec2(100, 50)))
  1975. {
  1976. tabb = 1;
  1977. }
  1978. if (ImGui::Button("Visual", ImVec2(100, 50)))
  1979. {
  1980. tabb = 2;
  1981. }
  1982. if (ImGui::Button("Player", ImVec2(100, 50)))
  1983. {
  1984. tabb = 3;
  1985. }
  1986. if (ImGui::Button("Car", ImVec2(100, 50)))
  1987. {
  1988. tabb = 4;
  1989. }
  1990. if (ImGui::Button("Developer", ImVec2(100, 50)))
  1991. {
  1992. tabb = 5;
  1993. }
  1994. if (ImGui::Button("Rainbow", ImVec2(100, 50)))
  1995. {
  1996. tabb = 6;
  1997. }
  1998. if (ImGui::Button("Other", ImVec2(100, 50)))
  1999. {
  2000. tabb = 7;
  2001. }
  2002. ImGui::EndChild();
  2003. ImGui::SameLine();
  2004. ImGui::BeginChild(2, ImVec2(600, 266));
  2005. switch (tabb)
  2006. {
  2007. case 1:
  2008. {
  2009. ImGui::Checkbox("Aimbot", &c_aimbot);
  2010. ImGui::Checkbox("Aimbot V2", &normalaim);
  2011. ImGui::Checkbox("Trigger Bot", &Trigger);
  2012. ImGui::Checkbox("No Recoil", &c_norecoil);
  2013. ImGui::Checkbox("Infinite Ammo / No-Reload", &infammovar);
  2014. break;
  2015. }
  2016. case 2:
  2017. {
  2018. ImGui::Checkbox("Wallhack", &wall);
  2019. ImGui::PushItemWidth(200.f);
  2020. ImGui::SameLine();
  2021. ImGui::SliderInt("##5231", &whsize, 0, 100, ("Range"));
  2022. ImGui::Separator();
  2023. ImGui::Checkbox("Time", &taim); ImGui::SameLine(); ImGui::SliderInt("##1", &timeset, 0, 24, "TIME");
  2024. ImGui::Checkbox("Weather", &weather); ImGui::SameLine(); ImGui::SliderInt("##500", &weatherset, 0, 10, "WEATHER");
  2025. ImGui::Separator();
  2026. ImGui::Checkbox("Thermal Vision", &thermalvisionvar);
  2027. break;
  2028. }
  2029. case 3:
  2030. {
  2031. ImGui::Checkbox("Infinite Run", &c_infRun);
  2032. ImGui::Checkbox("Mega Jump", &megajumpvar);
  2033. ImGui::Checkbox("Fast Rotation", &rotationvar);
  2034. ImGui::Checkbox("Infinite Oxygen", &ioxygen);
  2035. ImGui::Checkbox("GodMode (UGBASE.EU)", &c_GodMode);
  2036. ImGui::Checkbox("Anti Stun", &bAntiStun);
  2037. ImGui::Checkbox("Teleport Map (F10)", &teleportmap);
  2038. ImGui::Checkbox("Teleport CP (F11)", &teleportcp);
  2039. ImGui::Checkbox("Upside", &upside);
  2040. break;
  2041. }
  2042. case 4:
  2043. {
  2044. ImGui::Checkbox("Tank Mode Car", &tankmodecar);
  2045. ImGui::Checkbox("Nitro Car", &nitrocar);
  2046. ImGui::Checkbox("WaterCar", &watercarvar);
  2047. ImGui::Checkbox("Mega Jump Bike", &c_bjump);
  2048. break;
  2049. }
  2050. case 5:
  2051. {
  2052. ImGui::Checkbox("Atentat", &atentat1);
  2053. ImGui::Separator();
  2054. ImGui::InputText("Mesajul pentru spam", cheat_spammer_text, sizeof(cheat_spammer_text));
  2055. ImGui::InputInt("Delay (in ms)", &cheat_spammer_delay);
  2056.  
  2057. if (cheat_enable_spammer)
  2058. {
  2059. if (ImGui::Button("Stop")) cheat_enable_spammer = false;
  2060. }
  2061. else
  2062. {
  2063. if (ImGui::Button("Start")) cheat_enable_spammer = true;
  2064. }
  2065. ImGui::Separator();
  2066. ImGui::InputText("Local Nickname Changer", namechanger, sizeof(namechanger));
  2067. if (ImGui::Button("CHANGE !")) namech = true;
  2068. if (ImGui::Button("LCN STOP !")) namech = false;
  2069. ImGui::Separator();
  2070. ImGui::Checkbox("Fake Ping", &fake_ping); ImGui::SameLine(); ImGui::SliderInt("##9234", &setfakeping, 500, 1000, "%.0f");
  2071. //ImGui::Checkbox("Spammer", &spammer);
  2072. //ImGui::Checkbox("Teleport CP (F9 / F10)", &checkpoint);
  2073. break;
  2074. }
  2075. case 6:
  2076. {
  2077. ImGui::Checkbox("Rainbow Hud", &RainbowHud);
  2078. ImGui::Checkbox("Rainbow Car", &culoare_pusa);
  2079. ImGui::Checkbox("Rainbow Menu", &rainbowmenu);
  2080. ImGui::PushItemWidth(230.0f);
  2081. ImGui::SliderInt("Speed", &rrspeed, 0, 100, "%.0f%%");
  2082. break;
  2083. }
  2084. case 7:
  2085. {
  2086.  
  2087. ImGui::Checkbox("Fake Kick", &fake_kick);
  2088. ImGui::Checkbox("Mousefix", &mousefixvar);
  2089. ImGui::Checkbox("FPS Unlocker", &fpsunlockvar);
  2090. ImGui::PushItemWidth(65.0f);
  2091. if (ImGui::Button("Auto Spawn ##5345"))
  2092. {
  2093. if (pSAMP == NULL)
  2094. return;
  2095.  
  2096. ((void(__thiscall *) (void *_this)) (g_dwSAMP_Addr + 0x3EC0)) (pSAMP->getPlayers()->pLocalPlayer);
  2097. ((void(__thiscall *) (void *_this)) (g_dwSAMP_Addr + 0x3AD0)) (pSAMP->getPlayers()->pLocalPlayer);
  2098. }
  2099. if (ImGui::Button("Fake Death"))
  2100. {
  2101. if (pSAMP == NULL)
  2102. return;
  2103. ((void(__thiscall *) (void *)) (g_dwSAMP_Addr + 0x55E0))
  2104. (pSAMP->getPlayers()->pLocalPlayer);
  2105. }
  2106. }
  2107. default:
  2108. break;
  2109. }
  2110. ImGui::EndChild();
  2111. ImGui::End();
  2112. }
  2113.  
  2114.  
  2115.  
  2116. void mainThread(void *pvParams)
  2117. {
  2118.  
  2119. }
  2120.  
  2121. void functions()
  2122. {
  2123. //
  2124. }
  2125.  
  2126.  
  2127. HRESULT __stdcall Hooked_Present(IDirect3DDevice9 *pDevice, CONST RECT *pSrcRect, CONST RECT *pDestRect, HWND hDestWindow, CONST RGNDATA *pDirtyRegion)
  2128. {
  2129. static float rainbow_color_redus; //speed
  2130. rainbow_color_redus += misc_RainbowSpeed = 0.0001 * rrspeed;
  2131. if (rainbow_color_redus > 1.f) rainbow_color_redus = 0.f;
  2132. DWORD rainbow_color_x = Color2::ToImColor(Color2::FromHSB(rainbow_color_redus, 1.f, 1.f));
  2133. ImVec4 mainColorActive = Color2::ToImColor(Color2::FromHSB(rainbow_color_redus, 1.f, 1.f));
  2134.  
  2135. if (RainbowHud)
  2136. {
  2137. *(DWORD*)(0xBAB22C) = rainbow_color_x;
  2138. *(DWORD*)(0xBAB230) = rainbow_color_x;
  2139. *(DWORD*)(0xBAB234) = rainbow_color_x;
  2140. *(DWORD*)(0xBAB238) = rainbow_color_x;
  2141. *(DWORD*)(0xBAB23C) = rainbow_color_x;
  2142. *(DWORD*)(0xBAB260) = rainbow_color_x;
  2143. *(DWORD*)(0xBAB240) = rainbow_color_x;
  2144. *(DWORD*)(0xBAB244) = rainbow_color_x;
  2145. *(DWORD*)(0xBAB248) = rainbow_color_x;
  2146. *(DWORD*)(0xBAB24C) = rainbow_color_x;
  2147. *(DWORD*)(0xBAB250) = rainbow_color_x;
  2148. *(DWORD*)(0xBAB254) = rainbow_color_x;
  2149. *(DWORD*)(0xBAB258) = rainbow_color_x;
  2150. *(DWORD*)(0xBAB25C) = rainbow_color_x;
  2151. *(DWORD*)(0xBAB260) = rainbow_color_x;
  2152. //fist
  2153. *(BYTE*)(0x58D973 + 1) = (BYTE)round(mainColorActive.x * 255.f);
  2154. *(BYTE*)(0x58D96E + 1) = (BYTE)round(mainColorActive.y * 255.f);
  2155. *(BYTE*)(0x58D969 + 1) = (BYTE)round(mainColorActive.z * 255.f);
  2156.  
  2157. *(BYTE*)(0x58D8AF + 1) = (BYTE)round(mainColorActive.x * 255.f);
  2158. *(BYTE*)(0x58D8AA + 1) = (BYTE)round(mainColorActive.y * 255.f);
  2159. *(BYTE*)(0x58D89F + 1) = (BYTE)round(mainColorActive.z * 255.f);
  2160. for (int i = 0; i < SAMP_MAX_TEXTDRAWS; i++)
  2161. {
  2162. if (pSAMP->getInfo()->pPools->pTextdraw->textdraw[i] == nullptr)
  2163. continue;
  2164. pSAMP->getInfo()->pPools->pTextdraw->textdraw[i]->dwLetterColor = rainbow_color_x;
  2165. // pSAMP->getInfo()->pPools->pTextdraw->textdraw[i]->dwBoxColor = rainbow_color_x;
  2166. }
  2167.  
  2168. for (int i = 0; i < SAMP_MAX_PLAYERTEXTDRAWS; i++) {
  2169. if (pSAMP->getInfo()->pPools->pTextdraw->playerTextdraw[i] == nullptr)
  2170. continue;
  2171. pSAMP->getInfo()->pPools->pTextdraw->playerTextdraw[i]->dwLetterColor = rainbow_color_x;
  2172. // pSAMP->getInfo()->pPools->pTextdraw->playerTextdraw[i]->dwBoxColor = rainbow_color_x;
  2173. }
  2174. }
  2175.  
  2176. if (culoare_pusa)
  2177. {
  2178. if (pSAMP->getPlayers()->pLocalPlayer->sCurrentVehicleID)
  2179. {
  2180. if (*(DWORD*)0xBA18FC > 0)
  2181. {
  2182. {
  2183. *(byte*)(*(DWORD*)0xBA18FC + 1076) = 255;
  2184. *(byte*)(*(DWORD*)0xBA18FC + 1077) = 255;
  2185. *(byte*)(*(DWORD*)0xBA18FC + 1078) = 255;
  2186. *(byte*)(*(DWORD*)0xBA18FC + 1079) = 255;
  2187. }
  2188. if (culoare_pusa == true)
  2189. {
  2190. *(DWORD*)((g_dwSAMP_Addr + 0x215AC8) + 4 * 255) = rainbow_color_x;
  2191. }
  2192. }
  2193.  
  2194. }
  2195. }
  2196.  
  2197. if (rainbowmenu)
  2198. {
  2199. ImGuiStyle& style = ImGui::GetStyle();
  2200. style.Colors[ImGuiCol_Text] = ImVec4(0.90f, 0.90f, 0.90f, 1.00f);
  2201. style.Colors[ImGuiCol_TextDisabled] = ImVec4(0.60f, 0.60f, 0.60f, 1.00f);
  2202. style.Colors[ImGuiCol_WindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.70f);
  2203. style.Colors[ImGuiCol_ChildWindowBg] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
  2204. style.Colors[ImGuiCol_PopupBg] = ImVec4(0.05f, 0.05f, 0.10f, 0.90f);
  2205. style.Colors[ImGuiCol_Border] = mainColorActive;
  2206. style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
  2207. style.Colors[ImGuiCol_FrameBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.30f);
  2208. style.Colors[ImGuiCol_FrameBgHovered] = ImVec4(0.90f, 0.80f, 0.80f, 0.40f);
  2209. style.Colors[ImGuiCol_FrameBgActive] = ImVec4(0.90f, 0.65f, 0.65f, 0.45f);
  2210. style.Colors[ImGuiCol_TitleBg] = mainColorActive;
  2211. style.Colors[ImGuiCol_TitleBgCollapsed] = mainColorActive;
  2212. style.Colors[ImGuiCol_TitleBgActive] = mainColorActive;
  2213. style.Colors[ImGuiCol_MenuBarBg] = mainColorActive;
  2214. style.Colors[ImGuiCol_ScrollbarBg] = ImVec4(0.20f, 0.25f, 0.30f, 0.60f);
  2215. style.Colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.51f, 0.00f, 0.00f, 0.78f);
  2216. style.Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.84f, 0.01f, 0.01f, 0.59f);
  2217. style.Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(1.00f, 0.00f, 0.00f, 1.00f);
  2218. style.Colors[ImGuiCol_ComboBg] = mainColorActive;
  2219. style.Colors[ImGuiCol_CheckMark] = mainColorActive;
  2220. style.Colors[ImGuiCol_SliderGrab] = mainColorActive;
  2221. style.Colors[ImGuiCol_SliderGrabActive] = mainColorActive;
  2222. style.Colors[ImGuiCol_Button] = mainColorActive;
  2223. style.Colors[ImGuiCol_ButtonHovered] = mainColorActive;
  2224. style.Colors[ImGuiCol_ButtonActive] = mainColorActive;;
  2225. style.Colors[ImGuiCol_Header] = mainColorActive;
  2226. style.Colors[ImGuiCol_HeaderHovered] = mainColorActive;
  2227. style.Colors[ImGuiCol_HeaderActive] = mainColorActive;
  2228. style.Colors[ImGuiCol_Column] = ImVec4(0.50f, 0.50f, 0.50f, 1.00f);
  2229. style.Colors[ImGuiCol_ColumnHovered] = ImVec4(0.70f, 0.60f, 0.60f, 1.00f);
  2230. style.Colors[ImGuiCol_ColumnActive] = ImVec4(0.90f, 0.70f, 0.70f, 1.00f);
  2231. style.Colors[ImGuiCol_ResizeGrip] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f);
  2232. style.Colors[ImGuiCol_ResizeGripHovered] = ImVec4(1.00f, 1.00f, 1.00f, 0.60f);
  2233. style.Colors[ImGuiCol_ResizeGripActive] = ImVec4(1.00f, 1.00f, 1.00f, 0.90f);
  2234. style.Colors[ImGuiCol_CloseButton] = ImVec4(0.50f, 0.50f, 0.90f, 0.50f);
  2235. style.Colors[ImGuiCol_CloseButtonHovered] = ImVec4(0.70f, 0.70f, 0.90f, 0.60f);
  2236. style.Colors[ImGuiCol_CloseButtonActive] = ImVec4(0.70f, 0.70f, 0.70f, 1.00f);
  2237. style.Colors[ImGuiCol_PlotLines] = ImVec4(1.00f, 1.00f, 1.00f, 1.00f);
  2238. style.Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
  2239. style.Colors[ImGuiCol_PlotHistogram] = ImVec4(0.90f, 0.70f, 0.00f, 1.00f);
  2240. style.Colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f);
  2241. style.Colors[ImGuiCol_TextSelectedBg] = ImVec4(0.00f, 0.00f, 1.00f, 0.35f);
  2242. style.Colors[ImGuiCol_ModalWindowDarkening] = ImVec4(0.20f, 0.20f, 0.20f, 0.35f);
  2243. //style.WindowTitleAlign = ImVec2(0.5f, 0.5f);
  2244. style.WindowTitleAlign = ImGuiAlign_Center;
  2245. defaulttheme = false;
  2246. }
  2247.  
  2248. if (rainbowmenu == false)
  2249. {
  2250. Pleata();
  2251. defaulttheme = true;
  2252. }
  2253.  
  2254. if (!pDevice)
  2255. return pD3DHook->Orginal_Present(pDevice, pSrcRect, pDestRect, hDestWindow, pDirtyRegion);
  2256.  
  2257. if (pD3DHook->bD3DRenderInit == false)
  2258. {
  2259. pD3DHook->pRender->Initialize(pDevice);
  2260. pD3DHook->pD3DFont->Initialize(pDevice);
  2261.  
  2262. pD3DHook->bD3DRenderInit = true;
  2263. }
  2264.  
  2265. if (!pSAMP->isInited)
  2266. pD3DHook->pD3DFont->Print(1, 1, D3DCOLOR_ARGB(255, rand() % 255, rand() % 255, rand() % 255), "", true);
  2267.  
  2268. return pD3DHook->Orginal_Present(pDevice, pSrcRect, pDestRect, hDestWindow, pDirtyRegion);
  2269. }
  2270.  
  2271. LRESULT CALLBACK hWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
  2272. {
  2273. if (ImGui_ImplDX9_WndProcHandler(hwnd, uMsg, wParam, lParam) && GetKeyState(key) == 1 && menuOpen && wndproc)
  2274. {
  2275. return 1l;
  2276. }
  2277.  
  2278. return CallWindowProc(oriWndProc, hwnd, uMsg, wParam, lParam);
  2279. }
  2280.  
  2281. HRESULT __stdcall hkReset(IDirect3DDevice9* pDevice, D3DPRESENT_PARAMETERS* pp)
  2282. {
  2283. if (g_bwasInitialized)
  2284. {
  2285. ImGui_ImplDX9_InvalidateDeviceObjects();
  2286. g_bwasInitialized = false;
  2287. }
  2288. return oReset(pDevice, pp);
  2289. }
  2290.  
  2291. HRESULT __stdcall hkEndScene(IDirect3DDevice9* pDevice)
  2292. {
  2293.  
  2294. if (defaulttheme)
  2295. {
  2296. Pleata();
  2297. }
  2298.  
  2299. if (taim)
  2300. {
  2301. *(DWORD*)(0xB70153) = timeset;
  2302. }
  2303. if (!taim)
  2304. {
  2305. *(DWORD*)(0xB70153) = 12;
  2306. }
  2307. if (weather)
  2308. {
  2309. *(DWORD*)(0xC81320) = weatherset;
  2310. }
  2311. if (!weather)
  2312. {
  2313. *(DWORD*)(0xC81320) = 12;
  2314. }
  2315.  
  2316. if (!g_bwasInitialized)
  2317. {
  2318. ImGuiIO& io = ImGui::GetIO();
  2319. ImGuiStyle& style = ImGui::GetStyle();
  2320. io.IniFilename = NULL;
  2321. io.DeltaTime = 1.0f / 60.0f;
  2322. ImFont* pFont = io.Fonts->AddFontFromFileTTF("C:\\Windows\\Fonts\\arialbd.ttf", 13);
  2323. D3DDEVICE_CREATION_PARAMETERS d3dcp;
  2324. pDevice->GetCreationParameters(&d3dcp);
  2325. hWnd = d3dcp.hFocusWindow;
  2326. io.Fonts->AddFontDefault();
  2327. style.AntiAliasedLines = false;
  2328. style.AntiAliasedShapes = false;
  2329. if (hwndd == 0)
  2330. {
  2331. oriWndProc = (WNDPROC)SetWindowLongPtr(d3dcp.hFocusWindow,
  2332. GWL_WNDPROC, (LONG)(LONG_PTR)hWndProc);
  2333. hwndd++;
  2334. }
  2335. ImGui_ImplDX9_Init(d3dcp.hFocusWindow, pDevice);
  2336. g_bwasInitialized = true;
  2337. }
  2338. if (startmenu == 0)
  2339. {
  2340. key = VK_INSERT;
  2341. }
  2342. if (startmenu == 1)
  2343. {
  2344. key = VK_HOME;
  2345. }
  2346. if (startmenu == 2)
  2347. {
  2348. key = VK_DELETE;
  2349. }
  2350. if (startmenu == 3)
  2351. {
  2352. key = VK_END;
  2353. }
  2354. ImGui_ImplDX9_NewFrame();
  2355. if (menuOpen)
  2356. {
  2357. toggleSAMPCursor(1);
  2358. toggleChat(1);
  2359. RenderGUI();
  2360. }
  2361. else
  2362. {
  2363. if (startstop == 0)
  2364. {
  2365. toggleSAMPCursor(0);
  2366. toggleChat(0);
  2367. startstop++;
  2368. }
  2369. }
  2370. ImGui::Render();
  2371. return oEndScene(pDevice);
  2372. }
  2373. DWORD APIENTRY MainThread(LPVOID lparam)
  2374. {
  2375. if (pSAMP)
  2376. {
  2377. while (g_dwSAMP_Addr == NULL)
  2378. {
  2379. g_dwSAMP_Addr = (DWORD)GetModuleHandle("samp.dll");
  2380. sleep(250);
  2381. }
  2382.  
  2383. while (!g_Chat)
  2384. {
  2385. g_Chat = *(DWORD**)(g_dwSAMP_Addr + SAMP_CHAT_INFO_OFFSET);
  2386. sleep(25);
  2387. }
  2388.  
  2389. while (!pSAMP->tryInit())
  2390. Sleep(100);
  2391. }
  2392.  
  2393. void** vTableDevice = *(void***)(*(DWORD*)DEVICE_PTR);
  2394. VTableHookManager* vmtHooks = new VTableHookManager(vTableDevice, D3D_VFUNCTIONS);
  2395.  
  2396. oEndScene = (_EndScene)vmtHooks->Hook(ENDSCENE_INDEX, (void*)hkEndScene);
  2397. oReset = (_Reset)vmtHooks->Hook(RESET_INDEX, (void*)hkReset);
  2398.  
  2399. everything();
  2400. while (true)
  2401. {
  2402. if (GetAsyncKeyState(key) & 1)
  2403. {
  2404. menuOpen = !menuOpen;
  2405. startstop = 0;
  2406. }
  2407. if (close == 1)
  2408. {
  2409. return 0;
  2410. }
  2411. Functions();
  2412. Fakekick();
  2413. MouseFix();
  2414. }
  2415. }
  2416.  
  2417. BOOL APIENTRY DllMain(HMODULE hModule,
  2418. DWORD ul_reason_for_call,
  2419. LPVOID lpReserved
  2420. )
  2421.  
  2422. {
  2423. switch (ul_reason_for_call)
  2424. {
  2425. case DLL_PROCESS_ATTACH:
  2426. //HWID VERIFY
  2427. GetVolumeInformation(szHD, (LPTSTR)szVolNameBuff, 255, &dwSerial, &dwMFL, &dwSysFlags, (LPTSTR)szFileSys, 255);
  2428.  
  2429. if (dwSerial == ExampleHWID)
  2430. {
  2431. Sleep(100);
  2432. }
  2433. else
  2434. {
  2435. // when HWID rejected
  2436. MessageBox(NULL, "N-ai HWID-ul acceptat!", "HWID VERIFY", MB_OK);
  2437. exit(0);
  2438. return TRUE;
  2439. }
  2440. //HWID VERIFY
  2441. CreateThread(0, 0, MainThread, hModule, 0, 0);
  2442.  
  2443. pSAMP = new SAMPFramework(GetModuleHandle("samp.dll"));
  2444. _beginthread(mainThread, NULL, NULL);
  2445. pD3DHook = new CD3DHook();
  2446. break;
  2447. break;
  2448. case DLL_THREAD_ATTACH:
  2449. case DLL_THREAD_DETACH:
  2450. case DLL_PROCESS_DETACH:
  2451. break;
  2452. }
  2453. return TRUE;
  2454. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement