TheRouletteBoi

More Code (GTAV)

Feb 4th, 2016 (edited)
15,881
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 165.86 KB | None | 0 0
  1. //static BOOL GET_PED_LAST_WEAPON_IMPACT_COORD(Ped ped, Vector3* coords) { return invoke<BOOL>(0x9B266079, ped, coords); } // 0x9B266079
  2.  
  3.  
  4. static BOOL(*GET_PED_LAST_WEAPON_IMPACT_COORD)(Ped ped, int coordsfreeMem) = (BOOL(*)(Ped, int))&__GET_PED_LAST_WEAPON_IMPACT_COORD_t;
  5.  
  6. static BOOL GET_PED_LAST_WEAPON_IMPACT_COORD_MODIFYED(Ped ped, float coords[4]) {
  7. Vector3 in;
  8. ResetArgs();
  9. PushArg(ped);
  10. PushArg(&in);
  11. CallHash(0x9B266079, NativeArg);
  12. return GetResult<BOOL>();
  13. std::copy(GetDataResult<float*>(0), GetDataResult<float*>(0) + 4, coords);
  14. } // 0x9B266079
  15.  
  16. template <typename R>
  17. R GetDataResult(uint8_t index)
  18. {
  19. R* Result;
  20. Result = (R*)NativeArg + 0x10 * (index + 4); //0x10030000
  21. return *(R*)Result;
  22. }
  23.  
  24. static BOOL GET_PED_LAST_WEAPON_IMPACT_COORD_MODIFYED(Ped ped, Vector3 &coords) {
  25. float tmp[100]; ResetArgs(); PushArg(ped); PushArg(0x10030000);
  26. for (int i = 0; i < 3; i++)
  27. tmp[i] = *(float*)(0x10030000 + (i * 0x04));
  28. Vector3 vOut = FloatToVector(tmp[0], tmp[1], tmp[2]);
  29. coords = vOut;
  30. CallHash(0x9B266079, NativeArg);
  31. return GetResult<BOOL>();
  32.  
  33. } // 0x9B266079
  34.  
  35. static BOOL(*GET_PED_LAST_WEAPON_IMPACT_COORD)(Ped ped, int coordsfreeMem) = (BOOL(*)(Ped, int))&__GET_PED_LAST_WEAPON_IMPACT_COORD_t;
  36.  
  37.  
  38. int hitsomething = 0, entityHandle = 0; Vector3 endCoords, surfaceNormal;
  39. int getRaycastHandle(int type)
  40. {
  41. /*Vector3 camrot = GET_GAMEPLAY_CAM_ROT(2);
  42. Vector3 campos = GET_GAMEPLAY_CAM_COORD();
  43. Vector3 selfvec = GET_ENTITY_FORWARD_VECTOR(PLAYER_PED_ID());
  44. Vector3 multiplied = { RotationToDirection(camrot).x * 1000.0f, RotationToDirection(camrot).y * 1000.0f, RotationToDirection(camrot).z * 1000.0f };
  45. int ray = _CAST_RAY_POINT_TO_POINT(campos.x + selfvec.x, campos.y + selfvec.y, campos.z + selfvec.z, campos.x + multiplied.x * 5000, campos.y + multiplied.y * 5000, campos.z + multiplied.z * 5000, type, 0, 7);
  46. return ray;*/
  47. Vector3 camPos = GET_GAMEPLAY_CAM_COORD();
  48. Vector3 camRot = GET_GAMEPLAY_CAM_ROT(2);
  49. float retz = camRot.z * 0.0174532924F;
  50. float retx = camRot.x * 0.0174532924F;
  51. float absx = ABSF(COS(retx));
  52. Vector3 camStuff = { SIN(retz) * absx * -1, COS(retz) * absx, SIN(retx) };
  53. return _CAST_RAY_POINT_TO_POINT(camPos.x, camPos.y, camPos.z, camPos.x + camStuff.x * 1000, camPos.y + camStuff.y * 1000, camPos.z + camStuff.z * 1000, type, 0, 7);
  54. }
  55.  
  56. unsigned int *getGlobalPtr(int globalId)
  57. {
  58. unsigned int **arr = (unsigned int **)(0x1E70370);
  59. return &arr[(globalId >> 18) & 0x3F][globalId & 0x3FFFF];
  60.  
  61. //return (unsigned int *)(*(DWORD *)(0x000000 + 8i64 * ((globalId >> 18) & 0x3F) + moduleHandle) //reversed
  62. // + 8i64 * (globalId & 0x3FFFF));
  63. }
  64.  
  65.  
  66. //SetGlobal(1325955, 1662, 1337);
  67.  
  68. *getGlobalPtr(OFF_THE_RADAR_TIME) = 1337; //DEADC0DE time
  69.  
  70. //262145 wanted lvl
  71. //SetGlobal(2394218, 55, GET_NETWORK_TIME());
  72.  
  73. //SetGlobal(2387908, 169, 1);
  74. //SetGlobal(2387908 + 223, 169, 1);
  75. //SetGlobal(2387908[PLAYER_ID() * 223], 169, 1);
  76.  
  77. //SetGlobal(2390201, 171, 1);
  78. //SetGlobal(2390201 + 223, 171, 1);
  79. //SetGlobal2390201[PLAYER_ID() * 223], 171, 1);
  80.  
  81. /*SetGlobal(2387908, 169, 1);
  82.  
  83. SetGlobal(2390201, 171, 1);
  84.  
  85. SetGlobal(2387908 + 223, 169, 1);
  86.  
  87. SetGlobal(2387908 + PLAYER_ID() * 223, 169, 1);
  88.  
  89. SetGlobal(2387908 + PLAYER_ID() + 223, 169, 1);
  90.  
  91. SetGlobal(2387908 + PLAYER_ID(), 169, 1);*/
  92.  
  93.  
  94. void btnOffRadar_Click(object sender, EventArgs e)
  95. {
  96. if (ScriptGlobals.Read(2390201 + (uint)(NativeFuncs.player_id() * 223) + 170) == 0)
  97. {
  98. ScriptGlobals.Write(2390201 + (uint)(NativeFuncs.player_id() * 223) + 170, 1);
  99. ScriptGlobals.Write(2394218 + 55, 2147483647);
  100. }
  101. else
  102. ScriptGlobals.Write(2390201 + (uint)(NativeFuncs.player_id() * 223) + 170, 0);
  103. }
  104.  
  105.  
  106. if (featureTest)
  107. {
  108. Vector3 closestcoords = GET_ENTITY_COORDS(PLAYER_PED_ID(), FALSE);
  109. getNearEntities(PLAYER_PED_ID(), 1, 1, 7, 2, NULL);
  110.  
  111. for (int i = 0; 0 < sizeof(); i++)
  112. {
  113. }
  114. EntitiesNearBy[i] = GET_ENTITY_ATTACHED_TO(PLAYER_PED_ID());
  115. EntitiesNearBy[i] = GET_CLOSEST_VEHICLE(closestcoords.x, closestcoords.y, closestcoords.z, 10.0f, 0, CARS_N_MOTOCYCLES_2);
  116. EntitiesNearBy[i] = GET_RANDOM_PED_AT_COORD(closestcoords.x, closestcoords.y, closestcoords.z, 10.0f, 10.0f, 10.0, -1);
  117. if (DOES_ENTITY_EXIST(EntitiesNearBy[i]))
  118. {
  119. if (!NETWORK_HAS_CONTROL_OF_ENTITY(EntitiesNearBy[i]))
  120. NETWORK_REQUEST_CONTROL_OF_ENTITY(EntitiesNearBy[i]);
  121. else
  122. {
  123. DETACH_ENTITY(EntitiesNearBy[i], 1, 1);
  124. SET_ENTITY_AS_MISSION_ENTITY(EntitiesNearBy[i], 1, 1);
  125. DELETE_ENTITY(&EntitiesNearBy[i]);
  126. }
  127. }
  128.  
  129.  
  130.  
  131. int funcaddr = 0x139ECB0;//0x13321EC;
  132. ((void(*)(int, unsigned int, int, int, int, int, int, int, int))&funcaddr)(0x40022280, 0x1004004C, 1, 0, 0, 0, 0x540, 0x4ec, 0x59);
  133.  
  134.  
  135. GetClosestVehicle
  136. __int64 __fastcall sub_4549C8(__int64 a1, float a2, unsigned int a3, unsigned int a4)
  137. {
  138. signed int v4; // ebx@1
  139. unsigned int v5; // er14@1
  140. __int64 v6; // rdi@1
  141. signed int v7; // ebp@1
  142. float v8; // xmm6_4@1
  143. int v9; // eax@2
  144. unsigned int v10; // xmm1_4@3
  145. unsigned int v11; // xmm2_4@3
  146. float v12; // xmm6_4@3
  147. __int64 v13; // rcx@3
  148. unsigned int v14; // edi@3
  149. __int64 v15; // r9@4
  150. int v16; // eax@5
  151. __int64 v17; // rax@6
  152. __int64 v18; // rsi@9
  153. __m128 v19; // xmm2@12
  154. __m128i v20; // xmm2@12
  155. float v21; // xmm7_4@12
  156. int v22; // eax@13
  157. int v24; // [sp+20h] [bp-58h]@2
  158. __m128 v25; // [sp+30h] [bp-48h]@3
  159. int v26; // [sp+90h] [bp+18h]@1
  160.  
  161. v4 = 0;
  162. v5 = a4;
  163. v6 = a1;
  164. v7 = 0;
  165. v8 = a2;
  166. v26 = (v26 | 0xFFFFFFF) & 0xFFFFFFF;
  167. if ( !a3
  168. || (v24 = 0xFFFF,
  169. sub_14079692C(a3, &v24),
  170. LOWORD(v26) = v24,
  171. v9 = v26 | 0xFFF0000,
  172. _bittestandreset((unsigned int *)&v9, 0x1Cu),
  173. v26 = v9,
  174. (unsigned __int16)v9 != 0xFFFF) )
  175. {
  176. v10 = *(_DWORD *)(v6 + 8);
  177. v11 = *(_DWORD *)(v6 + 16);
  178. v12 = v8 * v8;
  179. v13 = *(_QWORD *)VehiclePool;
  180. v25.m128_i32[0] = *(_DWORD *)v6;
  181. *(unsigned __int64 *)((char *)&v25.m128_u64[0] + 4) = __PAIR__(v11, v10);
  182. v14 = *(_DWORD *)(v13 + 8);
  183. if ( v14 )
  184. {
  185. do
  186. {
  187. --v14;
  188. v15 = *(_QWORD *)VehiclePool;
  189. if ( (signed int)v14 < *(_DWORD *)(*(_QWORD *)VehiclePool + 8i64)
  190. && (v16 = *(_DWORD *)(*(_QWORD *)(v15 + 48) + 4 * ((unsigned __int64)v14 >> 5)),
  191. _bittest((const unsigned int *)&v16, v14 & 0x1F)) )
  192. v17 = *(_QWORD *)v15 + v14 * *(_QWORD *)(v15 + 24);
  193. else
  194. v17 = 0i64;
  195. if ( v17 )
  196. v18 = *(_QWORD *)v17;
  197. else
  198. v18 = 0i64;
  199. if ( v18 )
  200. {
  201. v19 = _mm_sub_ps(*(__m128 *)(v18 + 144), v25);
  202. v20 = (__m128i)_mm_mul_ps(v19, v19);
  203. LODWORD(v21) = (unsigned __int128)_mm_add_ps(
  204. _mm_add_ps(
  205. (__m128)_mm_shuffle_epi32(v20, 0),
  206. (__m128)_mm_shuffle_epi32(v20, 85)),
  207. (__m128)_mm_shuffle_epi32(v20, -86));
  208. if ( v21 < v12 )
  209. {
  210. v22 = sub_140796DD8(&v26);
  211. if ( (unsigned __int8)sub_13FF39C34(v18, (unsigned int)v22, v5) )
  212. {
  213. v7 = sub_13FC7F104(v18);
  214. v12 = v21;
  215. }
  216. }
  217. }
  218. }
  219. while ( v14 );
  220. if ( v7 )
  221. sub_13FC728D0(v7);
  222. }
  223. v4 = v7;
  224. }
  225. return (unsigned int)v4;
  226. }
  227. __int64 __fastcall get_entity_type(int a1)
  228. {
  229. __int64 result; // rax@1
  230. signed int v2; // ecx@1
  231. char v3;
  232.  
  233. result = GetAddressOfEntity(a1);
  234. v2 = 0;
  235. if (result)
  236. {
  237. v3 = *(_BYTE *)(result + 40);
  238. if (v3 == 4)
  239. {
  240. result = 1i64;
  241. }
  242. else if (v3 == 3)
  243. {
  244. result = 2i64;
  245. }
  246. else
  247. {
  248. if (v3 == 5)
  249. v2 = 3;
  250. result = (unsigned int)v2;
  251. }
  252. }
  253. return result;
  254. }
  255.  
  256. char __fastcall is_model_a_vehicle(__int64 a1)
  257. {
  258. char v1; // bl@1
  259. __int64 v2; // rax@1
  260. int v4; // [sp+38h] [bp+10h]@1
  261.  
  262. v1 = 0;
  263. v4 = 0xFFFF;
  264. LODWORD(v2) = sub_7FF601C276A4(a1, &v4);
  265. if (v2)
  266. {
  267. v1 = 0;
  268. if ((*(_BYTE *)(v2 + 157) & 0x1F) == 5)
  269. v1 = 1;
  270. }
  271. return v1;
  272. }
  273.  
  274. int64 PLAYER_ID()
  275. {
  276. int64 v0; // rax@2
  277. __int64 result; // rax@2
  278.  
  279. if (byte_7FF602DDAB4E)
  280. {
  281. LODWORD(v0) = sub_7FF60170275C(off_7FF602370AA0);
  282. result = *(_BYTE *)(v0 + 45);
  283. }
  284. else
  285. {
  286. result = 0i64;
  287. }
  288. return result;
  289. }
  290.  
  291.  
  292.  
  293. // GTA5_dump_Static_1604.1_1.46
  294. int __fastcall sub_14113F31C(__int64 a1, __int64 a2)
  295. {
  296. __int64 v2; // rdi@1
  297. char v3; // bl@1
  298. __int64 v4; // rax@1
  299. __int64 v5; // r8@1
  300. __int64 v6; // r9@1
  301. __int64 v7; // rax@1
  302.  
  303. v2 = a1;
  304. v3 = a2;
  305. LOBYTE(a2) = 1;
  306. sub_1416036D8(qword_14286B510, a2);
  307. LODWORD(v4) = sub_141568DC4(qword_142DF38C0);
  308. v6 = v4;
  309. v7 = 0i64;
  310. if ( v6 )
  311. {
  312. LOBYTE(v5) = v3;
  313. LODWORD(v7) = sub_141128C60(v6, *(_WORD *)(*(_QWORD *)(v2 + 208) + 10i64), v5);
  314. }
  315. return sub_141613B54(qword_14286B510, v7);
  316. }
  317.  
  318.  
  319. void __fastcall sub_14113F31C(__int64 a1, __int64 a2)
  320. {
  321. __int64 v2; // rdi@1
  322. char v3; // bl@1
  323. _DWORD *v4; // r9@1
  324. __int64 v5; // rax@1
  325.  
  326. v2 = a1;
  327. v3 = a2;
  328. LOBYTE(a2) = 1;
  329. sub_1416036D8(qword_14286B510, a2);
  330. v4 = sub_141568DC4(qword_142DF38C0);
  331. v5 = 0i64;
  332. if ( v4 )
  333. v5 = sub_141128C60((__int64)v4, *(_WORD *)(*(_QWORD *)(v2 + 208) + 10i64), v3);
  334. sub_141613B54(qword_14286B510, v5);
  335. }
  336.  
  337.  
  338.  
  339.  
  340.  
  341. template<typename T>
  342. T Invoke(unsigned int a_uiNativeHash, unsigned int a_uiArgCount, ...)
  343. {
  344. T* Result;
  345.  
  346. va_list l_VaList;
  347. unsigned int l_uiIndex;
  348. unsigned int l_uiReadCount = 0;
  349.  
  350. va_start(l_VaList, a_uiArgCount);
  351. for (l_uiIndex = 0; l_uiIndex < 16; l_uiIndex++)
  352. {
  353. if (l_uiIndex < a_uiArgCount)
  354. g_pArgs[l_uiIndex] = va_arg(l_VaList, unsigned int);
  355. else
  356. g_pArgs[l_uiIndex] = 0;
  357. }
  358. va_end(l_VaList);
  359.  
  360. //DbgPrint("Calling: 0x%08X\n", a_uiNativeHash);
  361.  
  362. if (a_uiNativeHash != PLAYER_ID_HASH)
  363. ((void(*)(struct NativeArg*))GetNativeFunction(a_uiNativeHash))(&g_NativeArg);
  364. else
  365. Original_Player_ID(&g_NativeArg);
  366.  
  367. Result = (T*)&g_pArgs[l_uiReadCount];
  368.  
  369. l_uiReadCount += sizeof(T);
  370. if ((sizeof(T) % 4) != 0)
  371. l_uiReadCount += 4 - (sizeof(T) % 4);
  372.  
  373. return *(T*)Result;
  374. }
  375.  
  376. void draw_menu(int a_iPosition, int a_iMenuItemCount, char ** a_pcMenu, char* a_pcTitle)
  377. {
  378. GRAPHICS::DRAW_RECT(0.90f, 0.2f, 0.15f, 0.05f, 0xFF, 0, 0, 0x90);
  379.  
  380. GRAPHICS::DRAW_RECT(0.90f, 0.225f + ((0.035f* (a_iMenuItemCount > 16 ? 16 : a_iMenuItemCount))/2), 0.15f, 0.035f* (a_iMenuItemCount > 16 ? 16 : a_iMenuItemCount), 0xFF, 0, 0, 0x30);
  381. //GRAPHICS::DRAW_RECT(0.90f, 0.50f, 0.15f, 0.55f, 0xFF, 0, 0, 0x30);
  382. PrintToScreen(a_pcTitle, 0.90f, 0.18f, 255, 255, 255, 255, 0.8f, 0.8f, 1, 1);
  383.  
  384. if (a_iMenuItemCount < 16)
  385. {
  386. GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(a_iPosition), 0.15f, 0.035f, 0xFF, 0, 0, 0x80);
  387. for (int l_iIndex = 0; l_iIndex < a_iMenuItemCount; l_iIndex++)
  388. {
  389. PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iIndex * .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0);
  390. }
  391. }
  392. else
  393. {
  394. if (a_iPosition < 7)
  395. {
  396. GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(a_iPosition), 0.15f, 0.035f, 0xFF, 0, 0, 0x80);
  397. for (int l_iIndex = 0; l_iIndex < 16; l_iIndex++)
  398. {
  399. PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iIndex * .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0);
  400. }
  401. }
  402. else
  403. {
  404. if (a_iPosition < a_iMenuItemCount - 8)
  405. {
  406. GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(7), 0.15f, 0.035f, 0xFF, 0, 0, 0x80);
  407. int l_iDrawIndex = 0;
  408. for (int l_iIndex = a_iPosition - 7; l_iIndex < a_iPosition + 9; l_iIndex++)
  409. {
  410. PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iDrawIndex* .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0);
  411. l_iDrawIndex++;
  412. }
  413. }
  414. else
  415. {
  416. GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(16 - (a_iMenuItemCount - a_iPosition)), 0.15f, 0.035f, 0xFF, 0, 0, 0x80);
  417. int l_iDrawIndex = 0;
  418. for (int l_iIndex = a_iMenuItemCount - 16; l_iIndex < a_iMenuItemCount; l_iIndex++)
  419. {
  420. PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iDrawIndex* .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0);
  421. l_iDrawIndex++;
  422. }
  423. }
  424. }
  425. }
  426. }
  427.  
  428. void PrintToScreen(char *str, float x, float y, int r, int g, int b, int a, float scaleX, float scaleY, int centerText, int font)
  429. {
  430. UI::SET_TEXT_FONT(font);
  431. UI::SET_TEXT_COLOUR(r, g, b, a);
  432. UI::SET_TEXT_SCALE(scaleX, scaleY);
  433. UI::SET_TEXT_OUTLINE();
  434. UI::SET_TEXT_CENTRE(centerText);
  435. UI::_SET_TEXT_ENTRY("STRING");
  436. UI::_ADD_TEXT_COMPONENT_STRING(str);
  437. UI::_DRAW_TEXT(x, y);
  438. }
  439.  
  440. void HeistHUD(char* text)
  441. {
  442.  
  443. }
  444. void InfoMessage(char* text)
  445. {
  446.  
  447. }
  448.  
  449. void MPMESSAGE(char* msg, char* desc)
  450. {
  451. featureBigMPMessge = true;
  452. BigMPMessagemgs = msg;
  453. BigMPMessagedesc = desc;
  454. PLAY_SOUND_FRONTEND(-1, "RACE_PLACED", "HUD_AWARDS");
  455. }
  456.  
  457. if (featureBigMPMessge)
  458. {
  459. if (!HAS_SCALEFORM_MOVIE_LOADED(SFBigMPMessage))
  460. SFBigMPMessage = REQUEST_SCALEFORM_MOVIE("MP_BIG_MESSAGE_FREEMODE");
  461. else
  462. {
  463. if (GET_GAME_TIMER() > featureTimeMPMessage) {
  464. featureTimeMPMessage = GET_GAME_TIMER() + 20;
  465. _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBigMPMessage, "SHOW_SHARD_CREW_RANKUP_MP_MESSAGE"); //SHOW_SHARD_CENTERED_TOP_MP_MESSAGE
  466. set_text_component(BigMPMessagemgs);
  467. set_text_component(BigMPMessagedesc);
  468. _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
  469. DRAW_SCALEFORM_MOVIE_FULLSCREEN(SFBigMPMessage, 255, 255, 255, 255);
  470. if (_BigMPMessagetime == 40) {
  471. _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBigMPMessage, "TRANSITION_UP");
  472. _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
  473. SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(&SFBigMPMessage);
  474. featureBigMPMessge = false;
  475. _BigMPMessagetime = 0;
  476. }
  477. else
  478. _BigMPMessagetime++;
  479. }
  480. }
  481. }
  482.  
  483. case 5: MPMESSAGE("ROULETTE", "coding like a rockstar"); break;
  484.  
  485.  
  486.  
  487. bool _scaleformFadeTimerEnabled = 0;
  488. int SFBMPM;
  489. DWORD _scaleformFadeTimerWaiter = 0;
  490. if (_scaleformFadeTimerEnabled)
  491. {
  492. if (!HAS_SCALEFORM_MOVIE_LOADED(SFBMPM))
  493. SFBMPM = REQUEST_SCALEFORM_MOVIE("MP_BIG_MESSAGE_FREEMODE");
  494. else
  495. {
  496.  
  497. _scaleformFadeTimerWaiter = GET_GAME_TIMER() + 2000;
  498. _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBMPM, "SHOW_SHARD_CREW_RANKUP_MP_MESSAGE" /*titleStr, msgStr, rankNumber, emblemTXD, emblemTXN, alpha*/); //SHOW_SHARD_CENTERED_TOP_MP_MESSAGE
  499. _BEGIN_TEXT_COMPONENT("STRING");
  500. ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("TheRouletteBoi");
  501. _END_TEXT_COMPONENT();
  502. _BEGIN_TEXT_COMPONENT("STRING");
  503. ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("ROULETTE");
  504. _END_TEXT_COMPONENT();
  505. _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
  506. DRAW_SCALEFORM_MOVIE_FULLSCREEN(SFBMPM, 255, 255, 255, 255);
  507. if (GET_GAME_TIMER() > _scaleformFadeTimerWaiter)
  508. {
  509. _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBMPM, "TRANSITION_UP");
  510. _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(0.2000000/*duration*/);
  511. _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
  512. SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(&SFBMPM);
  513. _scaleformFadeTimerEnabled = false;
  514. }
  515. }
  516. }
  517.  
  518.  
  519.  
  520. case 11: SET_WARNING_MESSAGE("Panic Mode is enabled.", 3, "Press square and triange to disable Panic Mode.", false, -1, 0, 0, true);
  521. //Panic Mode is enabled.
  522. //While this is enabled, most malicous action taken against you by a malicious cheater, such as object attachment and cash attempts, will fail to execute. Please note: this does not prevent a malicous cheater from framing you. For security reasons, you wil not be able to move, visually witness any activity, or utilize the Pause Menu while this mode is active.
  523. //Press square and triange to disable Panic Mode.
  524. //http://steamcommunity.com/id/clarexobearrx3/screenshots/
  525. break;
  526.  
  527.  
  528. Vector3 rot_to_direction(Vector3* rot)
  529. {
  530. float radiansZ = rot->z * 0.0174532924f;
  531. float radiansX = rot->x * 0.0174532924f;
  532. float num = ABSF((float)COS((double)radiansX));
  533. Vector3 dir;
  534. dir.x = (float)((double)((float)(-(float)SIN((double)radiansZ))) * (double)num);
  535. dir.y = (float)((double)((float)COS((double)radiansZ)) * (double)num);
  536. dir.z = (float)SIN((double)radiansX);
  537. return dir;
  538. }
  539.  
  540. Vector3 add(Vector3* vectorA, Vector3* vectorB)
  541. {
  542. Vector3 result;
  543. result.x = vectorA->x;
  544. result.y = vectorA->y;
  545. result.z = vectorA->z;
  546.  
  547. result.x += vectorB->x;
  548. result.y += vectorB->y;
  549. result.z += vectorB->z;
  550.  
  551. return result;
  552. }
  553. Vector3 multiply(Vector3* vector, float x)
  554. {
  555. Vector3 result;
  556. result.x = vector->x;
  557. result.y = vector->y;
  558. result.z = vector->z;
  559.  
  560. result.x *= x;
  561. result.y *= x;
  562. result.z *= x;
  563.  
  564. return result;
  565. }
  566. float get_distance(Vector3* pointA, Vector3* pointB)
  567. {
  568. float a_x = pointA->x;
  569. float a_y = pointA->y;
  570. float a_z = pointA->z;
  571.  
  572. float b_x = pointB->x;
  573. float b_y = pointB->y;
  574. float b_z = pointB->z;
  575.  
  576. double x_ba = (double)(b_x - a_x);
  577. double y_ba = (double)(b_y - a_y);
  578. double z_ba = (double)(b_z - a_z);
  579.  
  580. double y_2 = y_ba * y_ba;
  581. double x_2 = x_ba * x_ba;
  582. double sum_2 = y_2 + x_2;
  583.  
  584. return (float)sqrt(sum_2 + z_ba);
  585. }
  586.  
  587. float get_vector_length(Vector3* vector)
  588. {
  589. double x = (double)vector->x;
  590. double y = (double)vector->y;
  591. double z = (double)vector->z;
  592.  
  593. return (float)sqrt(x * x + y * y + z * z);
  594. }
  595.  
  596.  
  597.  
  598.  
  599. void UpdateBusySpinner()
  600. {
  601. /*func_83(P);
  602. if (_0xF6015178("SHOW_WARNING_MESSAGE"))
  603. {
  604. _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_BOOL(uParam0);
  605. _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(uParam1);
  606. _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(uParam2);
  607.  
  608. _BEGIN_TEXT_COMPONENT("STRING");
  609. ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("Loading, Please wait.");
  610. _END_TEXT_COMPONENT();
  611.  
  612.  
  613. _BEGIN_TEXT_COMPONENT("STRING");
  614. ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("LOADING DONE!");
  615. _END_TEXT_COMPONENT();
  616.  
  617.  
  618. _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(uParam5);
  619. _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_STRING(uParam6);
  620. _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_STRING(uParam7);
  621. _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
  622. }*/
  623.  
  624. if (!HAS_SCALEFORM_MOVIE_LOADED(SFMBS))
  625. SFMBS = REQUEST_SCALEFORM_MOVIE("busy_spinner");
  626. else
  627. {
  628. _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "CLEAR_ALL");
  629. _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
  630. _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "SET_DATA_SLOT"); // CREATE_CONTAINER
  631. _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(0);
  632. _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(LOADING_HALF_CIRCLE_RIGHT);
  633. _BEGIN_TEXT_COMPONENT("STRING");
  634. ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("Loading, Please wait.");
  635. _END_TEXT_COMPONENT();
  636. _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
  637. _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "DRAW_INSTRUCTIONAL_BUTTONS");
  638. _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(-1);
  639. _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
  640. }
  641.  
  642.  
  643. /*if (!HAS_SCALEFORM_MOVIE_LOADED(SFMBS))
  644. SFMBS = REQUEST_SCALEFORM_MOVIE("CUSTOM_WARNING_SCREEN");
  645. else
  646. {
  647. //"BANNED FOR EVER."
  648. //"BITCH YOU'VE BEEN BANNED."
  649. _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "SHOW_CUSTOM_WARNING_SCREEN");
  650. _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
  651. }*/
  652.  
  653.  
  654. DRAW_SCALEFORM_MOVIE_FULLSCREEN(SFMBS, 255, 255, 255, 255);
  655. }
  656.  
  657.  
  658. /*
  659. WT_HEALTH //health
  660. PS_SPEC_AB //special
  661. LOB_CAT_9 //wanted levels
  662. FMMC_NONE; //unavailable
  663. FACE_HAIR; //Hair
  664. FACE_BRD; //Beard
  665. HLTH_REGEN2; //max health
  666. LOB_CAT_9; //wanted levels
  667. PIM_DHIGH0; off
  668. PIM_DHIGH1; //on
  669. MOD_MNU;
  670. CELL_221; //enter number
  671. HTX_ENTER; //enter
  672. CM_SPECTATE spectate player (beta)
  673. CM_SHOW_GAMER_CARD show profile
  674. CMOD_MOD_22_D increase downforce.
  675. cell_19 Players
  676. cell_18 Map
  677. cell_32 Qucik Save //for recovery menu
  678. cell_35 Player List
  679. CELL_MP_1001 invite to party
  680. CELL_MP_1005 Player
  681. CELL_MP_1007 View Profile
  682. PM_MP_OPTIONS Options
  683. PM_FRESES Join Friends
  684. PM_CRESES Join Crew Members
  685. PM_PLYRS Players
  686. PM_SWAP_CHAR Swap Character
  687. PM_FIND_SESS Find new Session
  688. UGC_FL_UNEX The Rockstar game services are unavailable right now. Please try again later.
  689. PM_MY_PLIST My Playlists
  690. PM_R_PLIST Rockstar Playlists
  691. PM_R_V_PLIST Rockstar Verified playlist
  692. PM_DLOAD_PLIST My Bookmarked Playlists
  693. PM_AVAIL_CHALL Challenges
  694. PM_MULTI x
  695. PM_CH_NM_AL Please choose a valid title for your Challenge.
  696. PM_CLMN_WRNT1 No Playlists
  697. PM_CREWS Crews
  698. PM_INF_AJ2T1 Bookmarked
  699. PM_INF_LEAT Leave
  700. PM_FIND_SESS Find New Session
  701. PM_INF_CHCT Choose Character
  702. PM_INF_PGOT Play GTA Online
  703. PM_INF_CRWT Crews
  704. PM_INF_AWDT Awards
  705. PM_INF_WEPT Weapons
  706. PM_INF_UNLT Unlocks
  707. PM_INF_PLLT Playlists
  708. PM_INF_PLLT00 R* Tournaments
  709. PM_INF_PLLT0 My Playlists
  710. PM_CLMN_WRNT5 No Challenges
  711. BM_INV_SENT Inviting Players
  712. BM_NO_INV No invites sent
  713. PIM_TINVE Inventory
  714. PIM_THELP Brief
  715. PIM_TOBJ Objective
  716. PM_INVO_FM Invite Only Session
  717. PM_GO Go
  718. PM_NCREW_FM Crew Session
  719. PM_CREW_FM Closed Crew Session
  720. PM_FRIEND_FM Closed Friend Session
  721. PM_SOLO_FM Solo Session
  722. PM_ON On
  723. PM_OFF Off
  724. PM_SHUFFLE Shuffle Playlist
  725. HUD_INVPROG Joining session in progress.
  726. R2P_MENU_TINV PLAYER LIST
  727. BLIP_0 Destination
  728. BLIP_1 Destination
  729. BLIP_2 Destination
  730. BLIP_3 Police
  731. BLIP_4 Objective
  732. BLIP_5 Objective
  733. BLIP_6 Player
  734. BLIP_7 North
  735. BLIP_8 Waypoint
  736. HUD_LOADMAIN rockstart game sercives are temportily unavailable
  737. HUD_KICKRES Kick from session for beeing idle too long
  738. HUD_KICKRES1 You were kicked from this GTA Online session by others players
  739. HUD_KICKRES2 you have been classed as a cheater
  740. HUD_KICKWARN Players are voting for you to be removed from the session. Improve your behavior or you will be kicked.
  741. HUD_ENDPARTYLEFT The party leader has left.
  742. HUD_MPBAILMESG Connection to the session lost due to an unknown network error.
  743. HUD_TIMEJOIN Timed out joining session.
  744. HUD_TIMEST Timed out loading player data.
  745. HUD_TIMEFIN Timed out loading session.
  746. HUD_TIMEWAIT Timed out locating session.
  747. HUD_MPTIMOUT Connecting to the session has timed out.
  748. HUD_CONNPROB alert
  749. HUD_SPRETURNTRY Please return to Grand Theft Auto V and try again later.
  750. HUD_CHNGCREWMSG You have changed your Crew during a session.
  751. HUD_QURETMEN Returning to Character Selection.
  752. HUD_KICKCREWMSG You were kicked from your Crew.
  753. HUD_SPRETRNFRSH Please return to Grand Theft Auto V.
  754. CLOUD_LD_FL2 Return to GTA Online.
  755. HUD_LOADMAIN The Rockstar game services are temporarily unavailable due to maintenance.
  756. HUD_BAILSC There has been an error joining a session.
  757. HUD_BAIL1 You have bailed the game from Rag.
  758. HUD_BAIL2 A sign-in change has occurred.
  759. HUD_BAIL3 New content has been installed.
  760. HUD_BAIL4 Failed to find a compatible GTA Online session.
  761. HUD_BAIL5 Failed to host a GTA Online session.
  762. HUD_BAIL6 Failed to join intended GTA Online session.
  763. HUD_BAIL7 Failed to start the active GTA Online session.
  764. HUD_BAIL8 Failed to host an active GTA Online session.
  765. HUD_BAIL9 Connection to the session host has been lost. Unable to determine a new host. The GTA Online session will be terminated.
  766. HUD_BAIL10 Failed to host a GTA Online party.
  767. HUD_BAIL11 Failed to join intended GTA Online party.
  768. HUD_BAIL12 Timed out joining GTA Online.
  769. HUD_BAIL13 Connection to the active GTA Online session lost due to an unknown network error.
  770. HUD_BAIL14 Timed out when launching the activity.
  771. HUD_BAIL15 Timed out when leaving the active GTA Online session.
  772. HUD_BAIL16 Timed out when matchmaking for a compatible GTA Online session to join.
  773. HUD_MM_FAIL The Rockstar Matchmaking Service has failed to find a suitable match.
  774. HUD_QURETSP Return to Grand Theft Auto V.
  775. HUD_MPREENTER Joining a new GTA Online session.
  776. //CM_JOIN_GAME Accept Game Invite
  777. //CM_JIP_GAME Join Game
  778. //CM_JIP_GAME_DIS Join Game (Disabled)
  779. //CM_SPECTATE Spectate Player (BETA)
  780. //CM_SPECTATE_DISABLED Spectate Player (Disabled by Player)
  781. //CM_JOIN_PARTY Join Party
  782. //CM_SEND_FRIEND_INVITE Send Friend Request
  783. //CM_SEND_CREW_INVITE Invite to
  784. //CM_SEND_PARTY_INVITE Send Party Invite
  785. //CM_KICK_PARTY Kick from Party
  786. //CM_SEND_GAME_INVITE Send Game Invite
  787. //CM_SEND_GAME_INVITE_DIS Send Game Invite (Disabled)
  788. //CM_KICK_DIS Kick (Disabled)
  789. //CM_UNKICK Unkick
  790. //CM_REPORT Report
  791. //CM_REPORT_DIS Report (Disabled)
  792. //CM_COMMEND Commend
  793. //CM_COMMEND_DIS Commend (Disabled)
  794. //CM_MUTE Toggle Mute
  795. //CM_SHOW_GAMER_CARD Show Profile
  796. //CM_ADD_A_FRIEND Add A Friend
  797. //CM_GAMER_REVIEW Player Review
  798. //IB_JOINCREW Join Crew
  799. //HUD_INPUT53 Back
  800. //CC_PM_OPT OPTIONS
  801. //CC_PM_DET DETAILS
  802. //PM_SCR_CCY YOU
  803. //CRW_MINE My Crews
  804. //CRW_ROCKSTAR Suggested Crews
  805. //CRW_FRIENDS Friends' Crews
  806. //CRW_INVITES Invitations
  807. //CRW_REQUESTS Requests
  808. //CRW_LEADERBOARDS Leaderboard
  809. //FM_COR_KICKOC You have been kicked from the Job. You are no loger on call.
  810. //HUD_ENDKICK You were kicked from the session.
  811. //HUD_ENDADMINKICK You Have been removed from this session by a Rockstar Games administrator.
  812. //HUD_KICKROCK The session you were spectating is being assessed by Rockstar with a view to broadcasting that as an Online TV Channel.
  813. //HUD_ROSBANNED You have been banned from Grand Theft Auto Online.
  814. //HUD_CONNPROB alert
  815. //HUD_QURETSP Return to Grand Theft Auto V.
  816. //HUD_KICKCREWMSG You were kicked from your Crew. Global_1315377
  817. //MP_PROP_PUR_KICK2 You no longer have access tp the property as the owner has left the game.
  818. //MP_PROP_PUR_KICK0 You no longer have access to the property as you have traded it in.
  819. //MP_PROP_PUR_KICK1 You no loger have access to the property as the owner has traded it.
  820. //FM_COR_KICKA You have been kicked from the Activity
  821. //FM_COR_KICK You have been kicked from the Job.
  822. //PLYKICKED was voted from the game.
  823. //SCTV_FEED0 Show Feed
  824. //SCTV_FEED1 Show List
  825. //SCTV_HELI_OFF Online TV Heli Off
  826. //SCTV_HELI_ON Online TV Heli On
  827. //SCTV_TS_CTFG GTA - fighting for transport
  828. //SCTV_TS_CTFR Raid - protecting their base of operations
  829. //SCTV_TS_CTFC Contend - bringing it back to base
  830. //SCTV_TS_CTFH Hold - holding on for dear life
  831. //SCTV_TS_LTS2 Two Team LTS - in a two team enter one leaves situation
  832. //SCTV_TS_LTS3 Three Team LTS - in a three way.. battle for survival
  833. //SCTV_TS_LTS4 four Team LTS - unlikely to survive a four team fight
  834. //SCTV_T_LTS LTS
  835. //SCTV_T_VS versus
  836. //SCLB_MIS_NN Mission
  837. //SCTV_SSYOU has stopped spectating you.
  838. //SCTV_SYOU is spectating you.
  839. //DSV_TPLYS destroy the ~r~target vehicle.
  840. //PTD_TPLYSH took down the Smuggler Helicopter.
  841. //SCLB_PROFILE View Profile
  842. //SCLB_NO_ROS The Rockstar game services are unavailable right now. Please try again later.
  843. //SCLB_SIGN_OUT You have signed out of PlayStation Network and will be unable to view leaderboard data.
  844. //SCLB_NOT_ONL Sign in to Playstation Network to view leaderboards data.
  845. //FMMC_COR_SCLB5 Driver
  846. //FMMC_COR_SCLB6 Co-Driver
  847. //SCLB_C_RANK POSITION
  848. //SCLB_RCE_NN Race
  849. SCLB_GLOBAL GLOBAL
  850. SCLB_FRIENDS FRIENDS
  851. SCLB_CREW CREW
  852. SHOP_CONTENT_1 beach bum
  853. SHOP_CONTENT_2 business update
  854. SHOP_CONTENT_3 festive
  855. SHOP_CONTENT_4 valentine's
  856. SHOP_CONTENT_5 high life update
  857. SHOP_CONTENT_6 "im not a hipster"
  858. SHOP_CONTENT_6b "im not a hipster" update
  859. SHOP_CONTENT_7 heists
  860. SHOP_CONTENT_8 independence day
  861. SHOP_CONTENT_9 san andreas flight school
  862. SHOP_CONTENT_10 last team standing
  863. SHOP_CONTENT_12 ill-gotten gains update part 1
  864. SHOP_CONTENT_13 video edditor
  865. SHOP_CONTENT_14 ill-gotten gains update part 2
  866. PIM_INVAT Invite to Apartment has been send to .
  867. PIM_HINVAP Invite this player to your apartment.
  868. PIM_HINVA Invite players to your Apartment.
  869. PIM_INVAP Invite to Apartment.
  870. PIM_TINVE Inventory
  871. PIM_HHEIS Choose to Spectate other members of your Heist Crew.
  872. PIM_HHEIB Your Heist Crew cannot currently be spectated.
  873. PIM_HINVE Your Inventory contains carried oteams such as cash and clothing Accessories.
  874. PIM_HPASIY Confirm turning on Passive Mode.
  875. PIM_HPASIN Confrim turning off Passive Mode.
  876. PIM_HHLPL Make your blip flash to other players for a short time.
  877. PIM_HHLPR Make the selected player's blip flash to you for a short time.'
  878. PIM_HPGS A list of all the players in your session.
  879. PIM_HLJCE Cash earned from the last Job.
  880. PIM_HHEISP Select to spectate this player.
  881. PIM_TCHT Chat
  882. PIM_TAPV Vehicle Access.
  883. 0x1BA5E3C4 Rockstar wants to know what you
  884. 0xB9C144DB Unable to Join. The session you have tried to join is using content created by another player. An inactive profile only has permissions for Rockstar content.
  885. 0x41818A76 Your Sony Entertainment Network account has chat restrictions enabled, only Rockstar content will be available and voice chat is disabled.
  886. 0x2A199171 Cheater classification release date ~1~/~1~/~1~.
  887. 0x093ADE5F Rockstar Dev SCTV
  888. 0x0BD9B728 You have been removed from this session by a Rockstar Games administrator.
  889. 0x28DBEF47 Rockstar Game Services have corrected your GTA Dollars by -$~1~.
  890. 0xCF6AEAC0 Rockstar Games SCADMIN Version
  891. TICK_PH_INV joined job.
  892. TICK_PH_INVA joined activity.
  893. TICK_BC_ON has active their Broadcast app.
  894. TICK_BC_OFF has deactivated their Broadcast app.
  895. TICK_HEAD NULL
  896. TICK_DIED died.
  897. PIM_EMVTK kicked you from thier Personal Vehicle.
  898. TICK_BC_ON has activated thier Brodcast app.
  899. TICK_BC_OFF has deactivated thier Brodcast app.
  900. PLYVEH_INS_DES1 Your insured Personal Vehicle has been destroyed The player who destroyed it has paid $ towards the clain premium.
  901. PLYVEH_INS_DES has detroyed your insured Personal Vehicle They have paid $ towards the claim premium.
  902. TICK_PH_INV joined Job.
  903. 0xA1519D54 Return to Grand Theft Auto V
  904. 0x478FDC87 GTA Online
  905. 0x56F3BD49 Grand Theft Auto Online
  906. 0x5E96ECC Are you sure you want to quit this session?
  907. 0x14610888 Progress will be automatically saved.
  908. 0x73A36AB4 Playing story
  909. 0x83BA9913 Prologue
  910. 0xABB00DEB Grand Theft Auto V
  911. 0x6F927644 Bay City Ave
  912. 0xFBD41663 Alert
  913. 0xAB11B305 Quit
  914. 0xC3881591 No
  915. 0xC4A4A05C Yes
  916. 0x9E643CB0 driveby_parachute
  917. NT_INV_CONFIG Getting GTA Online session details.
  918. NT_INV_MP_SAVE Are you sure you want to join a different GTA Online session? Progress will be automatically saved.
  919. NT_INV Are you sure you want to join a GTA Online session? Any unsaved progress will be lost.
  920. NT_INV_IN_SESSION You are already a member of this GTA Online session.
  921. NT_INV_SP_SAVE Are you sure you want to join a GTA Online session? Any unsaved progress will be lost.
  922. CWS_SPEC_FAILED Failed to connect to the session.
  923. CWS_JIP_FAILED Failed to connect to the session.
  924. NT_INV_FREE Are you sure you want to join a different GTA Online session? Any unsaved progress will be lost.
  925. BAIL_BLACKLIST You have already been voted out of this game session. Joning a new GTA Online session.
  926. VEH_CLASS_0 Compacts
  927. VEH_CLASS_1 Sedans
  928. VEH_CLASS_2 SUVs
  929. VEH_CLASS_3 Coupes
  930. VEH_CLASS_4 Muscle
  931. VEH_CLASS_5 Sports Classics
  932. VEH_CLASS_6 Sports
  933. VEH_CLASS_7 Super
  934. VEH_CLASS_8 Motorcycles
  935. VEH_CLASS_9 Off-Road
  936. VEH_CLASS_10 Industrial
  937. VEH_CLASS_11 Utility
  938. VEH_CLASS_12 Vans
  939. VEH_CLASS_13 Cycles
  940. VEH_CLASS_14 Boats
  941. VEH_CLASS_15 Helicopters
  942. VEH_CLASS_16 Planes
  943. VEH_CLASS_17 Service
  944. VEH_CLASS_18 Emergency
  945. VEH_CLASS_19 Military
  946. VEH_CLASS_20 Commercial
  947. VEH_CLASS_21 Trains
  948.  
  949. */
  950.  
  951. COMMEND_SPAM_TIMEOUT_DISABLED = 0x6133E077
  952. COMMEND_SPAM_TIMEOUT = 0xA76D3517
  953. MPPLY_LAST_COMMEND_RESTORE = 0x181F07A6
  954. MPPLY_LAST_COMMEND_PENALTY = 0x8CF94EB4
  955. MPPLY_COMMEND_STRENGTH = 0xADA7E7D3
  956. REPORT_SPAM_TIMEOUT_DISABLED = 0x33406312
  957. REPORT_SPAM_TIMEOUT = 0x332F884E
  958. MPPLY_LAST_REPORT_RESTORE = 0x211774A4
  959. MPPLY_LAST_REPORT_PENALTY = 0xB87499EA
  960. MPPLY_REPORT_STRENGTH = 0x850CF917
  961. COMMEND_TIMEOUT_DISABLED = 0x73DC7AA3
  962. COMMEND_TIMEOUT = 0xABE83C3B
  963. REPORT_TIMEOUT_DISABLED = 0x7266E8B2
  964. REPORT_TIMEOUT = 0xA13B434D
  965. CL_SEND_FRIEND_REQUEST = 0xAFEA09C6
  966. KICK_TIMEOUT = 0xB2111FE4
  967. KICK_TIMEOUT_DISABLED = 0xD892E535
  968. IDLEKICK_KICK = 0x949C8AAD
  969. ENABLE_KICK = 0xE2E1805E
  970. KICK_VOTES_NEEDED_RATIO = 0xEED6D618
  971. BADSPORT_THRESHOLD = 0x4C507C3D
  972. BADSPORT_THRESHOLD_NOTCHEATER = 0x727F6777
  973. IDLEKICK_WARNING1 = 0xB3A4D684
  974. IDLEKICK_WARNING2 = 0xC16F7219
  975. IDLEKICK_WARNING3 = 0xE009AF49
  976. COMMENDREPORT_MAX_STRENGTH = 0xF227F666
  977. MP_GLOBAL = 0x38CEB237, 953070135
  978. BASE_GLOBALS = 0xB5EE873, 190769267
  979. CONTENT_MODIFIER_ = 0xE8895D8A, 3901316490
  980. MP_FM_RACES = 0xC32348A0, 3273869472
  981. MP_FM_RACES_CAR = 0x3D76C61B, 1031194139
  982. MP_FM_RACES_SEA = 0xCC580A3A, 3428321850
  983. MP_FM_RACES_AIR = 0xF4175CBB, 4095171771
  984. MP_FM_BASEJUMP = 0x30C5F8C6, 818280646
  985. MP_FM_RACES_CYCLE = 0xEA4446C2, 3930343106
  986. MP_FM_RACES_BIKE = 0xC795D7FC, 3348486140
  987. MP_FM_MISSIONS = 0x202DE323, 539878179
  988. MP_FM_CONTACT = 0xBDD1A4F5, 3184633077
  989. MP_FM_RANDOM = 0xAD9BAC56, 2912660566
  990. MP_FM_VERSUS = 0x56A36BC3, 1453550531
  991. MP_FM_LTS = 0xFCDE7FF3, 4242440179
  992. MP_FM_CAPTURE = 0xF508B799, 4110989209
  993. MP_FM_DM = 0x7030EBCC, 1882254284
  994. MP_FM_SURVIVAL = 0x2217A8F1, 571975921
  995. MP_FM_GANG_ATTACK = 0x67F82C09, 1744317449
  996. MP_CNC = 0x53599429, 1398379561
  997. MP_CNC_TEAM_COP = 0xEE611088, 3999338632
  998. MP_CNC_TEAM_VAGOS = 0xBB04D34F, 3137655631
  999. MP_CNC_TEAM_LOST = 0x3AEFBEA0, 988790432
  1000. MP_FM = 0x43FE68BD, 1140746429
  1001. DISABLE_SCTV_GTAO_TV = 0xB715B652, 3071653458
  1002. DISABLE_SCTV_FRIENDS_SPECTATE = 0x74AFE8F8, 1957685496
  1003. DisableSpectate = 0xCAB5C6A2, 3400910498
  1004. DisableSpectate = 0x2A5A6D1F, 710569247
  1005. mpply_crew_0_id = 0x1838E2E9, 406381289
  1006. mpply_crew_1_id = 0x6388AA41, 1669900865
  1007. mpply_crew_2_id = 0x33A7D8B, 54164875
  1008. mpply_crew_3_id = 0xCDC93A60, 3452516960
  1009. mpply_crew_4_id = 0xA202D7E4, 2718095332
  1010. mpply_crew_local_xp_0 = 0xA9C0CB15, 2847984405
  1011. mpply_crew_local_xp_1 = 0x9C0D2FAE, 2618109870
  1012. mpply_crew_local_xp_2 = 0x4C579040, 1280806976
  1013. mpply_crew_local_xp_3 = 0xBEA1F4D7, 3198285015
  1014. mpply_crew_local_xp_4 = 0x70E5595B, 1894078811
  1015. mpply_became_cheater_num = 0xA2A859D5, 2728942037
  1016. mpply_friendly = 0xDAFB10F9, 3673886969
  1017. mpply_offensive_language = 0x3CDB43E2, 1021002722
  1018. mpply_griefing = 0x9C6A0C42, 2624195650
  1019. mpply_helpful = 0x893E1390, 2302546832
  1020. mpply_offensive_ugc = 0xF3DE4879, 4091431033
  1021. mpply_offensive_tagplate = 0xE8FB6DD5, 3908791765
  1022. mpply_exploits = 0x9F79BA0B, 2675554827
  1023. mpply_game_exploits = 0xCBFD04A4, 3422356644
  1024. mpply_vc_hate = 0xE7072CD, 242250445
  1025. mpply_vc_annoyingme = 0x62EB8C5A, 1659604058
  1026.  
  1027.  
  1028. //badsport and some cheat stuff hashes. need to be bruteforced
  1029. 0x6D7F0859 = awd_car_bombs_enemy_kills
  1030. 0xBC707798
  1031. 0xC71E28C5
  1032.  
  1033.  
  1034.  
  1035.  
  1036. //vehicle weapons code:
  1037. Vector3 Global_1312302_8; //coords from 1
  1038. Vector3 Global_1312302_11; //coords from 2
  1039.  
  1040. Vector3 Global_1312302_2; //coords to 1
  1041. Vector3 Global_1312302_5; //coords to 2
  1042.  
  1043. Vector3 Global_1312295_2; //spike coords
  1044. int Global_1312295_5; //spike pickup
  1045.  
  1046. void func_3000()
  1047. {
  1048. int iVar0;
  1049. Vector3 Var1;
  1050. Vector3 Var2;
  1051. float fVar3;
  1052. float uVar4;
  1053. Vector3 vVar5;
  1054. Vector3 vVar6;
  1055. float uVar7;
  1056. Vector3 vVar8;
  1057. Vector3 vVar9;
  1058.  
  1059.  
  1060. if (IS_PLAYER_PLAYING(PLAYER_ID()))
  1061. {
  1062. if (IS_PED_IN_ANY_VEHICLE(PLAYER_PED_ID(), 0))
  1063. {
  1064. _DISABLE_INPUT_GROUP(2);
  1065. iVar0 = GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), 0);
  1066. GET_MODEL_DIMENSIONS(GET_ENTITY_MODEL(iVar0), &Var1, &Var2);
  1067. if (IS_CONTROL_JUST_PRESSED(2, INPUT_SCRIPT_LS) || IS_CONTROL_PRESSED(2, INPUT_SCRIPT_LS))
  1068. {
  1069. if (IS_CONTROL_PRESSED(2, INPUT_SCRIPT_RS))
  1070. {
  1071. Global_1312302_8 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var1.x - 0.2f), (Var1.y - 0.5f), 0.0f);
  1072. Global_1312302_11 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var2.x + 0.2f), (Var1.y - 0.5f), 0.0f);
  1073. if (!IS_ENTITY_IN_AIR(iVar0))
  1074. {
  1075. _GET_GROUND_Z_COORD_WITH_OFFSETS(Global_1312302_8.x, Global_1312302_8.y, Global_1312302_8.z, &uVar4, &vVar5);
  1076. vVar6 = func_363(vVar5, Subtract(func_765(Global_1312302_11), Global_1312302_8));
  1077. Global_1312302_2 = Subtract(Global_1312302_8, Modulate(vVar6, NewVector3(300.0f, 300.0f, 300.0f)));
  1078. Global_1312302_5 = Subtract(Global_1312302_11, Modulate(vVar6, NewVector3(300.0f, 300.0f, 300.0f)));
  1079. }
  1080. else
  1081. {
  1082. Global_1312302_2 = func_3001(Global_1312302_8, iVar0, -300.0f);
  1083. Global_1312302_5 = func_3001(Global_1312302_11, iVar0, -300.0f);
  1084. }
  1085. }
  1086. else
  1087. {
  1088. Global_1312302_8 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var1.x - 0.2f), (Var2.y + 0.5f), 0.0f);
  1089. Global_1312302_11 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var2.x + 0.2f), (Var2.y + 0.5f), 0.0f);
  1090. if (!IS_ENTITY_IN_AIR(iVar0))
  1091. {
  1092. _GET_GROUND_Z_COORD_WITH_OFFSETS(Global_1312302_8.x, Global_1312302_8.y, Global_1312302_8.z, &uVar7, &vVar8);
  1093. vVar9 = func_363(vVar8, Subtract(func_765(Global_1312302_11), Global_1312302_8));
  1094. Global_1312302_2 = Addition(Global_1312302_8, Modulate(vVar9, NewVector3(300.0f, 300.0f, 300.0f)));
  1095. Global_1312302_5 = Addition(Global_1312302_11, Modulate(vVar9, NewVector3(300.0f, 300.0f, 300.0f)));
  1096.  
  1097. }
  1098. else
  1099. {
  1100. Global_1312302_2 = func_3001(Global_1312302_8, iVar0, 1133903872);
  1101. Global_1312302_5 = func_3001(Global_1312302_11, iVar0, 1133903872);
  1102. }
  1103. }
  1104. if ((GET_ENTITY_SPEED(iVar0) * GET_ENTITY_SPEED(iVar0)) > 400.0f)
  1105. {
  1106. fVar3 = ((GET_ENTITY_SPEED(iVar0) * GET_ENTITY_SPEED(iVar0)) + 100.0f);
  1107. }
  1108. else
  1109. {
  1110. fVar3 = 400.0f;
  1111. }
  1112. if (!func_987(Global_1312302_8, Global_1312302_2))
  1113. {
  1114. _SHOOT_SINGLE_VEHICLE_BULLET_BETWEEN_COORDS(
  1115. Global_1312302_8.x, Global_1312302_8.y, Global_1312302_8.z,
  1116. Global_1312302_2.x, Global_1312302_2.y, Global_1312302_2.z,
  1117. 250, 1, GET_HASH_KEY("weapon_vehicle_rocket"), PLAYER_PED_ID(), 1, 1, fVar3, iVar0, 0);
  1118. }
  1119. if (!func_987(Global_1312302_11, Global_1312302_5))
  1120. {
  1121. _SHOOT_SINGLE_VEHICLE_BULLET_BETWEEN_COORDS(
  1122. Global_1312302_11.x, Global_1312302_11.y, Global_1312302_11.z,
  1123. Global_1312302_5.x, Global_1312302_5.y, Global_1312302_5.z,
  1124. 250, 1, GET_HASH_KEY("weapon_vehicle_rocket"), PLAYER_PED_ID(), 1, 1, fVar3, iVar0, 0);
  1125. }
  1126.  
  1127. //DISABLE_CONTROL_ACTION(0, INPUT_VEH_HORN);
  1128. }
  1129. }
  1130. }
  1131. }
  1132.  
  1133. void func_3005()
  1134. {
  1135. int iVar0;
  1136. Vector3 Var1, uVar2;
  1137.  
  1138. if (IS_PED_IN_ANY_VEHICLE(PLAYER_PED_ID(), 0))
  1139. {
  1140. DISABLE_CONTROL_ACTION(0, 79);
  1141. iVar0 = GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), 0);
  1142. GET_MODEL_DIMENSIONS(GET_ENTITY_MODEL(iVar0), &Var1, &uVar2);
  1143. if (IS_CONTROL_JUST_PRESSED(2, 200))
  1144. {
  1145. Global_1312295_2 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, 0.0f, (Var1.y - 1.0f), 0.0f);
  1146. }
  1147. }
  1148. }
  1149. void func_3003()
  1150. {
  1151. func_3005();
  1152. if (!DOES_ENTITY_EXIST(Global_1312295_5))
  1153. {
  1154. Global_1312295_5 = CREATE_AMBIENT_PICKUP(GET_HASH_KEY("pickup_vehicle_custom_script"),
  1155. Global_1312295_2.x, Global_1312295_2.y, Global_1312295_2.z,
  1156. 0, 2, GET_HASH_KEY("prop_tyre_spike_01"), 1, 0);
  1157. _HIGHLIGHT_PLACEMENT_COORDS(Global_1312295_2.x, Global_1312295_2.y, Global_1312295_2.z, 0);
  1158. PLAY_SOUND_FROM_ENTITY(-1, "SPIKES", Global_1312295_5, "MP_RACE_SPIKES_SOUNDSET", 1, 50);
  1159. }
  1160. else if (DOES_ENTITY_EXIST(Global_1312295_5))
  1161. {
  1162. DELETE_OBJECT(&(Global_1312295_5));
  1163. }
  1164. }
  1165.  
  1166. //loop:
  1167. if (featureWeaponVehRockets)
  1168. {
  1169. if (!IS_PAUSE_MENU_ACTIVE())
  1170. {
  1171. func_3003();
  1172. func_3000();
  1173. }
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179. if (!DOES_PARTICLE_FX_LOOPED_EXIST(particalmH))
  1180. {
  1181. printf("asset: %s, name: %s \n", result.asset, result.name);
  1182. _SET_PTFX_ASSET_NEXT_CALL(result.asset);
  1183. particalmH = _START_PARTICLE_FX_LOOPED_ON_ENTITY_BONE_2(result.name, PLAYER_PED_ID(),
  1184. 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SKEL_L_Finger01, 1.0f, 0, 0, 0);
  1185.  
  1186. _SET_PTFX_ASSET_NEXT_CALL(result.asset);
  1187. particalmH = _START_PARTICLE_FX_LOOPED_ON_ENTITY_BONE_2(result.name, PLAYER_PED_ID(),
  1188. 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SKEL_R_Finger01, 1.0f, 0, 0, 0);
  1189.  
  1190. SET_PARTICLE_FX_LOOPED_COLOUR(particalmH, titlebox.R / 255.0f, titlebox.G / 255.0f, titlebox.B / 255.0f, 0);
  1191.  
  1192. }
  1193. if (DOES_PARTICLE_FX_LOOPED_EXIST(particalmH))
  1194. {
  1195. //STOP_PARTICLE_FX_LOOPED(particalmH, 1);
  1196. REMOVE_PARTICLE_FX(particalmH, 1);
  1197. }
  1198.  
  1199.  
  1200.  
  1201.  
  1202. int myAtoi(char* str) {
  1203. int length = strlen(str);
  1204. int counter = 0;
  1205. int signcounter = 0;
  1206. unsigned int result = 0;
  1207. int result2 = 0;
  1208. bool negative = false;
  1209. char *temp = (char*)malloc(sizeof(char));
  1210. for (int i = 0; i < length; i++)
  1211. {
  1212. if (counter == 0 && (str[i] != 0x20 && str[i] != 0x2B && str[i] != 0x2D) && (str[i] < 0x30 || str[i] > 0x39))
  1213. break;
  1214.  
  1215. else if (((counter > 0 || signcounter > 0) || (i > 0 && signcounter == 0 && str[i] != 0x20 && str[i] != 0x2B && str[i] != 0x2D)) && (str[i] < 0x30 || str[i] > 0x39))
  1216. break;;
  1217.  
  1218.  
  1219. if (str[i] >= 0x30 && str[i] <= 0x39)
  1220. {
  1221. if (counter > 0)
  1222. temp = (char*)_realloc(temp, (counter + 1) * sizeof(char));
  1223.  
  1224. temp[counter] = str[i];
  1225. counter++;
  1226. }
  1227. else if (str[i] == 0x2D)
  1228. {
  1229. negative = !negative;
  1230. signcounter++;
  1231. }
  1232. else if (str[i] == 0x2B)
  1233. signcounter++;
  1234.  
  1235. if (signcounter > 1)
  1236. return 0;
  1237.  
  1238. //length--;
  1239. }
  1240.  
  1241. if (counter == 0)
  1242. return 0;
  1243. else if (counter > 10 && !negative)
  1244. return INT_MAX;
  1245. else if (counter > 10 && negative)
  1246. return INT_MIN;
  1247.  
  1248.  
  1249. for (int i = 0; i < counter; i++)
  1250. {
  1251. result += (temp[i] - 0x30) * ipow(10, counter - 1 - i);
  1252.  
  1253. }
  1254.  
  1255. if (result > 2147483647 && !negative)
  1256. result2 = INT_MAX;
  1257.  
  1258. else if (result > 2147483648 && negative)
  1259. result2 = INT_MIN;
  1260.  
  1261. else if (negative)
  1262. result2 = -result;
  1263. else
  1264. result2 = result;
  1265.  
  1266. return result2;
  1267. }
  1268.  
  1269.  
  1270.  
  1271.  
  1272.  
  1273. if (onPress && NETWORK_IS_PLAYER_ACTIVE((Player)Menu::currentop - 1))
  1274. {
  1275. if (featureIsNetworkList)
  1276. {
  1277. iSelectedPlayer = (Player)Menu::currentop - 1;
  1278. if (SUB::NETWORK_PLAYERS_OPTIONS != -1) Menu::SetSub_delayed = SUB::NETWORK_PLAYERS_OPTIONS;
  1279. }
  1280. else
  1281. {
  1282. Player playerIter = GET_PLAYER_PED(Menu::currentop - 1);
  1283. if (RequestControlOfEnt(iSelectedPed)) { }
  1284. switch (networkListActions)
  1285. {
  1286. case 0: switch (featureAttachPedToPlayer) {
  1287. case 0: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.2, 0, 0, 0, 0, 1, 1, 0, 1, 2, 1); break;
  1288. case 1: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, -0.3, 0, 0, 0, 0, 1, 1, 0, 1, 2, 1); break;
  1289. case 2: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.5, 0, 0, 0, 180, 1, 1, 0, 1, 2, 1); break;
  1290. case 3: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.3, 0.8, 0, 0, 180, 1, 1, 0, 1, 2, 1); break;
  1291. case 4: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.3, 0.7, 86.0, 0, 180, 1, 1, 0, 1, 2, 1); break;
  1292. case 5: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0.0, 0.3, -0.3, 13, 180, 0.0, 1, 1, 0, 1, 2, 1); break;
  1293. case 6: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0.2, 0.3, 0.9, 0.0, 0.0, -120.0, 1, 1, 0, 1, 2, 1); break;
  1294. case 7: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, -0.09, -0.01, -0.3, 13.02, 84.0, 96.0, 1, 1, 0, 1, 2, 1); break;
  1295. case 8: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0.11, 0.48, 1.13, -179.98, 100.0, -91.0, 1, 1, 0, 1, 2, 1); break;
  1296. case 9: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, -0.02, 0.32, 0.69, -51.98, -14.0999, 180.0, 1, 1, 0, 1, 2, 1); break;
  1297. case 10: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, 0.13, 0.56, -0.46, 0.0, 0.0, 84.0, 1, 1, 0, 1, 2, 1); break;
  1298. case 11: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, -0.09, -0.07, -0.15, -7.0, -87.0, -90.0, 1, 1, 0, 1, 2, 1); break;
  1299. case 12: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, 0.15, 0.14, 0.93, -168.0003, 73.0, -282.0, 1, 1, 0, 1, 2, 1); break;
  1300. case 13: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, -0.11, 0.08, -0.29, 10.0, 92.0, -288.0, 1, 1, 0, 1, 2, 1); break;
  1301. case 14: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, -0.09, 0.57, 0.55, 10.0, -305.0, 270.0, 1, 1, 0, 1, 2, 1); break;
  1302. case 15: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, 0, 0.0, 0.63, 0.73, 0.0, 0.0, 0.0, 1, 1, 0, 1, 2, 1); break;
  1303. } break;
  1304. case 1: TASK_COMBAT_PED(iSelectedPed, playerIter, 0, 16); break;
  1305. case 2: break;
  1306. case 3: for (int i = 0; i < 15; i++) { if (RequestControlOfEnt(s_ped[i])) TASK_COMBAT_PED(s_ped[i], playerIter, 0, 16);
  1307. } break;
  1308. case 4: for (int i = 0; i < 15; i++) { if (RequestControlOfEnt(s_ped[i]))
  1309. ATTACH_ENTITY_TO_ENTITY(s_ped[i], playerIter, GET_RANDOM_INT_IN_RANGE(0, 0xfcd9), GET_RANDOM_FLOAT_IN_RANGE(0, 3), GET_RANDOM_FLOAT_IN_RANGE(0, 3), GET_RANDOM_FLOAT_IN_RANGE(0, 3), 0, 0, 0, 1, 1, 1, 1, 2, 1);
  1310. }break;
  1311. case 5: entityObjectOps = playerIter; if (IS_PED_IN_ANY_VEHICLE(entityObjectOps, 1)) { entityObjectOps = GET_VEHICLE_PED_IS_IN(entityObjectOps, 1); } break;
  1312. case 6: whichBone = 1; featureAttToSomething = 3; netPlayerAttachment = playerIter; ATTACH_ENTITY_TO_ENTITY(entityObjectOps, netPlayerAttachment, -1, featureAttX, featureAttY, featureAttZ, featureAttPitch, featureAttRoll, featureAttYaw, 1, 1, 1, 1, 2, 1); if (SUB::ATTACHMENTOPTIONS != -1) Menu::SetSub_delayed = SUB::ATTACHMENTOPTIONS; break;
  1313. case 7: Vector3 tmp = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(playerIter, 0.0, 1.3, 0.0); networkSynchronisedScene(tmp.x, tmp.y, tmp.z, 0.0, 0.0, 0.0, GET_PLAYER_PED(iSelectedPlayer), "move_m@generic", "idle", 1); break;
  1314. case 8: bLoadFile = 1; fileLoadI = 4; break;
  1315. case 9: PlaceBounty(PLAYER_ID(), Menu::currentop - 1, featureBountyValue); break;
  1316. }
  1317. }
  1318.  
  1319. return; // Either use return; to exit to the switch if you don't have code below that you want executed.
  1320. }
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327. enum miscToggleActions {
  1328. MT_UNLIMITEDAMMO,
  1329. MT_LONG_LOCKON_RANGE,
  1330. MT_PLAYERSLIST_VEH_HANDLE,
  1331. MT_COPY_MODEL,
  1332. MT_CHAT_BYPASS,
  1333. MT_NITROUS_FX,
  1334. MT_ATTACH_VISE_VERSA,
  1335. };
  1336.  
  1337. switch (miscAction)
  1338. {
  1339. case 0: GiveAllWeapons(iSelectedPlayer, 1); ShowNotification("Gave Unlimited Ammo Weapons"); break;
  1340. case 1: featureHiddenLockonRange = !featureHiddenLockonRange; ShowNotification(featureHiddenLockonRange ? (char*)"Long Lockon Range ~g~ ON" : (char*)"Long Lockon Range ~r~ OFF"); break;
  1341. case 2: featureIsNetworkList = 0; networkListActions = 5; if (SUB::NETWORK_PLAYERS != -1) Menu::SetSub_delayed = SUB::NETWORK_PLAYERS; break;
  1342. case 3: featureCopyCopyModel = !featureCopyCopyModel; ShowNotification(featureCopyCopyModel ? (char*)"Copy Model ~g~ ON" : (char*)"Copy Model ~r~ OFF"); break;
  1343. case 4: featureChatBypass = !featureChatBypass; ShowNotification(featureChatBypass ? (char*)"Chat Bypass ~g~ ON" : (char*)"Chat Bypass ~r~ OFF"); break;
  1344. case 5: featureBoostNoCamFX = !featureBoostNoCamFX; ShowNotification(featureBoostNoCamFX ? (char*)"Cam FX ~g~ ON" : (char*)"Cam FX ~r~ OFF"); break;
  1345. case 6: featureAttachViseVersa = !featureAttachViseVersa; ShowNotification(featureAttachViseVersa ? (char*)"Attach Vise Versa ~g~ ON" : (char*)"Attach Vise Versa ~r~ OFF"); break;
  1346. }
  1347.  
  1348.  
  1349.  
  1350.  
  1351.  
  1352.  
  1353.  
  1354.  
  1355. void AddToggleM(char *text, miscToggleActions miscAction, bool isToggle = false, bool &pState = null, bool &option_code_bool = null, char *desc = NULL)
  1356. {
  1357. AddOption(text, null, nullFunc, -1, NULL, desc);
  1358. if (isToggle)
  1359. {
  1360. if (!pState) OptionStatus(0);
  1361. else if (pState) OptionStatus(1);
  1362. }
  1363. if (Menu::printingop == Menu::currentop)
  1364. {
  1365. if (IsOptionPressed()) { if (isToggle) { pState = !pState; } else if (&option_code_bool != &null) { option_code_bool = true; } }
  1366. toggleInstruction = 1;
  1367. if (IsOptionSJPressed())
  1368. {
  1369. switch (miscAction)
  1370. {
  1371. case 0: GiveAllWeapons(iSelectedPlayer, 1); ShowNotification("Gave Unlimited Ammo Weapons"); break;
  1372. case 1: featureHiddenLockonRange = !featureHiddenLockonRange; ShowNotification(featureHiddenLockonRange ? (char*)"Long Lockon Range ~g~ ON" : (char*)"Long Lockon Range ~r~ OFF"); break;
  1373. case 2: featureIsNetworkList = 0; networkListActions = 5; if (SUB::NETWORK_PLAYERS != -1) Menu::SetSub_delayed = SUB::NETWORK_PLAYERS; break;
  1374. case 3: featureCopyCopyModel = !featureCopyCopyModel; ShowNotification(featureCopyCopyModel ? (char*)"Copy Model ~g~ ON" : (char*)"Copy Model ~r~ OFF"); break;
  1375. case 4: featureChatBypass = !featureChatBypass; ShowNotification(featureChatBypass ? (char*)"Chat Bypass ~g~ ON" : (char*)"Chat Bypass ~r~ OFF"); break;
  1376. case 5: featureBoostNoCamFX = !featureBoostNoCamFX; ShowNotification(featureBoostNoCamFX ? (char*)"Cam FX ~g~ ON" : (char*)"Cam FX ~r~ OFF"); break;
  1377. case 6: featureAttachViseVersa = !featureAttachViseVersa; ShowNotification(featureAttachViseVersa ? (char*)"Attach Vise Versa ~g~ ON" : (char*)"Attach Vise Versa ~r~ OFF"); break;
  1378. }
  1379. }
  1380. }
  1381. }
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388. if (CFileExists(GET_CONFIG_PATH))
  1389. {
  1390. file = CReadFile(GET_CONFIG_PATH, &file_size);
  1391.  
  1392. featureDisplayInfo = GetPrivateProfileBool(APP_HAX_VALUES, "dispInfo", "0", file, file_size);
  1393. featureWorldPause = GetPrivateProfileBool(APP_HAX_VALUES, "pauseClock", "0", file, file_size);
  1394. //clockhour = GetPrivateProfileInt(APP_HAX_VALUES, "clockTime", GET_CLOCK_HOURS(), file, file_size);
  1395. weatherTypeIndex = GetPrivateProfileInt(APP_HAX_VALUES, "weather", 4, file, file_size);
  1396. GetPrivateProfileString(APP_HAX_VALUES, "nameChange", "DEFAULT", nameChangeEx, 24, file, file_size); if (strcmp("DEFAULT", nameChangeEx)) { psnchangeName = nameChangeEx; featurePSNChangeI = 1; }
  1397.  
  1398. spoofRankValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofRankValue", 53, file, file_size);
  1399. spoofWalletValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofWalletValue", 0, file, file_size);
  1400. spoofKillsValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofKillsValue", 75, file, file_size);
  1401. spoofDeathsValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofDeathValue", 100, file, file_size);
  1402.  
  1403. featureInvincibility = GetPrivateProfileBool(APP_HAX_VALUES, "pInvincible", "0", file, file_size);
  1404. featureSuperJump = GetPrivateProfileBool(APP_HAX_VALUES, "pSupJump", "0", file, file_size);
  1405. featureSuperRun = GetPrivateProfileBool(APP_HAX_VALUES, "pSupRun", "0", file, file_size);
  1406. featureNeverWanted = GetPrivateProfileBool(APP_HAX_VALUES, "pNoWant", "0", file, file_size);
  1407. featurSonicRun = GetPrivateProfileBool(APP_HAX_VALUES, "pSanicRun", "0", file, file_size);
  1408.  
  1409. featureWeaponNoReload = GetPrivateProfileBool(APP_HAX_VALUES, "wInfAmmo", "0", file, file_size);
  1410.  
  1411. featureVehicleInvincibility = GetPrivateProfileBool(APP_HAX_VALUES, "veInvincible", "0", file, file_size);
  1412. featureAutoRepair = GetPrivateProfileBool(APP_HAX_VALUES, "veAutoFix", "0", file, file_size);
  1413. featureNitrous = GetPrivateProfileBool(APP_HAX_VALUES, "veHornBoost", "0", file, file_size);
  1414.  
  1415. featureVehWarpInSpawned = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnInVehic", "0", file, file_size);
  1416. featurePreUpgraded = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnPreMax", "0", file, file_size);
  1417. featureInvincibleVehicleOnSpawn = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnInvincible", "0", file, file_size);
  1418. featureAddBlipToSpawnVeh = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnWBlip", "0", file, file_size);
  1419. featureVehicleSpawnerDeletePrevious = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnDeletePre", "0", file, file_size);
  1420. featureVehicleSpawnerWitUpgrades = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnWMods", "0", file, file_size);
  1421. GetPrivateProfileString(APP_HAX_VALUES, "veSpawnPlateTxt", "Semjases", plateTxt, 14, file, file_size); vehicleSpawnerPlateText = plateTxt;
  1422. featureVehicleSpawnerPlateType = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnPlateType", 1, file, file_size);
  1423. featureVehicleSpawnerPriamyColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnPrimColo", 145, file, file_size);
  1424. featureVehicleSpawnerSecondaryColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnSecondColo", 10, file, file_size);
  1425. featureVehicleSpawnerPearlescentColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnPearl", 38, file, file_size);
  1426. featureVehicleSpawnerWheelColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnWheelCol", 145, file, file_size);
  1427. GetPrivateProfileString(APP_HAX_VALUES, "veSpawnCustPrimary", "#320642", r_vehprim, 14, file, file_size); rgb = HexToRGB(r_vehprim); vehSpawnCustomP.R = rgb.R, vehSpawnCustomP.G = rgb.G, vehSpawnCustomP.B = rgb.B;
  1428. GetPrivateProfileString(APP_HAX_VALUES, "veSpawnCustSecondary", "#23292E", r_vehsec, 14, file, file_size); rgb = HexToRGB(r_vehsec); vehSpawnCustomS.R = rgb.R, vehSpawnCustomS.G = rgb.G, vehSpawnCustomS.B = rgb.B;
  1429. featureVehicleSpawnerWheelType = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnWheelType", 7, file, file_size);
  1430. featureVehicleSpawnerWheelIndex = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnWheelIndex", 8, file, file_size);
  1431.  
  1432. featureShowChat = GetPrivateProfileBool(APP_HAX_VALUES, "neChat", "1", file, file_size);
  1433. featureAllClientsESP = GetPrivateProfileBool(APP_HAX_VALUES, "neESP", "0", file, file_size);
  1434. featureAllESPType = GetPrivateProfileInt(APP_HAX_VALUES, "neESPType", 2, file, file_size);
  1435.  
  1436. featureProtectionCTask = GetPrivateProfileBool(APP_HAX_VALUES, "disTask", "0", file, file_size);
  1437. featureProtectionNaughty = GetPrivateProfileBool(APP_HAX_VALUES, "expRemWp", "0", file, file_size);
  1438. featureProtectionTask = GetPrivateProfileBool(APP_HAX_VALUES, "tasks", "0", file, file_size);
  1439. featureProtectionPTFX = GetPrivateProfileBool(APP_HAX_VALUES, "fxProtx", "0", file, file_size);
  1440. featureProtectionVehicleControl = GetPrivateProfileBool(APP_HAX_VALUES, "veContr", "0", file, file_size);
  1441. featureProtectionWantedLvl = GetPrivateProfileBool(APP_HAX_VALUES, "Wantedlvl", "0", file, file_size);
  1442. featureProtectionScriptedGame = GetPrivateProfileBool(APP_HAX_VALUES, "nonHostKick", "0", file, file_size);
  1443. featureProtectionSound = GetPrivateProfileBool(APP_HAX_VALUES, "sounds", "0", file, file_size);
  1444. featureProtectionClones = GetPrivateProfileBool(APP_HAX_VALUES, "clones", "0", file, file_size);
  1445. featureProtectionFreeze = GetPrivateProfileBool(APP_HAX_VALUES, "freezeProtx", "0", file, file_size);
  1446. featureProtectionAttach = GetPrivateProfileBool(APP_HAX_VALUES, "attachment", "0", file, file_size);
  1447. featureProtectionFPS = GetPrivateProfileBool(APP_HAX_VALUES, "fpsProtx", "0", file, file_size);
  1448.  
  1449. loop_RainbowBoxes = GetPrivateProfileBool(APP_COLOURS, "rainbow_mode", "0", file, file_size);
  1450. GetPrivateProfileString(APP_COLOURS, "mTitletext", "#FFFFFF", mTitletext, 14, file, file_size); rgb = HexToRGB(mTitletext); maintitletext.R = rgb.R, maintitletext.G = rgb.G, maintitletext.B = rgb.B;
  1451. GetPrivateProfileString(APP_COLOURS, "mTitlebox", "#7800B4", mTitlebox, 14, file, file_size); rgb = HexToRGB(mTitlebox); maintitlebox.R = rgb.R, maintitlebox.G = rgb.G, maintitlebox.B = rgb.B;
  1452. GetPrivateProfileString(APP_COLOURS, "titlebox", "#A020F0", r_titlebox, 14, file, file_size); rgb = HexToRGB(r_titlebox); titlebox.R = rgb.R, titlebox.G = rgb.G, titlebox.B = rgb.B;
  1453. GetPrivateProfileString(APP_COLOURS, "BG", "#141414", r_BG, 14, file, file_size); rgb = HexToRGB(r_BG); BG.R = rgb.R, BG.G = rgb.G, BG.B = rgb.B;
  1454. GetPrivateProfileString(APP_COLOURS, "titletext", "#FFFFFF", r_titletext, 14, file, file_size); rgb = HexToRGB(r_titletext); titletext.R = rgb.R, titletext.G = rgb.G, titletext.B = rgb.B;
  1455. GetPrivateProfileString(APP_COLOURS, "optiText", "#FFFFFF", r_optiontext, 14, file, file_size); rgb = HexToRGB(r_optiontext);optiontext.R = rgb.R, optiontext.G = rgb.G, optiontext.B = rgb.B;
  1456. GetPrivateProfileString(APP_COLOURS, "selText", "#FF66FF", r_selectedtext, 14, file, file_size); rgb = HexToRGB(r_selectedtext); selectedtext.R = rgb.R, selectedtext.G = rgb.G, selectedtext.B = rgb.B;
  1457. GetPrivateProfileString(APP_COLOURS, "selBox", "#FFFFFF", r_selectionhi, 14, file, file_size); rgb = HexToRGB(r_selectionhi); selectionhi.R = rgb.R, selectionhi.G = rgb.G, selectionhi.B = rgb.B;
  1458.  
  1459. open_button_1 = GetPrivateProfileInt(APP_SETTINGS, "bind1", 201, file, file_size);
  1460. open_button_2 = GetPrivateProfileInt(APP_SETTINGS, "bind2", 204, file, file_size);
  1461. GetPrivateProfileString(APP_SETTINGS, "menuPosX", "0.69299", menux, 14, file, file_size); menuPos.x = myAtof(menux);
  1462. GetPrivateProfileString(APP_SETTINGS, "menuPosY", "0", menuy, 14, file, file_size); menuPos.y = myAtof(menuy);
  1463. featureExcludeFriends = GetPrivateProfileBool(APP_SETTINGS, "exludFriends", "0", file, file_size);
  1464. featureExcludeCrew = GetPrivateProfileBool(APP_SETTINGS, "exludCrew", "0", file, file_size);
  1465. featureExcludeTeam = GetPrivateProfileBool(APP_SETTINGS, "exludTeam", "0", file, file_size);
  1466. featureExcludeModder = GetPrivateProfileBool(APP_SETTINGS, "exludModr", "0", file, file_size);
  1467. featureKickModders = GetPrivateProfileBool(APP_SETTINGS, "kickModders", "0", file, file_size);
  1468. snaplineToClients = GetPrivateProfileBool(APP_SETTINGS, "snapline_clients", "0", file, file_size);
  1469. featureTeleportWithNearPlayers = GetPrivateProfileBool(APP_SETTINGS, "tele_w_near_players", "0", file, file_size);
  1470. featureActivationSmoke = GetPrivateProfileBool(APP_SETTINGS, "activeSmoke", "1", file, file_size);
  1471.  
  1472. font_title = GetPrivateProfileInt(APP_FONTS, "title", 7, file, file_size);
  1473. font_options = GetPrivateProfileInt(APP_FONTS, "options", 4, file, file_size);
  1474. font_selection = GetPrivateProfileInt(APP_FONTS, "selection", 4, file, file_size);
  1475. GetPrivateProfileString(APP_FONTS, "size", "0.41", sFontScale, 14, file, file_size); fontScale = myAtof(sFontScale);
  1476. }
  1477.  
  1478.  
  1479.  
  1480.  
  1481. //364 kick from apartment/ 5 params
  1482. int Var0[5];
  1483. Var0[0] = 364;
  1484. Var0[1] = iSelectedPlayer;
  1485. Var0[2] = apartmentIdd; //apartment id
  1486. Var0[3] = 0; //0
  1487. Var0[4] = 1; //0
  1488. TriggerScriptEvent(Var0, 5, PLAYER_ID());
  1489.  
  1490. //0-n
  1491. //1-n
  1492. //2 - eclips towers
  1493. //3-n
  1494. //4- ecplis towers
  1495. //5- 3 alta st apt 10
  1496. //6- 3 alta st apt 57
  1497. //7- del perro heights apt 20
  1498. //8- 1162 power st, apt 3
  1499. //9- 0605 spanish ave, apt 1
  1500. //10- 0604 las laganas blvd, apt 4
  1501. //11- 0184 milton rd, apt 13
  1502. //12- the royale, apy 19
  1503. //13- 0504 s mo milton dr
  1504. //14- 0115 bay city ave, apy 45
  1505. //15- 0325 south rockford dr
  1506. //16- dream tower, apt 15
  1507. //17- 2143 las lagunas blvd, apt 9
  1508. //18- 1561 san vitas st, apt 2
  1509. //19- 0112 s rockford dr, apt 13
  1510. //20- 2057 verpucci blcd, apt 1
  1511. //21- 0069 couger ave, apt 19
  1512. //22- 1237 prosperity st, apt 21
  1513. //23- 115 blvd perro, apt 18
  1514.  
  1515.  
  1516. int vVar0[3];
  1517. vVar0[0] = 2;
  1518. vVar0[1] = iSelectedPlayer;
  1519. vVar0[2] = valueee;
  1520. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  1521. //vVar0[2]
  1522. //35 Name has activated their Brodcast app
  1523. //35 Name has deactivated their Brodcast app
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529. const int objectspawneritemCount = 11, objectspawnerlineCount = 19, objectspawneritemCountLastLine = objectspawneritemCount;
  1530.  
  1531. int objectspawnerActiveLineIndex;
  1532. bool featureJurisdiction;
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539. switch (selectedOption())
  1540. {
  1541. case 0: break;
  1542. default:
  1543. AllWorldObjects[featureWorldObjectsSlot] = ObjectCreater(objectModelHashes[objectspawnerActiveLineIndex][Menu::currentop - 1]);
  1544. break;
  1545. }
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551. SetupDraw();
  1552. SET_TEXT_FONT(0);
  1553. SET_TEXT_SCALE(0.0f, 0.31f);
  1554. SET_TEXT_JUSTIFICATION(2);
  1555. SET_TEXT_WRAP(0.0f, 0.2677f + menuPos.x);
  1556. SET_TEXT_CENTRE(0);
  1557. SET_TEXT_COLOUR(optioncount.R, optioncount.G, optioncount.B, optioncount.A);
  1558.  
  1559. BEGIN_TEXT_COMMAND_DISPLAY_TEXT("CM_ITEM_COUNT");
  1560. ADD_TEXT_COMPONENT_INTEGER(featureuseDefault ? currentop : (featureJurisdiction ? skinchangerActiveLineIndex + 1 : objectspawnerActiveLineIndex + 1)); // ! currentop_w_breaks
  1561. ADD_TEXT_COMPONENT_INTEGER(featureuseDefault ? totalop : (featureJurisdiction ? skinchangerlineCount : objectspawnerlineCount)); // ! totalop - totalbreaks
  1562. END_TEXT_COMMAND_DISPLAY_TEXT(0.2677f + menuPos.x, 0.13f + menuPos.y);
  1563.  
  1564.  
  1565.  
  1566.  
  1567. void AddXaxis(char *text, int toUse)
  1568. {
  1569. Menu::printingop++;
  1570. SetupDraw(0);
  1571. SET_TEXT_FONT(font_options);
  1572. SET_TEXT_COLOUR(optiontext.R, optiontext.G, optiontext.B, optiontext.A);
  1573. if (Menu::printingop == Menu::currentop)
  1574. {
  1575. navInstruction = 1;
  1576. featureuseDefault = 0;
  1577. SET_TEXT_FONT(font_selection);
  1578. SET_TEXT_COLOUR(selectedtext.R, selectedtext.G, selectedtext.B, selectedtext.A);
  1579. /*if (IsOptionPressed())
  1580. {
  1581.  
  1582. }*/
  1583. }
  1584.  
  1585. DrawString(text, ((float)Menu::printingop * 0.0900f - 0.0300), 0.300f);
  1586. switch (toUse)
  1587. {
  1588. case 0:
  1589. if (skinchangerActiveLineIndex == (skinchangerlineCount - 1))
  1590. if ((int)Menu::currentop >= skinchangeritemCountLastLine)
  1591. Menu::currentop = 1;
  1592.  
  1593. break;
  1594. case 1:
  1595. if (objectspawnerActiveLineIndex == (objectspawnerlineCount - 1))
  1596. if ((int)Menu::currentop >= objectspawneritemCountLastLine)
  1597. Menu::currentop = 1;
  1598. break;
  1599. }
  1600.  
  1601. }
  1602.  
  1603.  
  1604.  
  1605. static void DetectJurisdiction(int scrollIndex, bool isSkinChanger)
  1606. {
  1607. if (isSkinChanger)
  1608. {
  1609. switch (scrollIndex)
  1610. {
  1611. case 0:
  1612. if (skinchangerActiveLineIndex == 0)
  1613. skinchangerActiveLineIndex = skinchangerlineCount;
  1614. skinchangerActiveLineIndex--;
  1615. PlaySoundFrontend_default("YES");
  1616. break;
  1617. case 1:
  1618. skinchangerActiveLineIndex++;
  1619. if (skinchangerActiveLineIndex == skinchangerlineCount)
  1620. skinchangerActiveLineIndex = 0;
  1621. PlaySoundFrontend_default("YES");
  1622. break;
  1623. case 2:
  1624. currentop++;
  1625. int itemsMax = (skinchangerActiveLineIndex == (skinchangerlineCount - 1)) ? skinchangeritemCountLastLine : skinchangeritemCount;
  1626. if (currentop == itemsMax)
  1627. currentop = 1;
  1628. PlaySoundFrontend_default("NAV_UP_DOWN");
  1629. break;
  1630. case 3:
  1631. if (currentop == 1)
  1632. currentop = (skinchangerActiveLineIndex == (skinchangerlineCount - 1)) ? skinchangeritemCountLastLine : skinchangeritemCount;
  1633. currentop--;
  1634. PlaySoundFrontend_default("NAV_UP_DOWN");
  1635. break;
  1636. }
  1637. }
  1638. else
  1639. {
  1640. switch (scrollIndex)
  1641. {
  1642. case 0:
  1643. if (objectspawnerActiveLineIndex == 0)
  1644. objectspawnerActiveLineIndex = objectspawnerlineCount;
  1645. objectspawnerActiveLineIndex--;
  1646. PlaySoundFrontend_default("YES");
  1647. break;
  1648. case 1:
  1649. objectspawnerActiveLineIndex++;
  1650. if (objectspawnerActiveLineIndex == objectspawnerlineCount)
  1651. objectspawnerActiveLineIndex = 0;
  1652. PlaySoundFrontend_default("YES");
  1653. break;
  1654. case 2:
  1655. currentop++;
  1656. int itemsMax2 = (objectspawnerActiveLineIndex == (objectspawnerlineCount - 1)) ? objectspawneritemCountLastLine : objectspawneritemCount;
  1657. if (currentop == itemsMax2)
  1658. currentop = 1;
  1659. PlaySoundFrontend_default("NAV_UP_DOWN");
  1660. break;
  1661. case 3:
  1662. if (currentop == 1)
  1663. currentop = (objectspawnerActiveLineIndex == (objectspawnerlineCount - 1)) ? objectspawneritemCountLastLine : objectspawneritemCount;
  1664. currentop--;
  1665. PlaySoundFrontend_default("NAV_UP_DOWN");
  1666. break;
  1667. }
  1668. }
  1669. }
  1670.  
  1671.  
  1672.  
  1673. if (menu_up_pressed(1))
  1674. {
  1675. if (featureuseDefault)
  1676. if (currentop == 1) Bottom(); else Up();
  1677. else
  1678. DetectJurisdiction(0, featureJurisdiction);
  1679. }
  1680.  
  1681. // Scroll down
  1682. if (menu_down_pressed(1))
  1683. {
  1684. if (featureuseDefault)
  1685. if (currentop == totalop) Top(); else Down();
  1686. else
  1687. DetectJurisdiction(1, featureJurisdiction);
  1688. }
  1689.  
  1690. if (!featureuseDefault)
  1691. {
  1692. //Scroll right
  1693. if (IS_DISABLED_CONTROL_JUST_PRESSED(2, INPUT_SCRIPT_PAD_RIGHT))
  1694. {
  1695. DetectJurisdiction(2, featureJurisdiction);
  1696. }
  1697.  
  1698. //Scroll left
  1699. if (IS_DISABLED_CONTROL_JUST_PRESSED(2, INPUT_SCRIPT_PAD_LEFT))
  1700. {
  1701. DetectJurisdiction(3, featureJurisdiction);
  1702. }
  1703. }
  1704.  
  1705.  
  1706.  
  1707.  
  1708. int Var0[2];
  1709. Var0[0] = 52;
  1710. Var0[1] = iSelectedPlayer;
  1711. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  1712.  
  1713.  
  1714. int Var0[4];
  1715. Var0[0] = 47;
  1716. Var0[1] = iSelectedPlayer;
  1717. Var0[2] = 1;
  1718. Var0[3] = valueee; //player
  1719. TriggerScriptEvent(Var0, 4, iSelectedPlayer);
  1720.  
  1721.  
  1722. int vVar0[3];
  1723. vVar0[0] = 39;
  1724. vVar0[1] = iSelectedPlayer;
  1725. vVar0[2] = valueee;
  1726. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  1727.  
  1728. int Var0[4];
  1729. Var0[0] = 49;
  1730. Var0[1] = iSelectedPlayer;
  1731. Var0[2] = valueee;
  1732. Var0[3] = valueee2;
  1733. TriggerScriptEvent(Var0, 4, iSelectedPlayer);
  1734.  
  1735. int Var0[10];
  1736. Var0[0] = 37;
  1737. Var0[1] = iSelectedPlayer;
  1738. Var0[2] = valueee2; //player2
  1739. //Var0[3] = uParam2;
  1740. //Var0[4] = uParam0;
  1741. //Var0[5] = uParam3;
  1742. Var0[9] = 1;
  1743. Var0[6] = valueee;
  1744. //Var0[7] = uParam5;
  1745. Var0[8] = -1;
  1746. TriggerScriptEvent(Var0, 10, iSelectedPlayer);
  1747.  
  1748.  
  1749. int Var0[5];
  1750. Var0[0] = 38;
  1751. Var0[1] = iSelectedPlayer;
  1752. Var0[2] = valueee;
  1753. Var0[3] = GET_TIME_DIFFERENCE(GET_NETWORK_TIME(), _GET_POSIX_TIME());
  1754. Var0[4] = valueee2;
  1755. TriggerScriptEvent(Var0, 5, iSelectedPlayer);
  1756.  
  1757. //invite
  1758. int Var0[2];
  1759. Var0[0] = 32;
  1760. Var0[1] = iSelectedPlayer;
  1761. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  1762.  
  1763. int Var0[5];
  1764. Var0[0] = 50;
  1765. Var0[1] = iSelectedPlayer;
  1766. Var0[2] = valueee;
  1767. Var0[3] = valueee2;
  1768. Var0[4] = 0.0f;//vector coords
  1769. TriggerScriptEvent(Var0, 7, iSelectedPlayer);
  1770.  
  1771. int Var0[2];
  1772. Var0[0] = 51;
  1773. Var0[1] = iSelectedPlayer;
  1774. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  1775.  
  1776. int Var0[2];
  1777. Var0[0] = 33;
  1778. Var0[1] = iSelectedPlayer;
  1779. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  1780.  
  1781.  
  1782. int Var0[4];
  1783. Var0[0] = 48;
  1784. Var0[1] = iSelectedPlayer;
  1785. Var0[2] = valueee;
  1786. Var0[3] = valueee2;
  1787. TriggerScriptEvent(Var0, 4, iSelectedPlayer);
  1788.  
  1789. int Var1[2];
  1790. Var1[0] = 200;
  1791. Var1[1] = iSelectedPlayer;
  1792. TriggerScriptEvent(Var1, 2, iSelectedPlayer);
  1793.  
  1794.  
  1795. int Var0[15];
  1796. Var0[0] = 181;
  1797. Var0[1] = iSelectedPlayer;
  1798. Var0[2] = GlobalVariable::Read(1838493);
  1799. Var0[3] = GlobalVariable::Read(1838493 + 1);
  1800. Var0[4] = 0;
  1801. Var0[5] = GlobalVariable::Read(1838493 + 2);
  1802. Var0[8] = GlobalVariable::Read(1838493 + 5);
  1803. Var0[14] = GlobalVariable::Read(2399048 + 1 + 1481 + 13);
  1804. TriggerScriptEvent(Var0, 15, iSelectedPlayer);
  1805.  
  1806.  
  1807. int vVar0[3];
  1808. vVar0[0] = 298;
  1809. vVar0[1] = iSelectedPlayer;
  1810. vVar0[2] = handle.netHandle;
  1811. TriggerScriptEvent(vVar0, 15, iSelectedPlayer);
  1812.  
  1813. int vVar0[3];
  1814. vVar0[0] = 353;
  1815. vVar0[1] = iSelectedPlayer;
  1816. vVar0[2] = valueee;
  1817. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  1818.  
  1819.  
  1820.  
  1821. int Var0[7];
  1822. Var0[0] = 301;
  1823. Var0[1] = iSelectedPlayer;
  1824. Var0[2] = 24.2819f;
  1825. Var0[5] = 24.2819f;
  1826. Var0[6] = 24.2819f;
  1827. TriggerScriptEvent(Var0, 7, iSelectedPlayer);
  1828.  
  1829.  
  1830.  
  1831. int Var0[17];
  1832. Var0[2] = 3;
  1833. //Var0[2].imm_10 = 3;
  1834. Var0[0] = 7;
  1835. Var0[1] = iSelectedPlayer;
  1836. Var0[16] = valueee;
  1837. TriggerScriptEvent(Var0, 17, iSelectedPlayer);
  1838.  
  1839.  
  1840. int vVar0[3];
  1841. vVar0[0] = 287;
  1842. vVar0[1] = iSelectedPlayer;
  1843. vVar0[2] = GlobalVariable::Read(2387551); //vector coords
  1844. TriggerScriptEvent(vVar0, 5, iSelectedPlayer);
  1845.  
  1846.  
  1847. int vVar0[3];
  1848. //vVar0.imm_2.imm_14 = 10;
  1849. vVar0[0] = 297;
  1850. vVar0[1] = iSelectedPlayer;
  1851. vVar0[3] = handle.netHandle;
  1852. //vVar0.imm_2.imm_13 = 1;
  1853. //vVar0.imm_2.imm_14[0 <2>] = uParam0;
  1854. //vVar0.imm_2.imm_14[0 <2>].imm_1 = uParam1;
  1855. TriggerScriptEvent(vVar0, 37, iSelectedPlayer)
  1856.  
  1857.  
  1858. int vVar0[3];
  1859. vVar0[1] = iSelectedPlayer;
  1860. vVar0[0] = 298;
  1861. vVar0[2] = handle.netHandle;
  1862. TriggerScriptEvent(vVar0, 15, iSelectedPlayer);
  1863.  
  1864. int Var0[11];
  1865. Var0[0] = 304;
  1866. Var0[1] = iSelectedPlayer;
  1867. Var0[2] = 0;
  1868. Var0[3] = 1;
  1869. Var0[4] = 0;
  1870. Var0[5] = 0;
  1871. Var0[6] = 0;
  1872. Var0[7] = 0;
  1873. Var0[8] = 0;
  1874. Var0[9] = 0;
  1875. Var0[10] = 0;
  1876. TriggerScriptEvent(Var0, 11, iSelectedPlayer);
  1877.  
  1878.  
  1879. int Var0[2];
  1880. Var0[0] = 228;
  1881. Var0[1] = iSelectedPlayer;
  1882. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  1883.  
  1884.  
  1885. int vVar0[3];
  1886. vVar0[0] = 158;
  1887. vVar0[1] = iSelectedPlayer;
  1888. int uVar0;
  1889. SET_BIT(&uVar0, iSelectedPlayer);
  1890. vVar0[2] = valueee; //valueee
  1891. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  1892.  
  1893.  
  1894. int vVar0[3];
  1895. int iVar2;
  1896. int iVar3;
  1897. int iVar4;
  1898. vVar0[0] = 308;
  1899. vVar0[1] = iSelectedPlayer;
  1900. NETWORK_GET_LOCAL_HANDLE(&handle.netHandle, 13);
  1901. vVar0[2] = handle.netHandle;
  1902. //iVar4 = 0;
  1903. //set_bit(&iVar4, 0);
  1904. //vVar0.imm_2.imm_13 = iVar4;
  1905. //vVar0.imm_2.imm_19 = 1;
  1906. //vVar0.imm_2.imm_20 = 1;
  1907. //vVar0.imm_2.imm_14 = func_818(player_id());
  1908. //StringCopy(&vVar0.imm_2.imm_15, "", 16);
  1909. TriggerScriptEvent(vVar0, 23, iSelectedPlayer);
  1910.  
  1911.  
  1912. //joined a job
  1913. _debuging Var00;
  1914. //int Var0[19];
  1915. Var00.var = 162;
  1916. Var00.var1 = iSelectedPlayer;
  1917. Var00.var2 = GlobalVariable::GetString(2378444 + 2); //string param
  1918. Var00.var18 = GlobalVariable::Read(2378444 + 18);
  1919. int uVar0;
  1920. SET_BIT(&uVar0, iSelectedPlayer);
  1921. TRIGGER_SCRIPT_EVENT2(1, &Var00, 19, uVar0);
  1922.  
  1923.  
  1924. int vVar0[3];
  1925. vVar0[0] = 352;
  1926. vVar0[1] = iSelectedPlayer;
  1927. vVar0[2] = valueee;
  1928. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  1929.  
  1930.  
  1931. int Var0[2];
  1932. Var0[0] = 350;
  1933. Var0[1] = iSelectedPlayer;
  1934. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  1935.  
  1936.  
  1937. int Var0[7];
  1938. Vector3 t, t2;
  1939. t.x = 100.0;
  1940. t.y = 50.0;
  1941. t.z = 20.0;
  1942. t2.x = 0.0f;
  1943. t2.y = 0.0f;
  1944. t2.z = 180.0f;
  1945. Var0[0] = 349;
  1946. Var0[1] = iSelectedPlayer;
  1947. Var0[2] = valueee;
  1948. //Var0[3] = (int)t; //cords
  1949. //Var0[6] = (int)t2; //offset
  1950. TriggerScriptEvent(Var0, 9, iSelectedPlayer);
  1951.  
  1952.  
  1953. int Var0[2];
  1954. Var0[0] = 348;
  1955. Var0[1] = iSelectedPlayer;
  1956. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  1957.  
  1958.  
  1959. int Var0[2];
  1960. Var0[0] = 351;
  1961. Var0[1] = iSelectedPlayer;
  1962. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  1963.  
  1964.  
  1965. int Var0[2];
  1966. Var0[0] = 346;
  1967. Var0[1] = iSelectedPlayer;
  1968. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  1969.  
  1970. int Var0[6];
  1971. Var0[0] = 347;
  1972. Var0[1] = iSelectedPlayer;
  1973. Var0[2] = GlobalVariable::Read(2415231);
  1974. Var0[3] = GlobalVariable::Read(2415232);
  1975. Var0[4] = GET_STREAM_PLAY_TIME();
  1976. Var0[5] = valueee; //player
  1977. TriggerScriptEvent(Var0, 6, iSelectedPlayer);
  1978.  
  1979.  
  1980.  
  1981. typedef struct
  1982. {
  1983. /*int vVar0[3];
  1984. vVar0[0] = 298;
  1985. vVar0[1] = iSelectedPlayer;
  1986. vVar0[2] = handle;*/
  1987. int arg;
  1988. int player;
  1989. networkHandleMgr netHandle;
  1990. } _noonon;
  1991. typedef struct
  1992. {
  1993. /*int vVar0[3];
  1994. vVar0[0] = 287;
  1995. vVar0[1] = iSelectedPlayer;
  1996. vVar0[2] = { vParam0 };
  1997. */
  1998. int arg;
  1999. int player;
  2000. Vector3 coords;
  2001. } _ceinema;
  2002. typedef struct
  2003. {
  2004. int p0;
  2005. int p1;
  2006. int p2;
  2007. float p3;
  2008. int p4;
  2009. int p5;
  2010. int p6;
  2011. int p7;
  2012. int p8;
  2013. int p9;
  2014. int p10;
  2015. int p11;
  2016. int p12;
  2017. int p13;
  2018. } unknown;
  2019. typedef struct
  2020. {
  2021. Vector3 p0;
  2022. int p1;
  2023. int p2;
  2024. float p3;
  2025. int p4;
  2026. int p5;
  2027. int p6;
  2028. int p7;
  2029. int p8;
  2030. int p9;
  2031. int p10;
  2032. int p11;
  2033. int p12;
  2034. int p13;
  2035. int p14;
  2036. int p15;
  2037. int p16;
  2038. int p17;
  2039. int p18;
  2040. int p19;
  2041. int p20;
  2042. int p21;
  2043. int p22;
  2044. int p23;
  2045. int p24;
  2046. int p25;
  2047. int p26;
  2048. int p27;
  2049. int p28;
  2050. int p29;
  2051. int p30;
  2052. int p31;
  2053. int p32;
  2054. int p33;
  2055. int p34;
  2056. int p35;
  2057. int p36;
  2058. int p37;
  2059. int p38;
  2060. int p39;
  2061. int p40;
  2062. int p41;
  2063. int p42;
  2064. int p43;
  2065. } l_struct;
  2066. typedef struct
  2067. {
  2068. /*Var0[0] = 301;
  2069. Var0[1] = iSelectedPlayer;
  2070. Var0[2] = { vParam0 }; //coords
  2071. Var0[5] = uParam1; //vector3
  2072. Var0[6] = uParam2; //struct
  2073. */
  2074. int arg;
  2075. int player;
  2076. Vector3 coords;
  2077. int unk;
  2078. int unk2;
  2079. Vector3 rot;
  2080. l_struct _struct;
  2081. } thisStructMain;
  2082.  
  2083.  
  2084.  
  2085. //217
  2086. //set globals to increase value
  2087. /* int max_value = 50000;
  2088. int Global_262145_f_4814 = GlobalVariable::Get(Global_262145 + 4814);
  2089. printf("Global_262145_f_4814: %i\n", Global_262145_f_4814);
  2090.  
  2091. int Global_2097152 = GlobalVariable::Get(2097152 + (iSelectedPlayer * 7586) + 5327 + 678);
  2092. printf("Global_2097152: %i\n", Global_2097152);
  2093.  
  2094. GlobalVariable::Write(Global_262145 + 4814, max_value + Global_2097152);
  2095.  
  2096. GlobalVariable::Write(2097152 + (iSelectedPlayer * 7586) + 5327 + 678, Global_2097152 + max_value);
  2097. */
  2098.  
  2099. int max_value = 50000;
  2100. int Global_262145_f_4814 = GlobalVariable::Get(Global_262145 + 4814);
  2101. printf("Global_262145_f_4814: %i\n", Global_262145_f_4814);
  2102.  
  2103. int Global_2097152 = GlobalVariable::Get(2097152 + (iSelectedPlayer* 7586) + 5327 + 678);
  2104. printf("Global_2097152: %i\n", Global_2097152);
  2105.  
  2106.  
  2107. GlobalVariable::Write(Global_262145 + 4814, max_value/*max_value + Global_2097152*/);
  2108.  
  2109.  
  2110. GlobalVariable::Write(Global_1581767 + (iSelectedPlayer* 306) + 178 + 4, max_value);
  2111. int global_02 = GlobalVariable::Get(Global_1581767 + (iSelectedPlayer* 306) + 178 + 3) + max_value;
  2112.  
  2113. GlobalVariable::Write(Global_1581767 + (iSelectedPlayer*306) + 178 + 3, global_02);
  2114.  
  2115. //GlobalVariable::Write(2097152 + (iSelectedPlayer* 7586) + 5327 + 678, Global_2097152 + max_value);
  2116.  
  2117. int vVar0[3];
  2118. vVar0[0] = 219;
  2119. vVar0[1] = iSelectedPlayer;
  2120. vVar0[2] = 9999;
  2121. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2122.  
  2123.  
  2124. int Var0[2];
  2125. Var0[0] = 311;
  2126. Var0[1] = iSelectedPlayer;
  2127. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  2128.  
  2129. //55
  2130. int Var0[7];
  2131. Var0[0] = 55;
  2132. Var0[1] = iSelectedPlayer;
  2133. Var0[4] = 0;
  2134. Var0[5] = 0;
  2135. Var0[2] = (float)0.0f;
  2136. Var0[3] = 0;
  2137. Var0[6] = 1;
  2138. TriggerScriptEvent(Var0, 7, iSelectedPlayer);
  2139.  
  2140.  
  2141.  
  2142. int Var1[2];
  2143. Var1[0] = 200;
  2144. Var1[1] = iSelectedPlayer;
  2145. TriggerScriptEvent(Var1, 2, iSelectedPlayer);
  2146.  
  2147.  
  2148. int Var0[4];
  2149. Var0[0] = 237;
  2150. Var0[1] = iSelectedPlayer;
  2151. Var0[2] = 1; //0
  2152. Var0[3] = 0; //99999
  2153. //iParam3 = iParam3;
  2154. //(uParam4[0 *80])->f_6 = (uParam4[0 *80])->f_6;
  2155. TriggerScriptEvent(Var0, 10, iSelectedPlayer);
  2156.  
  2157. //vehicle
  2158. int vVar0[3];
  2159. vVar0[0] = 353;
  2160. vVar0[1] = iSelectedPlayer;
  2161. vVar0[2] = myVeh; //entity
  2162. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2163.  
  2164.  
  2165. //prostitut
  2166. int Var0[2];
  2167. Var0[0] = 228;
  2168. Var0[1] = iSelectedPlayer;
  2169. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  2170.  
  2171. //
  2172. int Var0[2];
  2173. Var0[0] = 192;
  2174. Var0[1] = iSelectedPlayer;
  2175. GlobalVariable::Write(Global_2394218 + 2808, 1);
  2176. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  2177.  
  2178.  
  2179. int vVar0[3];
  2180. vVar0[0] = 158;
  2181. vVar0[1] = iSelectedPlayer;
  2182. vVar0[2] = 999;
  2183. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2184.  
  2185.  
  2186.  
  2187.  
  2188. //main transation
  2189. networkHandleMgr handle;
  2190. NETWORK_HANDLE_FROM_PLAYER(iSelectedPlayer, &handle.netHandle, 13);
  2191. _noonon netMain;
  2192. netMain.arg = 298;
  2193. netMain.player = iSelectedPlayer;
  2194. netMain.netHandle = handle;
  2195. TriggerScriptEvent(vVar0, 15, iSelectedPlayer);
  2196.  
  2197.  
  2198.  
  2199. //cinema
  2200. _ceinema tv;
  2201. tv.arg = 287;
  2202. tv.player = iSelectedPlayer;
  2203. tv.coords = GET_ENTITY_COORDS(playerPed, 1);
  2204. TriggerScriptEvent(&tv, 5, iSelectedPlayer);
  2205.  
  2206.  
  2207.  
  2208. unknown unk_t;
  2209. unk_t.p3 = 1125515264;
  2210. unk_t.p4 = 1;
  2211. unk_t.p5 = 1;
  2212. unk_t.p7 = 1082130432;
  2213. unk_t.p8 = 1;
  2214. unk_t.p11 = 1;
  2215. unk_t.p3 = 50.0f;
  2216. unk_t.p4 = 0;
  2217. unk_t.p5 = 0;
  2218. unk_t.p8 = 1; //1 or 0
  2219. unk_t.p9 = 1; //1 or 0
  2220. unk_t.p10 = 1;
  2221. unk_t.p11 = 1; //true or false
  2222. unk_t.p12 = 1;
  2223.  
  2224.  
  2225. l_struct m_lstruct;
  2226. m_lstruct.p6 = 1082130432;
  2227. m_lstruct.p7 = 1176255488;
  2228. m_lstruct.p8 = 1;
  2229. m_lstruct.p10 = 1;
  2230. m_lstruct.p13 = 1;
  2231. m_lstruct.p15 = 1;
  2232. m_lstruct.p16 = 1;
  2233. m_lstruct.p31 = 1;
  2234. m_lstruct.p43 = 1123024896;
  2235. m_lstruct.p9 = 1;
  2236. m_lstruct.p3 = 7.0f;
  2237. m_lstruct.p10 = unk_t.p4; //all unk_t should be pointer to struct like: unk_t->
  2238. m_lstruct.p4 = unk_t.p0;
  2239. m_lstruct.p13 = unk_t.p1;
  2240. m_lstruct.p5 = unk_t.p3;
  2241. m_lstruct.p15 = unk_t.p5;
  2242. m_lstruct.p11 = unk_t.p6;
  2243. m_lstruct.p6 = unk_t.p7;
  2244. m_lstruct.p16 = unk_t.p8;
  2245. m_lstruct.p17 = unk_t.p9;
  2246. m_lstruct.p0 = NewVector3(0.0f, 0.0f, 0.0f); //rot
  2247. m_lstruct.p12 = 1;
  2248. m_lstruct.p34 = GlobalVariable::Read(2097152 + (iSelectedPlayer * 7586) + (1865 * 100) + 42); //hash | iSelectedPlayer should be 0
  2249. m_lstruct.p31 = unk_t.p11;
  2250. m_lstruct.p30 = 1;
  2251. m_lstruct.p42 = unk_t.p12;
  2252.  
  2253. thisStructMain _t_main;
  2254. _t_main.arg = 301;
  2255. _t_main.player = 0;
  2256. _t_main.coords = GET_ENTITY_COORDS(playerPed, 1);
  2257. _t_main.unk = 0;
  2258. _t_main.unk2 = 0;
  2259. _t_main.rot = NewVector3(0.0f, 0.0f, 0.0f);
  2260. _t_main._struct = m_lstruct;
  2261. TriggerScriptEvent(Var0, 7, iSelectedPlayer);
  2262.  
  2263.  
  2264. //patched
  2265. if (individualPlayer[i].featurePutBadSport)
  2266. {
  2267. int Var0[4];
  2268. Var0[0] = 312;
  2269. Var0[1] = i;
  2270. Var0[2] = INT_MAX; //amount
  2271. Var0[3] = 0; //Global_2404083
  2272. TriggerScriptEvent(Var0, 4, i);
  2273. }
  2274.  
  2275.  
  2276. //money
  2277. int vVar0[3];
  2278. vVar0[0] = 219;
  2279. vVar0[1] = iSelectedPlayer;
  2280. vVar0[2] = 12345;
  2281. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2282.  
  2283.  
  2284. //mental state
  2285. int Param0[9];
  2286. Param0[0] = 0;
  2287. Param0[1] = iSelectedPlayer;
  2288. Param0[2] = 135;
  2289. TriggerScriptEvent(Param0, 9, iSelectedPlayer);
  2290.  
  2291. //off radar
  2292. int vVar0[3];
  2293. vVar0[0] = 358;
  2294. vVar0[1] = iSelectedPlayer;
  2295. vVar0[2] = 59;
  2296. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2297.  
  2298.  
  2299.  
  2300. //func_3619(func_6(1, 1), 1, iParam0, 1);
  2301.  
  2302. //offradar
  2303. int Var0[6];
  2304. Var0[0] = 288;
  2305. Var0[1] = iSelectedPlayer;
  2306. Var0[3] = 1;
  2307. Var0[5] = 1;
  2308. Var0[2] = iSelectedPlayer;
  2309.  
  2310. //Global_2399048 + 2415 + (Var0 + 3) = 0;
  2311. //Global_2399048 + 2415 + 39 + (1 * 2), 1, 0);
  2312. //Global_2399048 + 2415 + 232 = network_get_host_of_script("Freemode", -1, 0);
  2313.  
  2314. GlobalVariable::Write(Global_2410912 + 4054 + 1, 0);
  2315. GlobalVariable::Write(Global_2410912 + 4054 + 2, 59); //time
  2316. TriggerScriptEvent(Var0, 6, iSelectedPlayer);
  2317.  
  2318.  
  2319. //offradar
  2320. int Var02[4];
  2321. Var02[0] = 289;
  2322. Var02[1] = iSelectedPlayer;
  2323. Var02[3] = 1;
  2324. Var02[2] = GlobalVariable::Read(Global_2410912 + 4054);
  2325. GlobalVariable::Write(2399048 + 2415 + 235 + (1 * 4), 1);
  2326. GlobalVariable::Write(2399048 + 2415 + 235 + (1 * 4) + 1, 59); //time
  2327.  
  2328. //GlobalVariable::Write(2399048 + 2415 + 39 + (1 * 2), 0);
  2329. GlobalVariable::Write(Global_2410912 + 4054 + 2, 0);
  2330. TriggerScriptEvent(Var02, 6, iSelectedPlayer);
  2331.  
  2332.  
  2333.  
  2334. //offradar
  2335. int Var03[6];
  2336. Var03[0] = 291;
  2337. Var03[1] = iSelectedPlayer;
  2338. Var03[3] = 1;
  2339. Var03[5] = 1;
  2340. Var03[4] = 1;
  2341. Var03[2] = 1;
  2342. TriggerScriptEvent(Var03, 6, iSelectedPlayer);
  2343.  
  2344. //badsport
  2345. int vVar0[3];
  2346. vVar0[0] = 2;
  2347. vVar0[1] = iSelectedPlayer;
  2348. vVar0[2] = valueee;
  2349. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2350.  
  2351.  
  2352.  
  2353.  
  2354. //commend
  2355. int Var0[6];
  2356. Var0[0] = 288;
  2357. Var0[1] = iSelectedPlayer;
  2358. Var0[3] = 1;
  2359. Var0[5] = 1;
  2360. Var0[2] = 100; //value
  2361. //Global_2399048.f_2415[Var0.[3]] = 0;
  2362. //func_599(&(Global_2399048.f_2415.f_39[iParam1 /*2*/]), 1, 0);
  2363. //Global_2399048.f_2415.f_232 = network_get_host_of_script("Freemode", -1, 0);
  2364.  
  2365. //Global_2410912.f_4054.f_1 = 0;
  2366. //func_599(&(Global_2410912.f_4054.f_2), 0, 0);
  2367. TriggerScriptEvent(Var0, 6, iSelectedPlayer);
  2368.  
  2369.  
  2370. //commend2
  2371. //288
  2372. //259
  2373. //279 - unk
  2374.  
  2375. int vVar0[3];
  2376. vVar0[0] = 2;
  2377. vVar0[1] = iSelectedPlayer;
  2378. vVar0[2] = 37; //helpful commend | 26 | 54
  2379. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2380.  
  2381.  
  2382.  
  2383.  
  2384.  
  2385. //delete or lock personal vehicle
  2386. int vVar0[3];
  2387. vVar0[0] = 56;
  2388. vVar0[1] = 0;
  2389. vVar0[2] = 0;
  2390. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2391.  
  2392. //unknown
  2393. int vVar0[3];
  2394. vVar0[0] = 302;
  2395. vVar0[1] = iSelectedPlayer;
  2396. vVar0[2] = 0;
  2397. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2398.  
  2399. //remove wanted level
  2400. int vVar0[2];
  2401. vVar0[0] = 356;
  2402. vVar0[1] = iSelectedPlayer;
  2403. TriggerScriptEvent(vVar0, 2, iSelectedPlayer);
  2404.  
  2405. //roller coster
  2406. int args[2];
  2407. args[0] = 346;
  2408. args[1] = 0; //unknown
  2409. TriggerScriptEvent(args, 2, iSelectedPlayer);
  2410.  
  2411. //betting money
  2412. int Var1[2];
  2413. Var1[0] = 200;
  2414. Var1[1] = iSelectedPlayer;
  2415. TriggerScriptEvent(Var1, 2, iSelectedPlayer);
  2416.  
  2417. //switch mission blips
  2418. int vVar0[3];
  2419. vVar0[0] = 365;
  2420. vVar0[1] = iSelectedPlayer;
  2421. vVar0[2] = 1;
  2422. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2423.  
  2424.  
  2425. //358 off the radar
  2426. int vVar0[3];
  2427. vVar0[0] = 358;
  2428. vVar0[1] = PLAYER_ID();
  2429. vVar0[2] = 50; //time
  2430. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2431.  
  2432. //41 death match notifaction/from me
  2433. int Var0[6];
  2434. Var0[0] = 41;
  2435. Var0[1] = PLAYER_ID();
  2436. Var0[3] = 1; //last or current vehicle active
  2437. Var0[5] = 1; //some kind of return stat value
  2438. TriggerScriptEvent(Var0, 6, iSelectedPlayer);
  2439.  
  2440.  
  2441.  
  2442. //288/289 bullshark
  2443. int Var0[6];
  2444. Var0[0] = 288;
  2445. Var0[1] = iSelectedPlayer;
  2446. Var0[3] = 1;
  2447. Var0[5] = 1;
  2448. Var0[2] = iSelectedPlayer; //player 2
  2449. TriggerScriptEvent(Var0, 6, iSelectedPlayer);
  2450.  
  2451.  
  2452. //close interaction menu/paused 259
  2453. int vVar0[3];
  2454. vVar0[0] = 259;
  2455. vVar0[1] = iSelectedPlayer;
  2456. vVar0[2] = 0;
  2457. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2458.  
  2459. //false leave
  2460. int var0[3];
  2461. var0[0] = 203;
  2462. var0[1] = iSelectedPlayer;
  2463. var0[2] = 100000;
  2464. TriggerScriptEvent(&ride, 3, iSelectedPlayer);
  2465.  
  2466.  
  2467. int var0[3];
  2468. var0[0] = 27;
  2469. var0[1] = iSelectedPlayer;
  2470. var0[2] = 1;
  2471. TriggerScriptEvent(&ride, 3, iSelectedPlayer);
  2472. //arg/ 3 params
  2473. //1 fake leave
  2474. //27 notifacation sound
  2475. //30 bullshark started
  2476. //31 bullshark end
  2477. //56 request personal vehicle
  2478. //64 anon bounty
  2479. //67 empty notifaction
  2480. //151 fake leave
  2481. //161 remove blips
  2482. //162 RDR_LEAKS join Job.
  2483. //163 remove blips
  2484. //173 armour truck
  2485. //174 enable blips back
  2486. //300 insurance message
  2487. //312 hospital bill
  2488. //318 fake leave
  2489. //322 fake leave
  2490. //325 fave leave
  2491.  
  2492.  
  2493. typedef struct
  2494. {
  2495. int arg;
  2496. int player;
  2497. char *weather;
  2498. } onlineWeather;
  2499.  
  2500. onlineWeather weather;
  2501. weather.arg = 16;
  2502. weather.player = iSelectedPlayer;
  2503. weather.weather = "BLIZZARD";
  2504. TriggerScriptEvent(&weather, 3, iSelectedPlayer);
  2505.  
  2506.  
  2507.  
  2508. //unlock all test
  2509. int Var0[9];
  2510.  
  2511. GlobalVariable::Write(1573885, 0);
  2512. Var0[0] = 199;
  2513. Var0[1] = PLAYER_ID();
  2514. //Vector3 coords = GlobalVariable::Read(Global_2394218 + 2529);
  2515. //Var0[2] = coords;
  2516. Var0[6] = 0;
  2517. Var0[8] = IS_BIT_SET(GlobalVariable::Get(Global_1581767 + (PLAYER_ID() * 306) + 114), 0);
  2518. Var0[7] = GlobalVariable::Get(Global_1581767 + (PLAYER_ID() * 306) + 76 + 27);
  2519. //func_551();
  2520. //func_555(vParam0.z);
  2521. //GlobalVariable::WriteVector3(Global_2394218 + 2529, coords);
  2522. char *prt = GlobalVariable::GetString(Global_2394218 + 2444 + 51);
  2523. strncpy(prt, 0, 64);
  2524. char *prt2 = GlobalVariable::GetString(Global_2394218 + 2444 + 67);
  2525. strncpy(prt2, 0, 64);
  2526. int iVar1 = GlobalVariable::Get(Global_2390201 + (PLAYER_ID() * 223) + 121 + 1);
  2527. int iVar2 = GlobalVariable::Get((Global_2390201 + (PLAYER_ID() * 223) + 121 + 1 + GlobalVariable::Get(Global_2390201 + (PLAYER_ID() * 223) + 121 + 1 + 1)));
  2528.  
  2529. Var0[5] = ROUND(((TO_FLOAT(iVar1) / TO_FLOAT(iVar2)) * 100.0f));
  2530.  
  2531. if (Var0[5] <= 0)
  2532. {
  2533. Var0[5] = GET_RANDOM_INT_IN_RANGE(5, 100);
  2534. }
  2535.  
  2536. //func_554(1);
  2537. TriggerScriptEvent(Var0, 9, PLAYER_ID());
  2538.  
  2539.  
  2540. //unlock all 2
  2541. int Var0[2];
  2542. Var0[0] = 309;
  2543. Var0[1] = PLAYER_ID();
  2544. TriggerScriptEvent(Var0, 2, PLAYER_ID());
  2545.  
  2546.  
  2547. //unlock all 3
  2548. int vVar0[3];
  2549. vVar0[0] = 167;
  2550. vVar0[1] = PLAYER_ID();
  2551. vVar0[2] = GlobalVariable::Get(2388295 + (PLAYER_ID() * 40) + 3 + 17);
  2552. TriggerScriptEvent(vVar0, 3, PLAYER_ID());
  2553.  
  2554.  
  2555.  
  2556. //earn from pickup
  2557. int Var0[4];
  2558. Var0[0] = 44;
  2559. Var0[1] = iSelectedPlayer;
  2560. Var0[2] = iSelectedPlayer; //player 2
  2561. Var0[3] = 100; //value
  2562. TriggerScriptEvent(Var0, 4, iSelectedPlayer);
  2563.  
  2564.  
  2565.  
  2566.  
  2567. //something
  2568. int vVar0[3];
  2569. vVar0[0] = 43;
  2570. vVar0[1] = iSelectedPlayer;
  2571. vVar0[2] = iSelectedPlayer; //player 2
  2572. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  2573.  
  2574.  
  2575. //somthing else
  2576. int Var0[19];
  2577. //struct<20> Var1;
  2578. Var0[0] = 59;
  2579. Var0[1] = iSelectedPlayer;
  2580. int zeroo = 0;
  2581. int uVar56 = 0;
  2582. SET_BIT(&uVar56, zeroo);
  2583.  
  2584. Var0[16] = uVar56;
  2585. Var0[2] = iSelectedPlayer; //player 2
  2586. Var0[18] = GlobalVariable::Get(1572928 + 4 + (iSelectedPlayer * 3) + 1);
  2587. Var0[17] = 1;
  2588. Var0[3] = GlobalVariable::Get(2097152 + (zeroo * 7586) + 7168);
  2589. /*StringCopy(&Var1, get_player_name(player_id()), 32);
  2590. if (func_5666(iParam1, 0, 1))
  2591. {
  2592. StringCopy(&(Var1.f_8), get_player_name(iParam1), 32);
  2593. }
  2594. Var1[16] = uParam3;
  2595. Var1[17] = iParam5;
  2596. Var1[18] = Global_1581767[player_id() * 306].f_178.f_6;
  2597. Var1[19] = iParam4;
  2598. _0x0B9A3512(&Param2);
  2599. _0x628F489B(&Var1);*/
  2600. TriggerScriptEvent(Var0, 20, iSelectedPlayer);
  2601.  
  2602.  
  2603. //something idk
  2604. int Var0[2];
  2605. Var0[0] = 204;
  2606. Var0[1] = iSelectedPlayer;
  2607. TriggerScriptEvent(Var0, 2, iSelectedPlayer);
  2608.  
  2609.  
  2610. //am_vehicle_spawn
  2611. int Var0[5];
  2612. Var0[0] = 296;
  2613. Var0[1] = PLAYER_ID();
  2614. Var0[2] = PLAYER_ID();
  2615. Var0[3] = 5; //0 - through 5
  2616. Var0[4] = VEHICLE_ADDER;
  2617. TriggerScriptEvent(Var0, 5, PLAYER_ID());
  2618.  
  2619. //am_vehicle_spawn
  2620. int Var0[5];
  2621. Var0[0] = 295;
  2622. Var0[1] = PLAYER_ID();
  2623. Var0[2] = PLAYER_ID();
  2624. Var0[3] = 1; //0 - through 5
  2625. Var0[4] = VEHICLE_ADDER;
  2626. TriggerScriptEvent(Var0, 5, PLAYER_ID());
  2627.  
  2628.  
  2629. //undocumented events
  2630. //192 / crew awards unlock
  2631. //210 / promote or demote a crew member
  2632. //182 / crew left
  2633. //203 / kick from crew
  2634. //213 / set some crew var to true
  2635.  
  2636.  
  2637.  
  2638.  
  2639. if (featureForgeGun)
  2640. {
  2641. DISABLE_PLAYER_FIRING(PLAYER_ID(), 1);
  2642. if (IS_CONTROL_JUST_PRESSED(2, INPUT_FRONTEND_RT) && GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(PLAYER_ID(), &forge_entity) && DOES_ENTITY_EXIST(forge_entity)) { forge_target_locked = !forge_target_locked; if (IS_ENTITY_A_PED(forge_entity) && IS_PED_IN_ANY_VEHICLE(forge_entity, 1)) { forge_entity = GET_VEHICLE_PED_IS_IN(forge_entity, 0); } }
  2643. if (forge_target_locked)
  2644. {
  2645. if (RequestControlOfEnt(forge_entity))
  2646. {
  2647. Vector3 min, max;
  2648. GET_MODEL_DIMENSIONS(GET_ENTITY_MODEL(forge_entity), &min, &max);
  2649. Vector3 camvf = get_coords_from_cam(featureForgeGunRange + max.y);
  2650. SET_ENTITY_COORDS_NO_OFFSET(forge_entity, camvf.x, camvf.y, camvf.z, 1, 1, 1);
  2651. if (IS_ENTITY_A_VEHICLE(forge_entity)) { SET_ENTITY_HEADING(forge_entity, GET_ENTITY_HEADING(PLAYER_PED_ID()) + 90.0f); }
  2652. }
  2653. }
  2654. else
  2655. {
  2656. if (DOES_ENTITY_EXIST(forge_entity))
  2657. FREEZE_ENTITY_POSITION(forge_entity, 1);
  2658. }
  2659. }
  2660.  
  2661.  
  2662.  
  2663. case 10:
  2664.  
  2665. //featureClearAttachmentsNet = 1;
  2666. if (detachObjectsFromPlayerCurrentlyRunning == 0)
  2667. {
  2668. detachObjectsFromPlayerCurrentlyRunning = 1;
  2669. detachObjectsFromPlayerAddr = playerPedIter;
  2670. detachObjectsFromPlayerCurrentIndex = 0;
  2671. clearAttachmentsCallback(0);
  2672. }
  2673. break;
  2674.  
  2675.  
  2676.  
  2677.  
  2678. void nullFuncH(int handle) { return; }
  2679. void(*saveFunc)(int);
  2680. Entity featureClearEentity = 0, detachObjectsFromPlayerAddr = 0;
  2681. int featureClearAttamentTimeout = 0, detachObjectsFromPlayerCurrentIndex = 0;
  2682. bool featureClearAttachmentsNet = 0, detachObjectsFromPlayerCurrentlyRunning = 0;
  2683.  
  2684.  
  2685. void markEntityForDeletion(int ent, void(*handle)(int) = nullFuncH)
  2686. {
  2687. featureClearAttamentTimeout = 0;
  2688. featureClearEentity = ent;
  2689. featureClearAttachmentsNet = 1;
  2690. saveFunc = handle;
  2691. }
  2692. void clearAttachmentsCallback(Entity previousEntity)
  2693. {
  2694. CEntityPool *Entities = (CEntityPool*)*(unsigned int*)_entityPoolAddress;
  2695. if (detachObjectsFromPlayerCurrentIndex >= Entities->maxPoolSize)
  2696. {
  2697. detachObjectsFromPlayerCurrentlyRunning = 0;
  2698. return;
  2699. }
  2700.  
  2701. poolEntity *ent = &Entities->getEntity(detachObjectsFromPlayerCurrentIndex);
  2702. while (true)
  2703. {
  2704. if (ent->isValid())
  2705. {
  2706. int index = EntityToIndex(ent->addr);
  2707. if (GET_ENTITY_ATTACHED_TO(index) == detachObjectsFromPlayerAddr)
  2708. {
  2709. break;
  2710. }
  2711. }
  2712. detachObjectsFromPlayerCurrentIndex++;
  2713. if (detachObjectsFromPlayerCurrentIndex >= Entities->maxPoolSize)
  2714. {
  2715. detachObjectsFromPlayerCurrentlyRunning = 0;
  2716. return;
  2717. }
  2718. ent = &Entities->getEntity(detachObjectsFromPlayerCurrentIndex);
  2719. }
  2720. int entityIndex = EntityToIndex(ent->addr);
  2721. markEntityForDeletion(entityIndex, clearAttachmentsCallback);
  2722. detachObjectsFromPlayerCurrentIndex++;
  2723. }
  2724.  
  2725.  
  2726.  
  2727.  
  2728.  
  2729. //use this to get the args that are getting past by other players to you, works similar to hooking the actual event function
  2730. void func_4()
  2731. {
  2732. //event num: 291, event num: 0, event num: 289 /off the radar
  2733. //arg struct 259 /join session
  2734. //event num: 244 /smoke bong
  2735. int iVar0;
  2736. int iVar1;
  2737. int iVar2[3];
  2738.  
  2739. int m_args[2];
  2740. int m_args2[3];
  2741. int m_args3[10];
  2742. int m_args4[12];
  2743. int m_args5[3];
  2744. int m_args6[28];
  2745. int m_args7[2];
  2746. int m_args8[21];
  2747. int m_args9[14];
  2748.  
  2749. iVar0 = 0;
  2750. while (iVar0 < GET_NUMBER_OF_EVENTS(1))
  2751. {
  2752. iVar1 = GET_EVENT_AT_INDEX(1, iVar0);
  2753.  
  2754. if (iVar1 == 166) //freemode
  2755. {
  2756. GET_EVENT_DATA(1, iVar0, iVar2, 3);
  2757. printf("arg: %i, arg2: %i, arg3: %i\n", iVar2[0], iVar2[1], iVar2[2]);
  2758. if (iVar2[0] == 303)
  2759. {
  2760. printf("vehicle windows removed \n");
  2761. }
  2762. if (iVar2[0] == 312)
  2763. {
  2764. printf("badsport \n");
  2765. }
  2766. }
  2767. if (iVar1 == 164) //main transition
  2768. {
  2769. GET_EVENT_DATA(1, iVar0, m_args, 3);
  2770. printf("main transition event args: 0x%X, arg2: 0x%X\n", m_args[0], m_args[1]);
  2771. }
  2772. if (iVar1 == 163)//main transition
  2773. {
  2774. GET_EVENT_DATA(1, iVar0, m_args2, 3);
  2775. printf("main transition2 event args: %i, arg2: 0x%X\n", m_args2[0], m_args2[1]);
  2776. }
  2777. if (iVar1 == 177) //freemode stats
  2778. {
  2779. GET_EVENT_DATA(1, iVar0, m_args3, 10);
  2780. printf("freemode stats: args: %i, arg2: %i, arg3: 0x%X, arg4: %i, arg5: 0x%X, arg6: %i, arg7: 0x%X, arg8: %i, arg9: 0x%X\n", m_args3[0], m_args3[1], m_args3[2], m_args3[3], m_args3[4], m_args3[5], m_args3[6], m_args3[7], m_args3[8], m_args3[9]);
  2781. }
  2782. if (iVar1 == 154) //main_presistent | admin kick
  2783. {
  2784. //func_1091
  2785. GET_EVENT_DATA(1, iVar0, m_args5, 1);
  2786. printf("admin: arg: %i, arg2: 0x%X, arg3: %i, arg4: %i, arg5: %i, arg6: %i, arg7: %i, arg8: %i, arg9: 0x%X, arg10: %i, arg11: %i, arg12: %i, arg13: 0x%X, arg14: %i, arg15: %i, arg16: 0x%X, arg17: %i, arg18: 0x%X, arg19: %i, arg20: %i\n", m_args5[0], m_args5[1], m_args5[2], m_args5[3], m_args5[4], m_args5[5], m_args5[6], m_args5[7], m_args5[8], m_args5[9], m_args5[10], m_args5[11], m_args5[12], m_args5[13], m_args5[14], m_args5[15], m_args5[16], m_args5[17], m_args5[18], m_args5[19]);
  2787. }
  2788. if (iVar1 == 192) //main_presistent | disable multiplayer
  2789. {
  2790. GET_EVENT_DATA(1, iVar0, m_args6, 28);
  2791. printf("dis multi: arg: %i, arg2: %i, arg3: %i, arg4: %i, arg5: %i\n", m_args6[0], m_args6[1], m_args6[2], m_args6[3], m_args6[4]);
  2792. }
  2793. if (iVar1 == 175) //main_presistent | session error
  2794. {
  2795. GET_EVENT_DATA(1, iVar0, m_args7, 2);
  2796. printf("session error: arg: %i, arg2: %i\n", m_args7[0], m_args7[1]);
  2797. }
  2798. if (iVar1 == 175) //main_presistent | new session
  2799. {
  2800. GET_EVENT_DATA(1, iVar0, m_args8, 21);
  2801. printf("new session: arg: %i, arg2: %i, arg3: %i, arg4: %i\n", m_args8[0], m_args8[1], m_args8[2], m_args8[3]);
  2802. }
  2803. if (iVar1 == 215) //main_presistent | dev kick
  2804. {
  2805. GET_EVENT_DATA(1, iVar0, m_args9, 14);
  2806. printf("dev kick: arg: %i, arg2: %i, arg3: %i, arg4: %i\n", m_args9[0], m_args9[1], m_args9[2], m_args9[3]);
  2807. }
  2808. if (iVar1 == 150) //freemode unlocks
  2809. {
  2810. //Var0.f_3
  2811. //m_args4[3] = 88; //stat set int with global - Global_2428195
  2812. //m_args4[4] = 34; //stat set bool with global - Global_2428460
  2813. //m_args4[5] = 1; //stat set float with global - Global_1330608
  2814. //m_args4[6] = 2949; //stat set int with global - Global_2417731
  2815. //m_args4[7] = 228; //stat set bool with global - Global_2427264
  2816. //m_args4[8] = 228; //stat set float with global - Global_2426579
  2817. GET_EVENT_DATA(1, iVar0, m_args4, 12);
  2818. printf("freemode unlocks: args: 0x%X, arg2: 0x%X, arg3: %i, arg4: %i, arg5: 0x%X, arg6: %X, arg7: 0x%X, arg8: 0x%X, arg9: 0x%X\n", m_args4[0], m_args4[1], m_args4[2], m_args4[3], m_args4[4], m_args4[5], m_args4[6], m_args4[7], m_args4[8], m_args4[9]);
  2819. }
  2820.  
  2821. iVar0++;
  2822. }
  2823. }
  2824.  
  2825. //char xp
  2826. //Global_1330708
  2827. //events
  2828. //1 check points for mini games
  2829. //2 cops & crooks & broadcast app
  2830. //3 am_cr_securityvan & am_crate_drop
  2831. //150 freemode awards
  2832. //312 health care bill
  2833. //32 apartment invite
  2834. //346 beach ride
  2835. //353 insurance car
  2836. //16 weather
  2837. //55 kick from personal veh
  2838. //56 delete personal vehicle - personal vehicle network id: Global_2390201[vVar0.y /*223*/].f_48
  2839. //58 bounty
  2840. //59 rank and money from bounty
  2841. //300 destroy personal vehicle
  2842. //356 remove wanted
  2843. //357 some type of time
  2844. //216 xp from partner or gen
  2845. //218 money from last shared job
  2846. //219 - PIM_TIRLJ
  2847. //67 CnC_PV_THEFT
  2848. //
  2849.  
  2850.  
  2851.  
  2852.  
  2853. typedef struct
  2854. {
  2855. int arg;
  2856. int player;
  2857. int unknown;
  2858. int intStatAwards; // stat index of Global_2428195[index here][charater here]
  2859. int boolStatActivities; // stat index of Global_2428460[index here][charater here]
  2860. int floatStatTempAward; // stat index of Global_1330608[index here][charater here]
  2861. int intStatCareer; // stat index of Global_2417731[index here][charater here]
  2862. int boolStatWeapons; // stat index of Global_2427264[index here][charater here]
  2863. int floatStatVehicles; // stat index of Global_2426579[index here][charater here]
  2864. int intStatSet; // stat set int value
  2865. float floatStatSet; // stat set float value
  2866. bool boolStatSet; // stat set bool value
  2867.  
  2868. /*//variables below are not used in this struct, they are just here for documentation, These stats below are not used by trigger script event native
  2869.  
  2870. //used by scripts but not used by trigger script event native
  2871. int stringStatGerneral; // stat index of Global_2427949[index here][charater here]
  2872.  
  2873. //used by scripts but not used by trigger script event native
  2874. int gxtLabelStatMission; // stat index of Global_1330501[index here][charater here] | this could possible wrong, but gxt label stat seems about correct becuase of the order they come in
  2875.  
  2876. //used in script but I'm not sure if it's used by trigger script event native
  2877. int dateStatAward; // stat index of Global_2428010[index here][charater here]
  2878.  
  2879. //used in script but I'm not sure if it's used by trigger script event native
  2880. int PosStat; // stat index of Global_2428116[index here][charater here]
  2881.  
  2882. //used in script but I'm not sure if it's used by trigger script event native
  2883. int useridStat; // stat index of Global_1330505[index here][charater here]
  2884.  
  2885. //used in script but I'm not sure if it's used by trigger script event native
  2886. int intStatmpplyMiscAwards; // stat index of Global_1330616[index here]
  2887.  
  2888. //used by scripts but not used by trigger script event native
  2889. int floatStatmpply; // stat index of Global_1330622[index here]
  2890.  
  2891. //used in script but I'm not sure if it's used by trigger script event native
  2892. int boolStatmpply; // stat index of Global_1330624[index here]
  2893.  
  2894. //used by scripts but not used by trigger script event native
  2895. int unknownTypeStatmpply; // stat index of Global_1330636[index here]
  2896. */
  2897. } mp_client_stats;
  2898.  
  2899.  
  2900.  
  2901. mp_client_stats stat;
  2902. stat.arg = 150;
  2903. stat.player = iSelectedPlayer;
  2904. stat.unknown = iSelectedPlayer;
  2905. stat.intStatAwards = 88;
  2906. stat.boolStatActivities = 34;
  2907. stat.floatStatTempAward = 1;
  2908. stat.intStatCareer = 2949;
  2909. stat.boolStatWeapons = 288;
  2910. stat.floatStatVehicles = 288;
  2911. stat.intStatSet = 0;
  2912. stat.floatStatSet = 0;
  2913. stat.boolStatSet = 0;
  2914.  
  2915.  
  2916. //now set stat becuase that's what scrips do
  2917. //set 500 super heavy armour to player
  2918. stat.intStatCareer = 1867; //Global_2417731[1867 /*3*/][0] = joaat("mp0_mp_char_armour_5_count");
  2919. stat.intStatSet = 500;
  2920.  
  2921. //set player rp | rank 120
  2922. //stat.intStatCareer = 626; //Global_2417731[626 /*3*/][0] = joaat("mp0_char_xp_fm");
  2923. //stat.intStatSet = 2017150; //rp for rank 120
  2924.  
  2925.  
  2926. //set admin rp to them | rank 120
  2927. //stat.intStatCareer = 1868; //Global_2417731[1868 /*3*/][0] = joaat("mp0_char_set_rp_gift_admin");
  2928. //stat.intStatSet = 2017150; //rp for rank 120
  2929.  
  2930.  
  2931. TriggerScriptEvent(&stat, 12, iSelectedPlayer);
  2932.  
  2933.  
  2934.  
  2935.  
  2936.  
  2937.  
  2938. 0x1C6C530 NETWORK_INCREMENT_STAT_EVENT
  2939. 0x12D137C NETWORK_INCREMENT_STAT_FUNC
  2940.  
  2941. //GAME_EXPORT int 0x12D141C(int32_t a1, int32_t a2, int32_t a3);
  2942.  
  2943. //0x12D141C(0xdafb10f9, dword, dword); //hash = mpply_friendly
  2944.  
  2945. /*
  2946. 0x12D141C follow this address back to 0xC3FA0
  2947. 0xC3FA0 contains the stat data
  2948.  
  2949. 0xC3FA0(int32_t *a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6, unsigned int a7, unsigned int a8);
  2950. 0xC3FA0(&unk_29DF5DC, (int32_t )&v5, (int32_t )&v4, (int32_t )&v3, (int32_t )"COMMEND_SPAM_TIMEOUT", (int32_t )"COMMEND_SPAM_TIMEOUT_DISABLED", 0x4B0, 0xDAFB10F9); //mpply_friendly
  2951.  
  2952.  
  2953. GAME_EXPORT int _0x324CB0(int *a1, int a2);
  2954.  
  2955. //0x325EF0(Hash hash, unsigned int value, unsigned int value2);
  2956. GAME_EXPORT int _0x325EF0(int32_t *a1);
  2957.  
  2958. GAME_EXPORT int 0x12D8D2C(0xB5EE873, 0x3C0AF527, int value);
  2959.  
  2960. GAME_EXPORT int 0x12DEC4C(someVtable, unsinged int, Hash, int value);
  2961.  
  2962. GAME_EXPORT unsigned int 0xAE8E98(int32_t a1);
  2963.  
  2964. 0xB5EE873 = BASE_GLOBALS
  2965.  
  2966. unsigned int _0xA076C0(int strc)
  2967.  
  2968.  
  2969. //GAME_EXPORT int _0x12D141C(unsigned int v2, unsigned int v4, unsigned int v5)
  2970. GAME_EXPORT void _0x324CB0(int *a1, char *a2)
  2971. //int value = 0;
  2972. //_0x324CB0(&value, "MPPLY_LAST_REPORT_RESTORE");
  2973. GAME_EXPORT int *_0x12DEC4C(int32_t a1, int32_t value, int array_index) //returns an array
  2974. //_0x12DEC4C(0x38CEB237, 0, 3); //0x38CEB237 = mp_global
  2975. GAME_EXPORT void _0x12B4710(unsigned int hash_table_address, unsigned int hash, unsigned int data)
  2976. // unsigned int dword_1CFB0B8 = 0x1CFB0B8;
  2977. //_0x12B4710(dword_1CFB0B8, 0x1C95C751, 0x10); //0xF227F666 COMMENDREPORT_MAX_STRENGTH
  2978. GAME_EXPORT _0x12CF8F0(char *a1, char *a2, int value) //returns an array looks like
  2979. //_0x12CF8F0("MP_GLOBAL", "KICK_TIMEOUT", 0);
  2980. //_0x12CF8F0("MP_GLOBAL", "KICK_TIMEOUT_DISABLED", 2);
  2981. GAME_EXPORT char _0xC3C8C(const char *a1, int32_t a2, int32_t a3)
  2982. GAME_EXPORT char *_0x12F89B8(const char *a1)
  2983. GAME_EXPORT void _0xA23BD0(int32_t *a1, int32_t a2, int a3)
  2984.  
  2985. unsigned int CNetGamePlayer()
  2986. {
  2987. unsigned int s = 0x00000000;
  2988. unsigned int v23 = *(unsigned int*)(s + 0x4C);
  2989. return _0xA076C0(v23);
  2990. }
  2991.  
  2992.  
  2993.  
  2994.  
  2995.  
  2996.  
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002. int g_global = GlobalVariable::Get(1310891 + (PLAYER_ID() * 6) + 1);
  3003. int vVar0[3];
  3004. vVar0[0] = 168;
  3005. vVar0[1] = iSelectedPlayer;
  3006. vVar0[2] = g_global;
  3007. TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
  3008.  
  3009. int Var2[4];
  3010. Var2[0] = 157;
  3011. Var2[1] = iSelectedPlayer;
  3012. int bit = 0;
  3013. SET_BIT(&bit, PLAYER_ID());
  3014. Var2[2] = bit; //bitset
  3015. Var2[3] = g_global;
  3016. TriggerScriptEvent(Var2, 4, iSelectedPlayer);
  3017.  
  3018.  
  3019. int FadeTime = 700;
  3020. RGBA ColorList[4] = {
  3021. { 255, 0, 0, 255 },
  3022. { 0, 255, 0, 255 },
  3023. { 0, 0, 255, 255 },
  3024. { 255, 255, 0, 255 },
  3025. };
  3026. float fadeAmount;
  3027. int colorIndex;
  3028. RGBA startColor = ColorList[0], endColor = ColorList[1];
  3029. RGBA currentColor;
  3030.  
  3031. double Lerp(double d1, double d2, double d)
  3032. {
  3033. return d1 + (d2 - d1) * d;
  3034. }
  3035. RGBA FadeTo(RGBA color1, RGBA color2, double d)
  3036. {
  3037. RGBA col;
  3038. double r = Lerp(color1.R, color2.R, d);
  3039. double g = Lerp(color1.G, color2.G, d);
  3040. double b = Lerp(color1.B, color2.B, d);
  3041. col.R = r;
  3042. col.G = g;
  3043. col.B = b;
  3044. return col;
  3045. }
  3046.  
  3047. if (fadeAmount < 1.0f)
  3048. {
  3049. fadeAmount += GET_FRAME_TIME() * (1000.0f / FadeTime);
  3050.  
  3051. if (fadeAmount < 0.0f)
  3052. fadeAmount = 0.0f;
  3053.  
  3054. else if (fadeAmount > 1.0f)
  3055. fadeAmount = 1.0f;
  3056.  
  3057. currentColor = FadeTo(startColor, endColor, fadeAmount);
  3058. }
  3059. else
  3060. {
  3061. colorIndex++;
  3062.  
  3063. colorIndex %= sizeof(ColorList);
  3064.  
  3065. startColor = currentColor;
  3066.  
  3067. endColor = ColorList[colorIndex];
  3068.  
  3069. fadeAmount = 0.0f;
  3070. }
  3071.  
  3072. if (IS_PED_IN_ANY_VEHICLE(myVeh, 1))
  3073. SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(myVeh, currentColor.R, currentColor.G, currentColor.B);
  3074.  
  3075.  
  3076.  
  3077.  
  3078.  
  3079.  
  3080.  
  3081.  
  3082.  
  3083.  
  3084.  
  3085.  
  3086.  
  3087.  
  3088. //18 players in session
  3089. _NETWORK_SESSION_SET_MAX_PLAYERS(0, 18); //Player
  3090. _NETWORK_SESSION_SET_MAX_PLAYERS(4, 18); //Spectator
  3091. _NETWORK_SESSION_SET_MAX_PLAYERS(8, 18); //SCTV
  3092. _NETWORK_SCTV_SLOTS(18);
  3093. *(int *)(0x3E42EC) = BLR; //_NETWORK_SESSION_SET_MAX_PLAYERS
  3094.  
  3095.  
  3096.  
  3097.  
  3098.  
  3099.  
  3100.  
  3101.  
  3102.  
  3103.  
  3104.  
  3105.  
  3106.  
  3107.  
  3108.  
  3109. int getProofs(Entity entity, int bit)
  3110. {
  3111. int address = getScriptHandleBaseAddress(entity);
  3112. printf("address: 0x%X\n", address);
  3113.  
  3114. int fire = 5;
  3115. int melee = 7;
  3116. int bullet = 4;
  3117. int explosion = 11;
  3118. int collision = 6;
  3119. int onlyDamageByPlayer = 9;
  3120. int invincible = 8;
  3121.  
  3122. //other unknown params?
  3123. int ten = 10;
  3124. int fourteen = 14;
  3125. int fifthteen = 15;
  3126. int canEntityBeDamaged = 18;
  3127. int twentyfour = 24;
  3128.  
  3129. /*
  3130. nothing:
  3131. toggle: 1 = byte 0x30000800
  3132. toggle: 0 = byte 0x30000800
  3133.  
  3134. player invincible
  3135. toggle: 1 = byte 0x30800800
  3136. toggle: 0 = byte 0x30000800
  3137.  
  3138. bullet proof:
  3139. toggle: 1 = byte 0x38000800
  3140. toggle: 0 = byte 0x30000800
  3141.  
  3142. fire proof:
  3143. toggle: 1 = byte 0x34000800
  3144. toggle: 0 = byte 0x30000800
  3145.  
  3146. explosion proof:
  3147. toggle: 1 = byte 0x30200800
  3148. toggle: 0 = byte 0x30000800
  3149.  
  3150. collision proof:
  3151. toggle: 1 = byte 0x32000800
  3152. toggle: 0 = byte 0x30000800
  3153.  
  3154. melee proof:
  3155. toggle: 1 = byte 0x31000800
  3156. toggle: 0 = byte 0x30000800
  3157.  
  3158. p6 proof:
  3159. toggle: 1 = byte 0x30020800
  3160. toggle: 0 = byte 0x30000800
  3161.  
  3162. p7 proof: //next byte
  3163. toggle: 1 = byte 0x30000800
  3164. toggle: 0 = byte 0x30000800
  3165.  
  3166. p8 proof:
  3167. toggle: 1 = byte 0x30010800
  3168. toggle: 0 = byte 0x30000800
  3169.  
  3170. only damaged by player:
  3171. toggle: 1 = byte 0x30400800
  3172. toggle: 0 = byte 0x30000800
  3173.  
  3174. can entity be damaged:
  3175. toggle: 1 = byte 0x30800800
  3176. toggle: 0 = byte 0x30000800
  3177.  
  3178. apartment
  3179. toggle: 1 = byte 0x30800800
  3180. toggle: 0 = byte 0x30000800
  3181.  
  3182. while ringing apartment door
  3183. toggle: 1 = byte 0x30800800
  3184. toggle: 0 = byte 0x30000800
  3185.  
  3186. garge
  3187. toggle: 1 = byte 0x30000800
  3188. toggle: 0 = byte 0x30000800
  3189.  
  3190. getting out of apartment
  3191. toggle: 1 = byte 0x30800000
  3192. toggle: 0 = byte 0x30000800
  3193.  
  3194. console trainer
  3195. toggle: 1 = byte 0x30800800
  3196. toggle: 0 = byte 0x30000800
  3197.  
  3198. api intense
  3199. toggle: 1 = byte 0x30800800
  3200. toggle: 0 = byte 0x30000800
  3201.  
  3202. dark hores menu
  3203. toggle: 1 = byte 0x3FA30800 //a lot of god modes enableds like proofs and others
  3204. toggle: 0 = byte 0x30000800
  3205.  
  3206. while driving
  3207. toggle: 1 = byte 0x30000000
  3208. toggle: 0 = byte 0x30000800
  3209.  
  3210. swiming in water
  3211. toggle: 1 = byte 0xF0000800
  3212. toggle: 0 = byte 0x30000800
  3213.  
  3214. in air
  3215. toggle: 1 = byte 0x30000000
  3216. toggle: 0 = byte 0x30000800
  3217.  
  3218. respawning
  3219. toggle: 1 = byte 0x30800000
  3220. toggle: 0 = byte 0x30000800
  3221.  
  3222. getting into heli
  3223. toggle: 1 = byte 0x30000004 //or maybe 0x30000804
  3224. toggle: 0 = byte 0x30000800
  3225.  
  3226. getting into lazer jet
  3227. toggle: 1 = byte 0x30000004
  3228. toggle: 0 = byte 0x30000800
  3229.  
  3230. climbing a latter
  3231. toggle: 1 = byte 0x30000A04
  3232. toggle: 0 = byte 0x30000800
  3233.  
  3234. in deathmath
  3235. toggle: 1 = byte 0x30000100
  3236. toggle: 0 = byte 0x30000800
  3237.  
  3238. after deathmath
  3239. toggle: 1 = byte 0x30000900
  3240. toggle: 0 = byte 0x30000900
  3241.  
  3242.  
  3243.  
  3244. invincible:
  3245. int32_t v4 = 0x800000;
  3246. int32_t result2 = byte & -0x800001 | v4;
  3247.  
  3248.  
  3249. proofs:
  3250. int v4_2;
  3251. result =
  3252. 0x8000000 * a2 & 0x8000000 | //bullet proof
  3253. byte & -0xf230001 | //god mode???
  3254. 0x4000000 * a3 & 0x4000000 | //fire proof
  3255. 0x200000 * a4 & 0x200000 | //exploion proof
  3256. 0x2000000 * a5 & 0x2000000 | //collision proof
  3257. 0x1000000 * a6 & 0x1000000 | //melle proof
  3258. 0x20000 * a7 & 0x20000 | //unk6
  3259. 0x10000 * v4_2 & 0x10000; //unk8
  3260.  
  3261.  
  3262. onlyDamageByPlayer:
  3263. bool a2 = 0;
  3264. int32_t result = 0x400000 * a2 & 0x400000 | byte & -0x400001;
  3265.  
  3266.  
  3267. can entity be damaged:
  3268. *v5 = 0x40000 * v4 & 0x800000 | *v5 & -0x800001;
  3269. */
  3270. }
  3271.  
  3272.  
  3273.  
  3274.  
  3275.  
  3276.  
  3277.  
  3278.  
  3279.  
  3280.  
  3281.  
  3282.  
  3283.  
  3284.  
  3285.  
  3286.  
  3287.  
  3288.  
  3289.  
  3290.  
  3291.  
  3292. if (NETWORK_IS_HOST())
  3293. {
  3294. NETWORK_SESSION_KICK_PLAYER(iSelectedPlayer);
  3295. }
  3296.  
  3297.  
  3298. //activate admin kick on self
  3299. GlobalVariable::Write(1315298, 30);
  3300. GlobalVariable::Write(60515, 0);
  3301. GlobalVariable::Write(1312335, 1);
  3302. GlobalVariable::Write(1312455, 6); //admin kick
  3303.  
  3304.  
  3305.  
  3306.  
  3307.  
  3308.  
  3309.  
  3310.  
  3311.  
  3312.  
  3313.  
  3314.  
  3315.  
  3316.  
  3317.  
  3318.  
  3319.  
  3320.  
  3321.  
  3322. /*
  3323. //(*(int*)0x1CC4A34) + 0x2A4) cnetplayer from first player probs the host
  3324. //a1 = 2, 4, 5, 8,
  3325. GameclockHost(5, (*(int*)0x1CC4A34) + 0x2A4);
  3326.  
  3327. //NOTICE THEY DONT CHANGE ON YOUR SCREEN
  3328. int strcut = *(int *)(0x1CC4A54);
  3329. int net_script = *(int *)(strcut);
  3330.  
  3331. //non host
  3332. int prt = *(int *)(0x1CC4A54);
  3333. unsigned int *a1 = _0xA546A8(prt);
  3334. GameClockFn(a1, 5, (*(int*)0x1CC4A34) + 0x2A4);
  3335. *(int *)(a1 + 0x2C) = hour;
  3336. *(int *)(a1 + 0x20) = weather; //could be wrong
  3337.  
  3338. //GameClockFn(a1, 5, CNetGamePlayerFn(iSelectedPlayer, 1));
  3339.  
  3340.  
  3341.  
  3342.  
  3343. /*
  3344. r0=00000000012C2A40 r8=0000000000000003 r16=0000000000000000 r24=0000000001C28AA0
  3345. r1=00000000D003FEB0 r9=0000000002150000 r17=00000000D0040430 r25=0000000000000001
  3346. r2=0000000001C85330 r10=0000000000000000 r18=0000000035F35344 r26=0000000000000000
  3347. r3=00000000401DC6E0 r11=000000003279AFF4 r19=0000000001CC2FA8 r27=0000000035F2BFFF
  3348. r4=0000000000000005 r12=00000000D003FB10 r20=000000003228FAB4 r28=0000000035F35344
  3349. r5=000000000222E250 r13=0000000010007060 r21=0000000035F00000 r29=000000000222E250
  3350. r6=0000000000000003 r14=0000000000000000 r22=0000000001E70370 r30=0000000000000005
  3351. r7=000000001FFFFFFF r15=0000000000000000 r23=00000000321A7080 r31=00000000401DC6E0
  3352.  
  3353. xer=0000000020000000 ctr=00000000012C2A00 lr=00000000012C2A50 fpscr=AE302500
  3354.  
  3355. cr=44000042 cr0=GT cr1=GT cr2= cr3= cr4= cr5= cr6=GT cr7=EQ
  3356.  
  3357. pc=00000000012C2898
  3358.  
  3359. Executing
  3360.  
  3361.  
  3362.  
  3363. 401DC6E0 0000005E 00030000 401C2AF4 0222DC80 000D63E8 ...^....@.*.."....c.
  3364. 401DC6F4 00004000 00000000 00002C38 4375B5EE 0000006D ..@.......,8Cu.....m
  3365. 401DC708 019262B0 00000000 FFFFFFFF 00740000 00000008 ..b..........t......
  3366. 401DC71C 01892C38 C875557D 66726565 6D6F6465 00000005 ..,8.uU}freemode....
  3367. 401DC730 95B61B42 00001000 0222DC80 00000000 00010000 ...B....."..........
  3368. 401DC744 003D8112 00000000 FFFFFFFF C875557D 00000000 .=...........uU}....
  3369. 401DC758 00000000 00000000 00000000 00000000 00000000 ....................
  3370. 401DC76C 00000000 00000000 00000000 00000000 00000000 ....................
  3371. 401DC780 00000000 00000000 00000000 00000000 00000000 ....................
  3372. 401DC794 00000000 00000000 00000000 00000000 00000000 ....................
  3373. 401DC7A8 00000000 00000000 00000000 00000000 00000000 ....................
  3374. 401DC7BC 00000000 00000000 00000000 00000000 00000000 ....................
  3375. 401DC7D0 00000000 00000000 00000000 00000000 00000000 ....................
  3376. 401DC7E4 00000000 00000000 00000000 00000000 00000000 ....................
  3377. 401DC7F8 00000000 00000000 0000005F 00030000 401C2B98 ..........._....@.+.
  3378. 401DC80C 0222DC80 000D63E8 00004000 00000000 00002C38 ."....c...@.......,8
  3379. 401DC820 BF397BCC 00000065 019262B0 00000000 FFFFFFFF .9{....e..b.........
  3380. 401DC834 00000000 00000009 01892C38 C875557D 66726565 ..........,8.uU}free
  3381. 401DC848 6D6F6465 00FFFFFF C875557D 00000004 00000000 mode.....uU}........
  3382. 401DC85C FFFFFFFF 00000000 003D8112 00000000 FFFFFFFF .........=..........
  3383. 401DC870 C875557D 00000000 00000000 00000000 00000000 .uU}................
  3384. 401DC884 00000000 00000000 00000000 00000000 00000000 ....................
  3385. 401DC898 00000000 00000000 00000000 00000000 00000000 ....................
  3386. 401DC8AC 00000000 00000000 00000000 00000000 00000000 ....................
  3387. 401DC8C0 00000000 00000000 00000000 00000000 00000000 ....................
  3388. 401DC8D4 00000000 00000000 00000000 00000000 00000000 ....................
  3389. 401DC8E8 00000000 00000000 00000000 00000000 00000000 ....................
  3390. 401DC8FC 00000000 00000000 00000000 00000000 00000000 ....................
  3391. 401DC910 00000000 00000000 00000000 00000000 00000060 ...................`
  3392. 401DC924 00030000 401C2C3C 0222DC80 000D63E8 00004000 ....@.,<."....c...@.
  3393. 401DC938 00000000 0000EC00 376F3515 00000000 019262B0 ........7o5.......b.
  3394. 401DC94C 00000000 FFFFFFFF 00F10006 0000000A 01892C38 ..................,8
  3395. 401DC960 C875557D 66726565 6D6F6465 00000000 00000000 .uU}freemode........
  3396. 401DC974 00000000 00000000 00000000 00000000 003D8112 .................=..
  3397. 401DC988 00000000 FFFFFFFF C875557D 00000000 00000000 .........uU}........
  3398. 401DC99C 00000000 00000000 00000000 00000000 00000000
  3399.  
  3400.  
  3401.  
  3402.  
  3403.  
  3404.  
  3405.  
  3406.  
  3407.  
  3408.  
  3409. 0222E250 0192F460 00000000 00000000 00000000 FFFFFFFF ...`................
  3410. 0222E264 00000000 00000000 FFFFFFFF 00000000 FFFFFFFF ....................
  3411. 0222E278 03FF0000 00000000 00000000 000C9F70 FFFFFFFF ...............p....
  3412. 0222E28C 00000000 0222EA10 00000000 00000000 00000000 ....."..............
  3413. 0222E2A0 00000000 00000000 00000000 00000000 00000000 ....................
  3414. 0222E2B4 FFFFFFFF 00000000 20000000 00000000 00000000 ........ ...........
  3415. 0222E2C8 00000000 FFFFFFFF 00000000 00000000 00000000 ....................
  3416. 0222E2DC 00000000 00000000 0000000A 00000012 00000000 ....................
  3417. 0222E2F0 00000000 00000000 00000000 00000000 00F99D27 ...................'
  3418. 0222E304 D003E390 00000000 02230000 00000000 00000000 .........#..........
  3419. 0222E318 00000000 00000000 00000000 00000000 00000000 ....................
  3420. 0222E32C 00000000 00000000 00000000 00000000 00000000 ....................
  3421. 0222E340 00000000 00000000 00000000 00000000 00000000 ....................
  3422. 0222E354 00000000 00000000 00000000 00000000 00000000 ....................
  3423. 0222E368 00000000 0022E250 00000000 00000000 0222DA1C .....".P........."..
  3424. 0222E37C 0222E250 0222DA28 0222E250 0222DA34 00000000 .".P.".(.".P.".4....
  3425. 0222E390 0222DA40 00000000 00000000 400222D0 00000000 .".@........@.".....
  3426. 0222E3A4 00000000 00000000 00000000 00000000 00000000 ....................
  3427. 0222E3B8 00000000 00000000 00000000 000000FF 00000000
  3428. *
  3429.  
  3430.  
  3431.  
  3432. int s = 0x0000000
  3433. int p2 = (int )(s + 0xD04);
  3434. GameWeatherFn(int unk, int strut, 0);
  3435. //1, 0, 4E = extrasunny
  3436. //1, 1, 4E clear
  3437. //1, 2, 4E clouds
  3438. //1, 3, 4E = smog
  3439. //1, 4, 4E = foggy
  3440. //1, 5, 4E = overcast
  3441. //1, 6, 4E = rain
  3442. //1, 7, 4E = thunder
  3443. //1, 8, 4E clearing
  3444. //1, 9, 4E = netutral
  3445. //1, A, 4E snow
  3446. //1, B, 4E blizzard
  3447. //1, C, 4E snowlight
  3448. //1, D, 4E xmas
  3449. //0, 0, 4E reset
  3450.  
  3451.  
  3452.  
  3453. //sub_0x003D402C();
  3454. //sub_0x0046EE68(value_0x040D130D0, value_0x046EE68, value_0x0470810);
  3455. //sub_0x0109592C();
  3456. //sub_0x010959D0();
  3457.  
  3458.  
  3459.  
  3460. //these args could be found in the data to hook to find the weather they changed it to
  3461. //sub_1095B24(time_cycle_struct/*0x2148E84*, value_0x97, value_0x4A38);
  3462.  
  3463. //sub_12F3C00(cNetPlayer, cNetPlayer, value_0x1340940);
  3464.  
  3465. //weahther event caller
  3466. //sub_12C2ECC(0x1, 0xD, 0x4E);
  3467.  
  3468. //joining a new session
  3469. //sub_109570C(time_cycle_struct/*0x2148E84*, value_1, value_0x497C8, value_0x1388, "ECYCLE/W_EXTRASUNNY.XML.");
  3470.  
  3471. //for all session.
  3472. //sub_109536C(dword_2148E84_not_prt, weather_value, value_1_or_0);
  3473.  
  3474.  
  3475.  
  3476.  
  3477. /*
  3478. r0=00000000010953E0 r8=0000000002240000 r16=0000000000000000 r24=0000000001C28AA0
  3479. r1=00000000D003FC60 r9=0000000002C91001 r17=00000000D0040430 r25=0000000000000001
  3480. r2=0000000001C85330 r10=0000000000000000 r18=0000000035F35344 r26=0000000000000000
  3481. r3=0000000000000001 r11=000000003225B1F4 r19=0000000001CC2FA8 r27=0000000035F2BFFF
  3482. r4=0000000000000005 r12=00000000D003FB10 r20=000000003228FAB4 r28=0000000035F35344
  3483. r5=00000000000000AC r13=0000000010007060 r21=0000000035F00000 r29=0000000000000005
  3484. r6=0000000000000000 r14=0000000000000000 r22=0000000001E70370 r30=0000000000000001
  3485. r7=0000000000000000 r15=0000000000000000 r23=00000000321A7080 r31=0000000002148E84
  3486.  
  3487. xer=0000000020000000 ctr=00000000008FD3B0 lr=0000000001095434 fpscr=BE302500
  3488.  
  3489. cr=24000022 cr0=EQ cr1=GT cr2= cr3= cr4= cr5= cr6=EQ cr7=EQ
  3490.  
  3491. pc=00000000012C2ECC
  3492.  
  3493. Executing
  3494.  
  3495. */
  3496.  
  3497.  
  3498.  
  3499. GAME_EXPORT bool networkIsHost();
  3500. GAME_EXPORT void networkKickPlayer_host(int32_t host_prt, int32_t value);
  3501. GAME_EXPORT void request_something_from_host(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5);
  3502. GAME_EXPORT int32_t sub_12F6D7C()
  3503. GAME_EXPORT int 32_t sub_176404C(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6, int32_t a7)
  3504.  
  3505. int32_t sub_13E0C38(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6, int32_t a7, int32_t a8, int32_t a9, int32_t a10)
  3506. {
  3507. int32_t result = sub_150AA80(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
  3508. if (*(int32_t *)result == 0)
  3509. {
  3510. return result;
  3511. }
  3512. if (*(int32_t *)(result + 8) == 0 || *(int32_t *)(result + 12) == 0)
  3513. {
  3514. return 0;
  3515. }
  3516. int32_t result2 = 0;
  3517. if (sub_16276C4((int32_t)&result2, *(int32_t *)(result + 4)) == 0)
  3518. {
  3519. return 0;
  3520. }
  3521. if (result2 != *(int32_t *)0x2258B90)
  3522. {
  3523. return result2;
  3524. }
  3525. if (networkIsHost() == 0 || *(int32_t *)(result + 8) == 0)
  3526. {
  3527. return 0;
  3528. }
  3529. int32_t result4;
  3530. int32_t v1 = &result4;
  3531. sub_A8B814(v1);
  3532. sub_A8B8DC(v1, *(int32_t *)result);
  3533. int32_t v2 = 0;
  3534. if (sub_16271AC((int32_t)&v2, v1) != 0)
  3535. {
  3536. int32_t v3;
  3537. if ((v3 & 64) == 0 & *(int32_t *)0x2258B90 == v2)
  3538. {
  3539. int32_t result3;
  3540. int32_t v4;
  3541. int32_t v5;
  3542. int32_t v6;
  3543. if (v5 + 8 <= ((v3 & 128) == 0 ? v6 : v4))
  3544. {
  3545. int32_t v7;
  3546. int32_t v8;
  3547. sub_A8B588((int32_t)&v7, 8, v5 + v8);
  3548. sub_A8BAD8(v1, 8);
  3549. int32_t v9 = sub_A8BA28(v1);
  3550. if (v9 == *(int32_t *)(result + 4))
  3551. {
  3552. int32_t v10 = *(int32_t *)(result + 8);
  3553. result3 = networkKickPlayer_host(*(int32_t *)0x1CF72C4, v10, v7 % 256);
  3554. }
  3555. else
  3556. {
  3557. result3 = v9;
  3558. }
  3559. }
  3560. else
  3561. {
  3562. result3 = result4;
  3563. }
  3564. return result3;
  3565. }
  3566. }
  3567. return result4;
  3568. }
  3569. //mgrKickPlayer class
  3570. //MsgBlacklist class
  3571. //MsgBlacklist12AutoIdDesc__E
  3572. int32_t sub_176404C(int32_t a1) //request kick
  3573. {
  3574. //0x1888B90 rage::AutoIdDescriptorE
  3575. //0x22693F8 rage::msgPartyLeaveGame::AutoIdDesc__
  3576. //0x1FFE474 rage::netMessage::AutoIdDesc__
  3577. //0x18F25D0 class rage::AutoIdDescriptor<netMessage>
  3578. //0x19318C0 msgRequestKickFromHost::AutoIdDesc__
  3579. //TEXT 0x19318C8 = msgRequestKickFromHost
  3580.  
  3581. int32_t v1 = sub_1803770(a1);
  3582. sub_D04088(v1, 1, 0x19318C8, 0x1FFE474, 1);
  3583. *(int32_t *)v1 = 0x18F25D0;
  3584. if (*(char *)0x2269418 == 0)
  3585. {
  3586. sub_D03258(0x22693F8);
  3587. *(char *)0x2269418 = 1;
  3588. }
  3589. sub_D04260(0x22693F8, v1);
  3590. *(int32_t *)v1 = 0x19318C0;
  3591. return 0x19318C0;
  3592. }
  3593. int32_t sub_1624C94(int32_t a1) //black list
  3594. {
  3595. int32_t v1 = sub_1803770(a1);
  3596. *(int32_t *)v1 = 0x18F25D0;
  3597. if (*(char *)0x2269418 == 0)
  3598. {
  3599. sub_D03258(0x22693F8);
  3600. *(char *)0x2269418 = 1;
  3601. }
  3602. sub_D03298(0x22693F8, v1);
  3603. *(int32_t *)v1 = 0x1888B90;
  3604. return 0x1888B90;
  3605. }
  3606. int32_t sub_162A01C(int32_t a1) //kick msg
  3607. {
  3608. int32_t v1 = sub_1803770(a1);
  3609. int32_t v2 = v1;
  3610. if (v1 == 0)
  3611. {
  3612. return 0;
  3613. }
  3614. *(int32_t *)v1 = 0x18F25D0;
  3615. if (*(char *)0x2269418 == 0)
  3616. {
  3617. sub_D03258(0x22693F8);
  3618. *(char *)0x2269418 = 1;
  3619. }
  3620. sub_D03298(0x22693F8, v2);
  3621. *(int32_t *)v2 = 0x1888B90;
  3622. return sub_10230(v2, 0x1888B90);
  3623. }
  3624. int32_t sub_1357CA0(int32_t a1, int32_t a2, int32_t a3)
  3625. {
  3626. int32_t v1 = loc_150AA84(a1, a2, a3);
  3627. int32_t v2;
  3628. int32_t v3 = &v2;
  3629. v2 = 0;
  3630. int32_t result;
  3631. if (sub_A91D04(a2, 0x1850D34, v3, 32) == 0)
  3632. {
  3633. result = false;
  3634. }
  3635. else
  3636. {
  3637. int32_t v4 = sub_AE580C(v3, 0);
  3638. *(int32_t *)(v1 + 4) = v4;
  3639. if (v4 == 0xDD245B9C) //hash of "vehicle"
  3640. {
  3641. sub_A91D04(a2, 0x1851F70, v1 + 12, 64);
  3642. }
  3643. result = 1;
  3644. }
  3645. return result;
  3646. }
  3647. int32_t sub_1358EB8(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6, int32_t a7)
  3648. {
  3649. int32_t v1 = sub_150AA84(a1, a2, a3, a4, a5, a6, a7);
  3650. switch (*(int32_t *)(v1 + 4))
  3651. {
  3652. case 0xDD245B9C: //hash of "vehicle"
  3653. {
  3654. int32_t v2 = *(int32_t *)(*(int32_t *)0x1CEFCF8 + 4);
  3655. if (v2 != 0)
  3656. {
  3657. if ((*(int32_t *)(v2 + 3556) & 0x40000000) != 0)
  3658. {
  3659. if (*(int32_t *)(v2 + 3740) != 0)
  3660. {
  3661. return 0;
  3662. }
  3663. }
  3664. sub_103FCA4(v1 + 12);
  3665. }
  3666. return 0;
  3667. }
  3668. case 0xC2F12A5B: // hash collosion but works "cxazuog" //hash of "" // related to EXPLOSION_EVENT
  3669. {
  3670. int32_t v3 = sub_1117978();
  3671. if (v3 == 0)
  3672. {
  3673. return 0;
  3674. }
  3675. int32_t v4;
  3676. int32_t v5 = &v4;
  3677. sub_5704A8(v5, v3, 0);
  3678. int32_t v6 = sub_AEBB54(*(int32_t *)0x1CBAEAC, 276, 16);
  3679. sub_570AC4(v6, v5, 16, 0);
  3680. int32_t v7;
  3681. int32_t v8 = &v7;
  3682. sub_622E4(v8, 3, v6, 0, 79, 0, 0);
  3683. int32_t v9 = sub_585C8(*(int32_t *)(v3 + 3020) + 788, v8);
  3684. if (v9 != 0)
  3685. {
  3686. char * v10 = (char *)(v9 + 12);
  3687. *v10 = *v10 % 128;
  3688. }
  3689. sub_62368(v8);
  3690. int32_t v11;
  3691. if (v11 != 0)
  3692. {
  3693. sub_150AD08((int32_t)&v11);
  3694. }
  3695. return 0;
  3696. }
  3697. case 0x84643284: //hash of "kick"
  3698. {
  3699. if (networkIsHost() == 0)
  3700. {
  3701. int32_t v12 = sub_12F6D7C();
  3702. if (v12 != 0)
  3703. {
  3704. int32_t v13;
  3705. int32_t v14 = &v13;
  3706. sub_A8B814(v14);
  3707. int32_t v15;
  3708. int32_t v16 = &v15;
  3709. sub_A8B908(v14, v16, 982);
  3710. bool v17 = false;
  3711. if (sub_1626844(*(int32_t *)0x2258B90, v14) != 0)
  3712. {
  3713. bool v18 = false;
  3714. int32_t v19;
  3715. int32_t v20;
  3716. int32_t v21;
  3717. if (v20 + 8 <= v19 && (v21 & 128) == 0)
  3718. {
  3719. if ((v21 & 64) == 0)
  3720. {
  3721. int32_t v22;
  3722. sub_A8B5FC(v13, 4, 8, v20 + v22, v22);
  3723. }
  3724. sub_A8BBBC(v14, 8);
  3725. v18 = true;
  3726. }
  3727. v17 = v18;
  3728. }
  3729. sub_A8B978(v14);
  3730. if (v17)
  3731. {
  3732. request_something_from_host(v12, v16, 0, 0, 0);
  3733. }
  3734. }
  3735. }
  3736. else
  3737. {
  3738. if (*(int32_t *)(*(int32_t *)0x1CF72BC + 140) != 0)
  3739. {
  3740. //value = 0 you been kicked from this GTA Online sesison by other players
  3741. //value = 1 connection was lost due to an unknown network error
  3742. //value = 2 says player left. (cool kinda kick, player can join back)
  3743. //value = 3 connection was lost due to an unknown network error
  3744. //value = 4 You Have been removed from this session by a Rockstar Games administrator.
  3745. //value = 5 connection was lost due to an unknown network error
  3746. //value = 6 connection was lost due to an unknown network error
  3747. //value = 7 connection was lost due to an unknown network error
  3748. //vlaue = 8 You were kicked from this GTA Online sesison by other players
  3749. networkKickPlayer_host(*(int32_t *)0x1CF72C4, 4);
  3750. }
  3751. }
  3752. return 0;
  3753. }
  3754. case 0x4349E22B: //hash of "relax" // related to RAGDOLL_REQUEST_EVENT
  3755. {
  3756. int32_t v23 = sub_1117978();
  3757. if (v23 != 0)
  3758. {
  3759. int32_t v24 = sub_AEBB54(*(int32_t *)0x1CBAEAC, 196, 16);
  3760. sub_7075A0(v24, 1000, 0x2710, 0x149f0, 0); // v24 = CTaskMoveStandStill
  3761. int32_t v25;
  3762. int32_t v26 = &v25;
  3763. sub_67924(v26, 0x2710, v24, 0, 1000);
  3764. sub_10194B0(v23, v26); // v23 = CPed, v26 = 37
  3765. sub_67990(v26);
  3766. }
  3767. return 0;
  3768. }
  3769. }
  3770. return 0;
  3771. }
  3772.  
  3773.  
  3774.  
  3775.  
  3776.  
  3777. int32_t sub_A17A58(int32_t a1, int32_t a2, int32_t a3, uint32_t a4, int32_t a5, int32_t a6)
  3778. {
  3779. int32_t v1 = 0;
  3780. uint32_t v2 = 32 - a3;
  3781. uint32_t v3 = v2 % 32;
  3782. uint32_t v4 = (v2 & 32) != 0 ? 0 : -1 << v3;
  3783. uint32_t v5 = a4 % 8;
  3784. uint32_t v6 = (v2 & 32) != 0 ? 0 : a2 << v3;
  3785. char * v7 = (char *)v1;
  3786. unsigned char v8 = *v7;
  3787. uint32_t v9 = 8 - v5;
  3788. uint32_t v10 = v6 << v9;
  3789. int32_t v11 = v1 + 1;
  3790. char * v12 = (char *)v11;
  3791. uint32_t v13 = v4 << v9;
  3792. *v7 = (char)((int32_t)v8 & (v4 / 0x1000000 >> v5 ^ 255) | v6 / 0x1000000 >> v5);
  3793. int32_t v14 = sub_A8B68C(v9, v13, a3, v10, v11, v4);
  3794. unsigned char v15 = *v12; // 0xa8b65c
  3795. *v12 = (char)((int32_t)v15 & (v13 / 0x1000000 ^ 255) | v10 / 0x1000000);
  3796. return v14 + 8;
  3797. }
  3798. int32_t networkKickPlayer_host(int32_t a1, int32_t * a2, int32_t a3, int32_t a4)
  3799. {
  3800. int32_t v1 = (int32_t)a2;
  3801. int32_t v2 = loc_150AA6C(a1, v1, a3, a4);
  3802. if (a2 == NULL | sub_96D614(*(int32_t *)(v2 + 64)) == 0)
  3803. {
  3804. return 0;
  3805. }
  3806. int32_t v3 = a3 < 3;
  3807. int32_t v4;
  3808. int32_t v5;
  3809. int32_t v6;
  3810. int32_t result;
  3811. if (sub_9F8FD8(v1) != 0)
  3812. {
  3813. sub_1358AAC(v2, a3);
  3814. v4 = 0;
  3815. switch (a3)
  3816. {
  3817. case 0:
  3818. {
  3819. v4 = 1;
  3820. break;
  3821. }
  3822. case 4:
  3823. {
  3824. v4 = 1;
  3825. break;
  3826. }
  3827. }
  3828. if (v3 == 0)
  3829. {
  3830. v5 = sub_6BBC08(v1);
  3831. sub_135282C(v3, v5, v4);
  3832. }
  3833. v6 = sub_6BBC08(v1);
  3834. result = sub_970F28(*(int32_t *)(v2 + 64), v6, 1, 0, 0);
  3835. return result;
  3836. }
  3837. if (a3 == 2)
  3838. {
  3839. if (v3 == 0)
  3840. {
  3841. v5 = sub_6BBC08(v1);
  3842. sub_135282C(v3, v5, 0);
  3843. }
  3844. v6 = sub_6BBC08(v1);
  3845. result = sub_970F28(*(int32_t *)(v2 + 64), v6, 1, 0, 0);
  3846. return result;
  3847. }
  3848. int32_t v7;
  3849. sub_D26100((int32_t)&v7);
  3850. sub_9716D8(*(int32_t *)(v2 + 64));
  3851. sub_9F8688(v1);
  3852. int32_t v8 = sub_96EF94(*(int32_t *)(v2 + 64), sub_9f87BC(v1));
  3853. if (v8 != 0)
  3854. {
  3855. sub_1358D14(sub_96D0D0(v8));
  3856. }
  3857. v4 = 0;
  3858. switch (a3)
  3859. {
  3860. case 0:
  3861. {
  3862. v4 = 1;
  3863. break;
  3864. }
  3865. case 4:
  3866. {
  3867. v4 = 1;
  3868. break;
  3869. }
  3870. }
  3871. if (v3 == 0)
  3872. {
  3873. v5 = sub_6BBC08(v1);
  3874. sub_135282C(v3, v5, v4);
  3875. }
  3876. v6 = sub_6BBC08(v1);
  3877. result = sub_970F28(*(int32_t *)(v2 + 64), v6, 1, 0, 0);
  3878. return result;
  3879. }
  3880. int32_t sub_1356F48(int32_t a1, int32_t a2, int32_t a3, int32_t a4)
  3881. {
  3882. int32_t v1 = loc_150AA80(a1, a2, a3, a4);
  3883. if (sub_12D804C(1) == 0)
  3884. {
  3885. return 0;
  3886. }
  3887. int32_t v2 = sub_D3D6EC(a3);
  3888. if (v2 == 0)
  3889. {
  3890. return v2 != 0;
  3891. }
  3892. int32_t v3 = sub_12EF35C();
  3893. int32_t v4;
  3894. int32_t v5 = &v4;
  3895. int32_t v6 = 0x1931800;
  3896. sub_D21058(v5);
  3897. int32_t v7;
  3898. int32_t v8 = &v7;
  3899. sub_D247A8(v8);
  3900. sub_14F6178(v5, a3, 9);
  3901. int32_t v9 = 18;
  3902. int32_t v10 = 0;
  3903. while (true)
  3904. {
  3905. int32_t v11 = v10;
  3906. *(char *)(v11 + 136) = *(char *)(a3 + 16 + v10);
  3907. *(char *)(v11 + 137) = *(char *)(17 + a3 + v10);
  3908. int32_t v12 = v9 - 1;
  3909. v9 = v12;
  3910. if (v12 == 0)
  3911. {
  3912. int32_t v13;
  3913. sub_D04070((int32_t)&v13, a3 + 52);
  3914. sub_14F6178(v8, v3, 46);
  3915. int32_t v14;
  3916. sub_D3D738(v5, (int32_t)&v14, 768, 0);
  3917. int32_t result = sub_13518A4((int32_t)&v6, v1, a2);
  3918. return result;
  3919. }
  3920. v10 += 2;
  3921. }
  3922. }
  3923. int32_t sub_13519D0(int32_t a1, int32_t a2)
  3924. {
  3925. int32_t v1 = loc_150AA80(a1, a2);
  3926. int32_t result = sub_12E4FAC(v1);
  3927. if (result != 0)
  3928. {
  3929. return result;
  3930. }
  3931. if (sub_D2D690(0) == 0)
  3932. {
  3933. return 0;
  3934. }
  3935. int32_t v2 = sub_D2EA08(result);
  3936. if (sub_D2D338(v2) == 0)
  3937. {
  3938. return 0;
  3939. }
  3940. int32_t v3;
  3941. int32_t v4 = &v3;
  3942. int32_t v5;
  3943. int32_t v6 = &v5;
  3944. sub_A8F724(v4, v6, 1024, 1);
  3945. if (sub_A8F950(v4, 0, 0) == 0 || sub_13300F0(v1, v4) == 0 || sub_A8FBDC(v4) == 0)
  3946. {
  3947. return 0;
  3948. }
  3949. if ((a2 & 8) != 0)
  3950. {
  3951. sub_D44010(result, v6);
  3952. }
  3953. if ((a2 & 16) != 0)
  3954. {
  3955. if (sub_D3A440(result) != 0)
  3956. {
  3957. sub_D44230(result, v6);
  3958. }
  3959. }
  3960. if ((a2 & 4) == 0)
  3961. {
  3962. return 0;
  3963. }
  3964. int32_t v7;
  3965. int32_t v8 = &v7;
  3966. sub_D247A8(v8);
  3967. if (sub_D2D610(result, v8) == 0)
  3968. {
  3969. return 0;
  3970. }
  3971. int32_t v9;
  3972. int32_t v10 = &v9;
  3973. sub_D40558(v10, 0x1878AA4, v6);
  3974. int32_t v11;
  3975. int32_t v12 = &v11;
  3976. int32_t v13;
  3977. int32_t v14 = &v13;
  3978. sub_A8F788(v12, v14, 1024, 1);
  3979. int32_t result2;
  3980. if (sub_D405A0(v10, v12) != 0)
  3981. {
  3982. result2 = sub_D43FF0(result, v8, 1, v14, 0);
  3983. }
  3984. else
  3985. {
  3986. result2 = 0;
  3987. }
  3988. return result2;
  3989. }
  3990. int32_t sub_13518A4(int32_t a1, int32_t a2, int32_t a3)
  3991. {
  3992. int32_t v1 = loc_150AA7C(a1, a2, a3);
  3993. int32_t result = sub_12E4fAC(v1);
  3994. if (result != 0)
  3995. {
  3996. return result;
  3997. }
  3998. if (sub_D2D690(0) == 0)
  3999. {
  4000. return 0;
  4001. }
  4002. int32_t v2 = sub_D2EA08(result);
  4003. if (sub_D2D338(v2) == 0)
  4004. {
  4005. return 0;
  4006. }
  4007. int32_t v3;
  4008. int32_t v4 = &v3;
  4009. int32_t v5;
  4010. int32_t v6 = &v5;
  4011. sub_A8F724(v4, v6, 1024, 1);
  4012. if (sub_A8F950(v4, 0, 0) == 0)
  4013. {
  4014. return 0;
  4015. }
  4016. int32_t result2;
  4017. if (sub_13300F0(v1, v4) != 0)
  4018. {
  4019. int32_t v7 = sub_A8FBDC(v4);
  4020. if (v7 != 0 && a2 != 0 && a3 > 0)
  4021. {
  4022. int32_t v8;
  4023. int32_t v9 = &v8;
  4024. sub_D40558(v9, 0x1878AA4, v6);
  4025. int32_t v10;
  4026. int32_t v11 = &v10;
  4027. int32_t v12;
  4028. int32_t v13 = &v12;
  4029. sub_A8F788(v11, v13, 1024, 1);
  4030. if (sub_D405A0(v9, v11) != 0)
  4031. {
  4032. result2 = sub_D43FD0(result, a2, a3, v13, 0);
  4033. }
  4034. else
  4035. {
  4036. result2 = 0;
  4037. }
  4038. return result2;
  4039. }
  4040. result2 = v7;
  4041. }
  4042. else
  4043. {
  4044. result2 = 0;
  4045. }
  4046. return result2;
  4047. }
  4048. int32_t sub_D44010(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6)
  4049. {
  4050. int32_t v1 = loc_150AA70(a1, a2, a3, a4, a5, a6);
  4051. int32_t v2 = 0;
  4052. int32_t v3;
  4053. int32_t v4 = &v3;
  4054. bool result2 = false;
  4055. int32_t v5 = v4;
  4056. sub_AE8C70(v4, 0, 48);
  4057. int32_t v6 = -1;
  4058. *(char *)(v5 + 44) = (char)result2;
  4059. int32_t v7 = v5;
  4060. *(char *)(v7 + 45) = (char)result2;
  4061. *(int32_t *)v5 = v6;
  4062. sub_AE8C70(v7, 0, 48);
  4063. *(int32_t *)v5 = v6;
  4064. *(char *)(v5 + 44) = (char)result2;
  4065. v2++;
  4066. *(char *)(v5 + 45) = (char)result2;
  4067. *(int32_t *)(v5 + 48) = (int32_t)result2;
  4068. int32_t v8 = v5 + 52;
  4069. v5 = v8;
  4070. while (v2 < 100)
  4071. {
  4072. sub_AE8C70(v8, 0, 48);
  4073. v6 = -1;
  4074. *(char *)(v5 + 44) = (char)result2;
  4075. v7 = v5;
  4076. *(char *)(v7 + 45) = (char)result2;
  4077. *(int32_t *)v5 = v6;
  4078. sub_AE8C70(v7, 0, 48);
  4079. *(int32_t *)v5 = v6;
  4080. *(char *)(v5 + 44) = (char)result2;
  4081. v2++;
  4082. *(char *)(v5 + 45) = (char)result2;
  4083. *(int32_t *)(v5 + 48) = (int32_t)result2;
  4084. v8 = v5 + 52;
  4085. v5 = v8;
  4086. }
  4087. int32_t v9 = 100;
  4088. int32_t v10 = sub_D43B5C(v1, v4, (int32_t)&v9);
  4089. int32_t result = result2;
  4090. if (v10 == 0)
  4091. {
  4092. return result;
  4093. }
  4094. int32_t v11;
  4095. int32_t v12 = &v11;
  4096. v5 = v12;
  4097. sub_AE8C70(v12, 0, 48);
  4098. *(char *)(v5 + 44) = (char)result2;
  4099. result++;
  4100. *(char *)(v5 + 45) = (char)result2;
  4101. *(int32_t *)v5 = -1;
  4102. int32_t v13 = v5 + 48;
  4103. v5 = v13;
  4104. while (result < 100)
  4105. {
  4106. sub_AE8C70(v13, 0, 48);
  4107. *(char *)(v5 + 44) = (char)result2;
  4108. result++;
  4109. *(char *)(v5 + 45) = (char)result2;
  4110. *(int32_t *)v5 = -1;
  4111. v13 = v5 + 48;
  4112. v5 = v13;
  4113. }
  4114. int32_t v14 = result2;
  4115. v6 = v14;
  4116. int32_t v15 = v9;
  4117. v5 = v14;
  4118. int32_t v16;
  4119. int32_t v17;
  4120. int32_t v18;
  4121. int32_t v19;
  4122. int32_t v20;
  4123. int32_t v21;
  4124. int32_t v22;
  4125. int32_t v23;
  4126. int32_t v24;
  4127. if (v15 <= 0)
  4128. {
  4129. if (v14 == 0)
  4130. {
  4131. return 1;
  4132. }
  4133. v22 = a2;
  4134. v21 = 0x1851618;
  4135. sub_150BB04((int32_t)&v24, (int32_t)&v21, 64);
  4136. v16 = &v19;
  4137. sub_150BB04(v16, (int32_t)&v22, 1024);
  4138. v17 = &v23;
  4139. v18 = &v20;
  4140. sub_A8F788(v17, v18, 1024, 1);
  4141. if (sub_D405A0(v16, v17) == 0)
  4142. {
  4143. return result2;
  4144. }
  4145. if (sub_D3F6AC(v1, v12, v5, v18, 0) != 0)
  4146. {
  4147. result2 = true;
  4148. }
  4149. return result2;
  4150. }
  4151. result = v4;
  4152. int32_t v25;
  4153. int32_t v26 = &v25;
  4154. v2 = v26;
  4155. int32_t v27 = v14;
  4156. int32_t v28 = v14;
  4157. int32_t v29;
  4158. while (true)
  4159. {
  4160. v29 = v27;
  4161. int32_t v30 = v15;
  4162. int32_t v31 = v4;
  4163. int32_t v32 = v26;
  4164. int32_t v33 = v28;
  4165. if ((*(int32_t *)v26 & 2) != 0)
  4166. {
  4167. sub_AE8C70(1176, 0, 48);
  4168. *(char *)1220 = (char)result2;
  4169. *(char *)1221 = (char)result2;
  4170. *(int32_t *)1176 = -1;
  4171. sub_14F6178(1176, result, 46);
  4172. int32_t v34 = v5 + 1;
  4173. v5 = v34;
  4174. v29 = v34;
  4175. v30 = v9;
  4176. v31 = result;
  4177. v32 = v2;
  4178. v33 = v6;
  4179. }
  4180. int32_t v35 = v33 + 1;
  4181. v6 = v35;
  4182. int32_t v36 = v32 + 52;
  4183. v2 = v36;
  4184. int32_t v37 = v31 + 52;
  4185. result = v37;
  4186. if (v35 >= v30)
  4187. {
  4188. break;
  4189. }
  4190. v27 = v29;
  4191. v28 = v35;
  4192. v15 = v30;
  4193. v4 = v37;
  4194. v26 = v36;
  4195. }
  4196. if (v29 == 0)
  4197. {
  4198. return 1;
  4199. }
  4200. v22 = a2;
  4201. v21 = 0x1851618;
  4202. sub_150BB04((int32_t)&v24, (int32_t)&v21, 64);
  4203. v16 = &v19;
  4204. sub_150BB04(v16, (int32_t)&v22, 1024);
  4205. v17 = &v23;
  4206. v18 = &v20;
  4207. sub_A8F788(v17, v18, 1024, 1);
  4208. if (sub_D405A0(v16, v17) != 0)
  4209. {
  4210. if (sub_D3F6AC(v1, v12, v5, v18, 0) != 0)
  4211. {
  4212. result2 = true;
  4213. }
  4214. }
  4215. return result2;
  4216. }
  4217. //sub_D3F6AC(0, "NAME_PADDING", 1, json_context, 0);
  4218. int32_t sub_D3F6AC(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5)
  4219. {
  4220. int32_t v1 = loc_150AA70(a1, a2, a3, a4, a5);
  4221. bool result = false;
  4222. char v2 = *(char *)0x1CCB210;
  4223. if (a4 == 0 || v1 > 0 || ((int32_t)(v1 < 0) || (int32_t)(v2 == 0)) != 0 || sub_14F8DD4(a4) <= 0)
  4224. {
  4225. return result;
  4226. }
  4227. int32_t v3 = result;
  4228. bool v4 = true;
  4229. if (*(char *)0x1CCB134 != 0)
  4230. {
  4231. v3 = 0x2005010;
  4232. }
  4233. int32_t v5 = *(int32_t *)v3;
  4234. int32_t v6 = v5;
  4235. if (v5 == 0)
  4236. {
  4237. return result;
  4238. }
  4239. sub_D320D8(v5, 0, 0);
  4240. *(int32_t *)(v6 + 1592) = -1;
  4241. *(int32_t *)v6 = 0x1908950;
  4242. sub_D32030(v6 + 1600, -1, 0x1908950);
  4243. int32_t v7 = result;
  4244. *(int32_t *)(v6 + 3160) = v7;
  4245. *(int32_t *)(v6 + 3164) = v7;
  4246. *(int32_t *)(v6 + 3168) = v7;
  4247. *(int32_t *)(v6 + 28) = v3;
  4248. *(int32_t *)v6 = 0x190BA90;
  4249. if (v6 == 0)
  4250. {
  4251. return result;
  4252. }
  4253. int32_t v8 = v6 + 3164;
  4254. v3 = v8;
  4255. int32_t * v9;
  4256. int32_t v10;
  4257. int32_t v11;
  4258. int32_t v12;
  4259. if (v8 != 0)
  4260. {
  4261. if (*(int32_t *)v8 == 1)
  4262. {
  4263. v10 = v6;
  4264. if (v10 == 0)
  4265. {
  4266. return result;
  4267. }
  4268. v11 = result;
  4269. v12 = v11;
  4270. if (*(char *)0x1CCB134 != 0)
  4271. {
  4272. v12 = v4 ? 0x2005010 : 0;
  4273. }
  4274. v9 = (int32_t *)(v10 + 28);
  4275. if (v12 == *v9)
  4276. {
  4277. *v9 = v11;
  4278. }
  4279. return result;
  4280. }
  4281. }
  4282. if (sub_D38374(v6, v1, a2, a3, a4, a5) != 0)
  4283. {
  4284. if (sub_D29A80(v6, v3) != 0)
  4285. {
  4286. if (sub_D29818(0, v6) == 0)
  4287. {
  4288. v10 = v6;
  4289. if (v10 != 0)
  4290. {
  4291. v11 = result;
  4292. v12 = v11;
  4293. if (*(char *)0x1CCB134 != 0)
  4294. {
  4295. v12 = v4 ? 0x2005010 : 0;
  4296. }
  4297. v9 = (int32_t *)(v10 + 28);
  4298. if (v12 == *v9)
  4299. {
  4300. *v9 = v11;
  4301. }
  4302. }
  4303. }
  4304. else
  4305. {
  4306. result = true;
  4307. }
  4308. return result;
  4309. }
  4310. }
  4311. if (v3 == 0)
  4312. {
  4313. v10 = v6;
  4314. }
  4315. else
  4316. {
  4317. if (*(int32_t *)(v6 + 3164) != 2)
  4318. {
  4319. sub_1524308(v3, 1, 0);
  4320. sub_1524308(v3, 2, -1);
  4321. v10 = v6;
  4322. }
  4323. else
  4324. {
  4325. v10 = v6;
  4326. }
  4327. }
  4328. if (v10 != 0)
  4329. {
  4330. v11 = result;
  4331. v12 = v11;
  4332. if (*(char *)0x1CCB134 != 0)
  4333. {
  4334. v12 = v4 ? 0x2005010 : 0;
  4335. }
  4336. v9 = (int32_t *)(v10 + 28);
  4337. if (v12 == *v9)
  4338. {
  4339. *v9 = v11;
  4340. }
  4341. }
  4342. return result;
  4343. }
  4344. int32_t sub_D6CBC4(int32_t a1, int32_t a2, int32_t * a3)
  4345. {
  4346. int32_t v1 = (int32_t)a3;
  4347. int32_t v2 = loc_150AA78(a1, a2, v1);
  4348. uint28_t v3 = 0;
  4349. int28_t v4 = v2 > 0 ? 0x4000000 : 0;
  4350. int28_t v5 = v2 == 0 ? 0x2000000 : 0;
  4351. int28_t v6 = 0x8000000 * (int28_t)(v2 < 0) | v3 % 0x1000000 | v4 | v5;
  4352. if (a3 == NULL || (v3 & 128) == 0 || v6 < 0)
  4353. {
  4354. return 0;
  4355. }
  4356. bool v7 = true;
  4357. int32_t v8 = *(int32_t *)0x2005010;
  4358. int32_t v9 = v8;
  4359. if (v8 == 0)
  4360. {
  4361. return 0;
  4362. }
  4363. sub_D320D8(v8, 0, 0);
  4364. *(int32_t *)v9 = 0x1908950;
  4365. *(int32_t *)(v9 + 1592) = -1;
  4366. sub_D32030(v9 + 1600, 0x1908950, -1);
  4367. *(int32_t *)(v9 + 3160) = 0;
  4368. *(int32_t *)(v9 + 28) = 0x2005010;
  4369. *(int32_t *)v9 = 0x190B510;
  4370. if (v9 == 0)
  4371. {
  4372. return 0;
  4373. }
  4374. int32_t * v10;
  4375. int32_t v11;
  4376. int32_t v12;
  4377. int32_t v13;
  4378. int32_t v14;
  4379. if (*(int32_t *)v1 != 1)
  4380. {
  4381. if (sub_D37970(v9, v2, a2) != 0)
  4382. {
  4383. if (sub_D29A80(v9, v1) != 0)
  4384. {
  4385. int32_t result = 1;
  4386. if (sub_D29818(0, v9) == 0)
  4387. {
  4388. v11 = v9;
  4389. if (v11 != 0)
  4390. {
  4391. v14 = *(int32_t *)(v11 + 12);
  4392. if (((int32_t)(v14 < 2) ^ 1 || (int32_t)(v14 < 0)) != 0)
  4393. {
  4394. *(int32_t *)(v1 + 4) = -1;
  4395. }
  4396. v13 = 0;
  4397. if (*(char *)0x1CCB134 != 0)
  4398. {
  4399. v13 = v7 ? 0x2005010 : 0;
  4400. }
  4401. v12 = v9;
  4402. if (v12 != 0)
  4403. {
  4404. v10 = (int32_t *)(v12 + 28);
  4405. if (v13 == *v10)
  4406. {
  4407. *v10 = 0;
  4408. result = 0;
  4409. }
  4410. else
  4411. {
  4412. result = 0;
  4413. }
  4414. }
  4415. else
  4416. {
  4417. result = 0;
  4418. }
  4419. }
  4420. else
  4421. {
  4422. result = 0;
  4423. }
  4424. }
  4425. return result;
  4426. }
  4427. }
  4428. if (*(int32_t *)v1 != 2)
  4429. {
  4430. sub_1524308(v1, 1, 0);
  4431. sub_1524308(v1, 2, -1);
  4432. }
  4433. }
  4434. v11 = v9;
  4435. if (v11 == 0)
  4436. {
  4437. return 0;
  4438. }
  4439. v14 = *(int32_t *)(v11 + 12);
  4440. if (((int32_t)(v14 < 2) ^ 1 || (int32_t)(v14 < 0)) != 0)
  4441. {
  4442. *(int32_t *)(v1 + 4) = -1;
  4443. }
  4444. v13 = 0;
  4445. if (*(char *)0x1CCB134 != 0)
  4446. {
  4447. v13 = v7 ? 0x2005010 : 0;
  4448. }
  4449. v12 = v9;
  4450. if (v12 != 0)
  4451. {
  4452. v10 = (int32_t *)(v12 + 28);
  4453. if (v13 == *v10)
  4454. {
  4455. *v10 = 0;
  4456. }
  4457. }
  4458. return 0;
  4459. }
  4460. int32_t sub_D651E4(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6, int32_t * a7)
  4461. {
  4462. int32_t v1 = (int32_t)a7;
  4463. int32_t v2 = sub_150AA68(a1, a2, a3, a4, a5, a6, v1);
  4464. bool result = false;
  4465. int32_t v3 = 0x2005010;
  4466. int32_t v4 = *(int32_t *)0x2005010;
  4467. int32_t v5 = v4;
  4468. if (v4 == 0)
  4469. {
  4470. return false;
  4471. }
  4472. sub_D320D8(v4, 0, 0);
  4473. *(int32_t *)(v5 + 1592) = -1;
  4474. *(int32_t *)v5 = 0x1908950;
  4475. sub_D32030(v5 + 1600, -1, 0x1908950);
  4476. *(int32_t *)(v5 + 3160) = (int32_t)result;
  4477. *(int32_t *)(v5 + 28) = 0x2005010;
  4478. *(int32_t *)v5 = 0x190A540;
  4479. if (v5 == 0)
  4480. {
  4481. return result;
  4482. }
  4483. int32_t * v6;
  4484. int32_t v7;
  4485. int32_t v8;
  4486. bool result3;
  4487. int32_t v9;
  4488. int32_t v10;
  4489. bool result2;
  4490. int32_t v11;
  4491. if (v1 != 0)
  4492. {
  4493. if (*(int32_t *)v1 == 1)
  4494. {
  4495. v7 = v5;
  4496. if (v7 == 0)
  4497. {
  4498. result2 = result;
  4499. }
  4500. else
  4501. {
  4502. v11 = *(int32_t *)(v7 + 12);
  4503. if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0)
  4504. {
  4505. *(int32_t *)(v1 + 4) = -1;
  4506. }
  4507. result3 = result;
  4508. v8 = result3;
  4509. v10 = v8;
  4510. if (*(char *)0x1CCB134 != 0)
  4511. {
  4512. v10 = v3;
  4513. }
  4514. v9 = v5;
  4515. if (v9 != 0)
  4516. {
  4517. v6 = (int32_t *)(v9 + 28);
  4518. if (v10 == *v6)
  4519. {
  4520. *v6 = v8;
  4521. result2 = result3;
  4522. }
  4523. else
  4524. {
  4525. result2 = result3;
  4526. }
  4527. }
  4528. else
  4529. {
  4530. result2 = result3;
  4531. }
  4532. }
  4533. return result2;
  4534. }
  4535. }
  4536. int32_t v12;
  4537. if (sub_D3310C(v5, v2, a2, a3, a4, a5, a6) == 0)
  4538. {
  4539. v12 = v1;
  4540. if (v12 == 0)
  4541. {
  4542. v7 = v5;
  4543. if (v7 == 0)
  4544. {
  4545. return result;
  4546. }
  4547. v11 = *(int32_t *)(v7 + 12);
  4548. if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0)
  4549. {
  4550. *(int32_t *)(v1 + 4) = -1;
  4551. }
  4552. result3 = result;
  4553. v8 = result3;
  4554. v10 = v8;
  4555. if (*(char *)0x1CCB134 != 0)
  4556. {
  4557. v10 = v3;
  4558. }
  4559. v9 = v5;
  4560. if (v9 != 0)
  4561. {
  4562. v6 = (int32_t *)(v9 + 28);
  4563. if (v10 == *v6)
  4564. {
  4565. *v6 = v8;
  4566. }
  4567. }
  4568. return result3;
  4569. }
  4570. if (*(int32_t *)v12 != 2)
  4571. {
  4572. sub_1524308(v12, 1, 0);
  4573. sub_1524308(v1, 2, -1);
  4574. }
  4575. v7 = v5;
  4576. if (v7 == 0)
  4577. {
  4578. result2 = result;
  4579. }
  4580. else
  4581. {
  4582. v11 = *(int32_t *)(v7 + 12);
  4583. if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0)
  4584. {
  4585. *(int32_t *)(v1 + 4) = -1;
  4586. }
  4587. result3 = result;
  4588. v8 = result3;
  4589. v10 = v8;
  4590. if (*(char *)0x1CCB134 != 0)
  4591. {
  4592. v10 = v3;
  4593. }
  4594. v9 = v5;
  4595. if (v9 != 0)
  4596. {
  4597. v6 = (int32_t *)(v9 + 28);
  4598. if (v10 == *v6)
  4599. {
  4600. *v6 = v8;
  4601. result2 = result3;
  4602. }
  4603. else
  4604. {
  4605. result2 = result3;
  4606. }
  4607. }
  4608. else
  4609. {
  4610. result2 = result3;
  4611. }
  4612. }
  4613. return result2;
  4614. }
  4615. if (sub_D29A80(v5, v1) != 0)
  4616. {
  4617. if (sub_D29818(0, v5) != 0)
  4618. {
  4619. return true;
  4620. }
  4621. v7 = v5;
  4622. if (v7 == 0)
  4623. {
  4624. result2 = result;
  4625. }
  4626. else
  4627. {
  4628. v11 = *(int32_t *)(v7 + 12);
  4629. if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0)
  4630. {
  4631. *(int32_t *)(v1 + 4) = -1;
  4632. }
  4633. result3 = result;
  4634. v8 = result3;
  4635. v10 = v8;
  4636. if (*(char *)0x1CCB134 != 0)
  4637. {
  4638. v10 = v3;
  4639. }
  4640. v9 = v5;
  4641. if (v9 != 0)
  4642. {
  4643. v6 = (int32_t *)(v9 + 28);
  4644. if (v10 == *v6)
  4645. {
  4646. *v6 = v8;
  4647. result2 = result3;
  4648. }
  4649. else
  4650. {
  4651. result2 = result3;
  4652. }
  4653. }
  4654. else
  4655. {
  4656. result2 = result3;
  4657. }
  4658. }
  4659. return result2;
  4660. }
  4661. v12 = v1;
  4662. if (v12 != 0)
  4663. {
  4664. if (*(int32_t *)v12 != 2)
  4665. {
  4666. sub_1524308(v12, 1, 0);
  4667. sub_1524308(v1, 2, -1);
  4668. }
  4669. }
  4670. v7 = v5;
  4671. if (v7 == 0)
  4672. {
  4673. result2 = result;
  4674. }
  4675. else
  4676. {
  4677. v11 = *(int32_t *)(v7 + 12);
  4678. if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0)
  4679. {
  4680. *(int32_t *)(v1 + 4) = -1;
  4681. }
  4682. result3 = result;
  4683. v8 = result3;
  4684. v10 = v8;
  4685. if (*(char *)0x1CCB134 != 0)
  4686. {
  4687. v10 = v3;
  4688. }
  4689. v9 = v5;
  4690. if (v9 != 0)
  4691. {
  4692. v6 = (int32_t *)(v9 + 28);
  4693. if (v10 == *v6)
  4694. {
  4695. *v6 = v8;
  4696. result2 = result3;
  4697. }
  4698. else
  4699. {
  4700. result2 = result3;
  4701. }
  4702. }
  4703. else
  4704. {
  4705. result2 = result3;
  4706. }
  4707. }
  4708. return result2;
  4709. }
  4710.  
  4711.  
  4712.  
  4713.  
  4714.  
  4715. /*
  4716. trying to block the blacklist for when youre kicked
  4717. A8BF68
  4718. D232DC
  4719. A8C3F4
  4720. A8B5FC
  4721. A8BBBC
  4722. A8B978
  4723. D11D0C
  4724.  
  4725. D04048 138E5C0 = 4B975A89
  4726. D26100 138E600 = 4B997B01
  4727. 9F8FD8 138E644 = 4B66A995
  4728.  
  4729.  
  4730. //blr = 0x4E800020
  4731. 0xA8BBBC = 0x60850000 //this stops you from joining a new session. not protecting
  4732. 0xA8B978 = 0x80630010 //freeze
  4733. 0x970F28 = 0x7C0802A6 // not protecting
  4734. 0x1358AAC = 0x7C0802A6 //this one protects against it but makes everyone leave
  4735.  
  4736. //nopped
  4737. 0x1358E50 = 4B732D6D
  4738. 0x1358E84 = 4B732AF5
  4739. 0x1358D08 = 4B618221
  4740. 0x1358C08 = 4BFFFEA5
  4741. 0x138F9F0 = 4BFFE6D9 nop //this one protects against it but makes everyone leave
  4742. 0x138F9DC = F821FF91 blr //this one protects against it but makes everyone leave
  4743. 0x138E5BC = 30611AE4 branch 48001418 // //this one protects against it but makes everyone leave
  4744. 0x138E600 = 4B997B01
  4745. 0x138E614 = 483C6B4D //not tried but didnt protect
  4746. 0x138E624 = 4B5E0AF1 //this one protects against it but makes everyone leave
  4747. 0x138E638 = 4BF63621
  4748. 0x138E644 = 4B66A995 //not protecting
  4749. 0x138E670 = 4BFCA43D //this one protects against it but makes everyone leave the curret best
  4750. */
  4751.  
  4752.  
  4753.  
  4754.  
  4755.  
  4756.  
  4757.  
  4758.  
  4759.  
  4760.  
  4761.  
  4762.  
  4763.  
  4764.  
  4765.  
  4766.  
  4767. void func_51()
  4768. {
  4769. int iVar0 = _GET_TOTAL_SC_INBOX_IDS();
  4770. int iVar1 = 0;
  4771. while (iVar1 < iVar0)
  4772. {
  4773. if (!_IS_SC_INBOX_VALID(iVar1))
  4774. {
  4775. Hash iVar2 = _SC_INBOX_MESSAGE_INIT(iVar1);
  4776. printf("SC MESSAGE TYPE: 0x%X\n", iVar2);
  4777. switch (iVar2)
  4778. {
  4779. case 0xCBB12972: // crew_message
  4780. {
  4781. //requires, crewId and crewTag
  4782. printf("crew_message: 0x%X\n", iVar2);
  4783. break;
  4784. }
  4785. case 0xEDF54CE2: // statupdate
  4786. {
  4787. printf("statupdate: 0x%X\n", iVar2);
  4788. break;
  4789. }
  4790. case 0x8C571656: // mission_verified
  4791. {
  4792. printf("mission_verified: 0x%X\n", iVar2);
  4793. break;
  4794. }
  4795. case 0x70E4D0E1: // rockstar_message
  4796. {
  4797. printf("rockstar_message: 0x%X\n", iVar2);
  4798. break;
  4799. }
  4800. case 0x2190F9E1: // ugcstatupdate
  4801. {
  4802. printf("ugcstatupdate: 0x%X\n", iVar2);
  4803. break;
  4804. }
  4805. case 0xD36120CE: // game_award
  4806. {
  4807. //type-> cash or xp
  4808. //amt-> 999999
  4809. //from-> Rockstar
  4810. printf("game_award: 0x%X\n", iVar2);
  4811. break;
  4812. }
  4813. case 0x134AB8CF: // bounty
  4814. {
  4815. printf("bounty: 0x%X\n", iVar2);
  4816. break;
  4817. }
  4818. }
  4819. }
  4820. iVar1++;
  4821. }
  4822. }
  4823.  
  4824.  
  4825.  
  4826.  
  4827.  
  4828.  
  4829.  
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.  
  4839.  
  4840.  
  4841.  
  4842.  
  4843. int32_t createAmbientPickupFunc(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, uint32_t a6, uint32_t a7, int32_t a8)
  4844. {
  4845. int32_t v1 = sub_150AA74(a1, a2, a3, a4, a5, a6, a7, a8);
  4846. int32_t v2 = a7 % 256;
  4847. int32_t v3 = a6 % 256;
  4848. if (*(char *)0x223F0C0 == 0)
  4849. {
  4850. return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
  4851. }
  4852. int32_t v4;
  4853. int32_t v5;
  4854. int32_t v6;
  4855. int32_t v7;
  4856. int32_t v8;
  4857. int32_t v9;
  4858. int32_t v10;
  4859. if (*(int32_t *)0x2183F14 == v1)
  4860. {
  4861. v9 = sub_D25F10((int32_t)&v7, 0);
  4862. v10 = sub_9F858C(v9);
  4863. if (v10 == 0)
  4864. {
  4865. v6 = sub_12EF35C();
  4866. sub_131BC34(v10, v6, a4, v1);
  4867. return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
  4868. }
  4869. rand();
  4870. v4 = v8;
  4871. if (*(int32_t *)(sub_9F8604(0x2FB220, 0x300000) + 0x300000) != 0)
  4872. {
  4873. v5 = sub_1545344();
  4874. reportCashSpawnfn(v4, a4, v1, v5);
  4875. return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
  4876. }
  4877. v6 = sub_12EF35C();
  4878. sub_131BC34(v4, v6, a4, v1);
  4879. return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
  4880. }
  4881. if (*(int32_t *)0x2183F18 == v1 || *(int32_t *)0x2183F1C == v1 || *(int32_t *)0x2183F20 == v1 || *(int32_t *)0x2183F24 == v1 || *(int32_t *)0x2183F28 == v1)
  4882. {
  4883. v9 = sub_D25F10((int32_t)&v7, 0);
  4884. v10 = sub_9F858C(v9);
  4885. v4 = v10;
  4886. if (v10 != 0)
  4887. {
  4888. rand();
  4889. v4 = v8;
  4890. if (*(int32_t *)(sub_9F8604(0x2FB220, 0x300000) + 0x300000) != 0)
  4891. {
  4892. v5 = sub_1545344();
  4893. reportCashSpawnfn(v4, a4, v1, v5);
  4894. return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
  4895. }
  4896. }
  4897. v6 = sub_12EF35C();
  4898. sub_131BC34(v4, v6, a4, v1);
  4899. return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
  4900. }
  4901. if (*(int32_t *)0x2183F2C != v1)
  4902. {
  4903. return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
  4904. }
  4905. v9 = sub_D25F10((int32_t)&v7, 0);
  4906. v10 = sub_9F858C(v9);
  4907. v4 = v10;
  4908. if (v10 != 0)
  4909. {
  4910. rand();
  4911. v4 = v8;
  4912. if (*(int32_t *)(sub_9F8604(0x2FB220, 0x300000) + 0x300000) != 0)
  4913. {
  4914. v5 = sub_1545344();
  4915. reportCashSpawnfn(v4, a4, v1, v5);
  4916. return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
  4917. }
  4918. }
  4919. v6 = sub_12EF35C();
  4920. sub_131BC34(v4, v6, a4, v1);
  4921. return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
  4922. }
  4923.  
  4924. /*
  4925.  
  4926. r0=000000000019660D r8=00000000100000A0 r16=0000000000000000 r24=0000000000000000
  4927. r1=00000000D003F610 r9=00000000100001C4 r17=00000000D0040430 r25=0000000000000001
  4928. r2=0000000001C85330 r10=00000000100001B0 r18=0000000035F680D8 r26=DEF76158880A67D9
  4929. r3=DEF76158880A67D9 r11=0007213E023A5975 r19=0000000001CC2FA8 r27=FFFFFFFFCE6FDD6B
  4930. r4=0000000000009C40 r12=0000000002290308 r20=0000000032293664 r28=0000000010069664
  4931. r5=FFFFFFFFCE6FDD6B r13=0000000010007060 r21=0000000035F68000 r29=0000000000000000
  4932. r6=0000000000000005 r14=0000000000000000 r22=0000000001E70370 r30=0000000000009C40
  4933. r7=00000000100001AC r15=0000000000000000 r23=00000000320A8DC0 r31=00000000113FD533
  4934.  
  4935. xer=0000000000000000 ctr=000000000227512C lr=00000000003FA628 fpscr=BF324500
  4936.  
  4937. cr=48000044 cr0=GT cr1=LT cr2= cr3= cr4= cr5= cr6=GT cr7=GT
  4938.  
  4939. pc=00000000012D73D8
  4940.  
  4941.  
  4942.  
  4943. */
  4944.  
  4945.  
  4946. //model hash is in r31
  4947. GAME_EXPORT int32_t reportCashSpawnfn(int32_t a1, int32_t amount, int32_t pickup_hash_0xFFFFFFFFCE6FDD6B, int32_t ret_sub_1545344);
  4948. GAME_EXPORT int32_t sub_1545344(int32_t cNetGamePlayer);
  4949.  
  4950.  
  4951. void report_player_test()
  4952. {
  4953. int32_t _rand = rand();
  4954. printf("rand: 0x%X\n", _rand);
  4955. int32_t v5 = sub_1545344(CNetGamePlayerFn(iSelectedPlayer, 1));
  4956. reportCashSpawnfn(_rand, 40000, 0xFFFFFFFFCE6FDD6B, v5);
  4957. }
  4958.  
  4959.  
  4960.  
  4961.  
  4962.  
  4963.  
  4964.  
  4965. GAME_EXPORT char* GetLabelTextByGXTFunc(address, gxt_label); // 0xD914CC
  4966. char backup_GetLabelTextByGXT[4 * 4];
  4967.  
  4968. char *_MY_GetLabelTextByGXT(int32_t unk_20668B0, char *label_name)
  4969. {
  4970. printf("unk_20668B0: 0x%X\n", unk_20668B0);
  4971. printf("label_name: %s\n", label_name);
  4972.  
  4973.  
  4974.  
  4975.  
  4976. //backup hook, revert, call, hook
  4977. char backup_hook[4 * 4];
  4978. WriteProcessMemory(backup_hook, (const void *)0xD914CC, 4 * 4);
  4979. WriteProcessMemory((void *)0xD914CC, backup_GetLabelTextByGXT, 4 * 4);
  4980. char *ret = GetLabelTextByGXTFunc(unk_20668B0, label_name);
  4981. WriteProcessMemory((void *)0xD914CC, backup_hook, 4 * 4);
  4982. return ret;
  4983. }
  4984.  
  4985.  
  4986.  
  4987. WriteProcessMemory(backup_GetLabelTextByGXT, (const void *)0xD914CC, 4 * 4);
  4988. PatchInJump(0xD914CC, (int)_MY_GetLabelTextByGXT, false);
  4989.  
  4990.  
  4991.  
  4992.  
  4993.  
  4994.  
  4995.  
  4996.  
  4997.  
  4998.  
  4999. //nop all if you freeze
  5000. 00A51B60;
  5001. 0A51B6C;
  5002. 0A51B74;
  5003. 00A51B74;
  5004. 000A51B78;
  5005. 0A51B84;
  5006. 00A51B88;
  5007. 00A51B8C;
  5008. 0A51B94;
  5009. 0A51B98;
  5010. 0A51BA4;
  5011. 00A51BB0;
  5012. 0A51BB4;
  5013. 00A51BBC;
  5014. 0A51BC0;
  5015. 0A51BC4;
  5016. 0A51BC8;
  5017. 0A51BD0;
  5018. 00A51BD4;
  5019. 0A51BEC;
  5020. 00A51BF8;
  5021.  
  5022.  
  5023. //texture freeze protection
  5024. //0x12D30D8 = 0x60000000;
  5025. //0x12D3118 = 0x60000000;
  5026.  
  5027.  
  5028.  
  5029.  
  5030.  
  5031. /*
  5032. Rage::Import
  5033. 0xD095A365
  5034. platform:/levels/gta5/scenario/Alamo_Sea.cmt
  5035. 1
  5036. 0
  5037. 1
  5038. 0
  5039.  
  5040.  
  5041. 0xD09A5563
  5042. platform:/levels/gta5/streaming/ah_1_int_srl.cmt
  5043. 1
  5044. ah_1_int_srl.cmt
  5045. 0
  5046. 1
  5047.  
  5048. 0xD09EA573
  5049. dlcMPHeist:/ps3/levels/gta5/streaming/heist_int_srl.cmt
  5050. 1
  5051. heist_int_srl.cmt
  5052. 0
  5053. 1
  5054. */
  5055.  
  5056.  
  5057.  
  5058.  
  5059.  
  5060.  
  5061.  
  5062.  
  5063. //using sc features with out being in game
  5064. //make a post respones
  5065. // https://socialclub.rockstargames.com/crew/crew_message
  5066. // {"crewId":39499191,"message":"hello world","nickname":""}
  5067.  
  5068.  
  5069. my crew details
  5070. dob: 5/5/1999
  5071. name: crew_message
  5072. email: crew_message@yopmail.com
  5073. pass: Crew_message1
  5074.  
  5075.  
  5076.  
  5077.  
  5078.  
  5079.  
  5080.  
  5081.  
  5082.  
  5083.  
  5084.  
  5085.  
  5086.  
  5087.  
  5088.  
  5089.  
  5090.  
  5091. static size_t _wcslen(const wchar_t *s)
  5092. {
  5093. const wchar_t *p;
  5094.  
  5095. p = s;
  5096. while (*p)
  5097. p++;
  5098.  
  5099. return p - s;
  5100. }
  5101. static int _wcslen(char *str)
  5102. {
  5103. int nullCount = 0;
  5104. int i = 0;
  5105. for (i = 0; i < 64; i++)
  5106. {
  5107. if (nullCount == 2)
  5108. {
  5109. break;
  5110. }
  5111. if (*(str + i) == 0x00)
  5112. {
  5113. nullCount++;
  5114. }
  5115. else
  5116. {
  5117. nullCount = 0;
  5118. }
  5119. }
  5120. return i;
  5121. }
  5122. static size_t StringToWideCharacter(wchar_t *dest, const char *scr, size_t len)
  5123. {
  5124. int count = 0;
  5125. if (len)
  5126. {
  5127. do
  5128. {
  5129. if ((*dest++ = (wchar_t)*scr++) == 0)
  5130. break;
  5131. count++;
  5132. } while (--len);
  5133. }
  5134. return count;
  5135. }
  5136. static size_t WideCharacterToString(char *dest, const wchar_t *scr, size_t len)
  5137. {
  5138. int count = 0;
  5139. if (len)
  5140. {
  5141. do
  5142. {
  5143. if ((*dest++ = (char)*scr++) == 0)
  5144. break;
  5145. count++;
  5146. } while (--len);
  5147. }
  5148. return count;
  5149. }
  5150.  
  5151.  
  5152.  
  5153.  
  5154.  
  5155. //#define InitializeCriticalSection(lpCriticalSection) pthread_mutex_init(lpCriticalSection, NULL)
  5156. //#define DeleteCriticalSection(lpCriticalSection) pthread_mutex_destroy(lpCriticalSection)
  5157. //#define EnterCriticalSection(lpCriticalSection) pthread_mutex_lock(lpCriticalSection)
  5158. //#define LeaveCriticalSection(lpCriticalSection) pthread_mutex_unlock(lpCriticalSection)
  5159. //pthread_mutex_t DetourAsmSection;
  5160.  
  5161. //#define InitializeCriticalSection(lpCriticalSection) sys_lwmutex_create(lpCriticalSection, NULL)
  5162. //#define DeleteCriticalSection(lpCriticalSection) sys_lwmutex_destroy(lpCriticalSection)
  5163. //#define EnterCriticalSection(lpCriticalSection) sys_lwmutex_lock(lpCriticalSection, 0)
  5164. //#define LeaveCriticalSection(lpCriticalSection) sys_lwmutex_unlock(lpCriticalSection)
  5165. //sys_lwmutex_t DetourAsmSection;
  5166.  
  5167.  
  5168.  
  5169.  
  5170.  
  5171.  
  5172.  
  5173.  
  5174.  
  5175.  
  5176.  
  5177.  
  5178.  
  5179.  
  5180.  
  5181.  
  5182.  
  5183. int32_t sub_A5660C(int32_t a1)
  5184. {
  5185. int32_t v1 = __savegprlr_26(); // 0x150AA7C
  5186. int32_t v2 = v1;
  5187. int32_t * v3 = (int32_t *)(v1 + 140);
  5188. uint32_t v4 = *v3;
  5189. if (v4 >= 1)
  5190. {
  5191. int32_t v5 = v4 - *(int32_t *)0x1EC673C;
  5192. *v3 = v5 < 0 ? 0 : v5;
  5193. v1 = v2;
  5194. }
  5195. int32_t v6 = *(int32_t *)(v1 + 52);
  5196. int32_t v7;
  5197. int32_t v8;
  5198. int32_t v9;
  5199. int32_t v10;
  5200. int32_t v11;
  5201. int32_t v12;
  5202. int32_t v13;
  5203. int32_t v14;
  5204. int32_t result2;
  5205. int32_t result;
  5206. int32_t result3;
  5207. int32_t v15;
  5208. int32_t v16;
  5209. int32_t v17;
  5210. int32_t v18;
  5211. int32_t v19;
  5212. int32_t v20;
  5213. int32_t v21;
  5214. if (v6 == 0)
  5215. {
  5216. result = __asm_rlwinm((int32_t)*(char *)(v1 + 173), 30, 31, 31);
  5217. if (result == 0)
  5218. {
  5219. return 0;
  5220. }
  5221. v11 = v2;
  5222. v17 = *(int32_t *)(v11 + 28);
  5223. if (v17 == 0)
  5224. {
  5225. return result;
  5226. }
  5227. v18 = *(int32_t *)(v17 + 8);
  5228. if (v18 == 0)
  5229. {
  5230. v13 = v11;
  5231. if (*(int32_t *)(v17 + 8) != 0)
  5232. {
  5233. v20 = *(int32_t *)(v13 + 140);
  5234. if (v20 == 0)
  5235. {
  5236. int32_t l_var = sub_15BA0E4(v20);
  5237. v21 = *(int32_t *)(v13 + 28);
  5238. v7 = 0;
  5239. if (v21 != 0)
  5240. {
  5241. v7 = *(int32_t *)(v21 + 8);
  5242. }
  5243. v15 = &v8;
  5244. sub_A8B814(v15);
  5245. v16 = &v9;
  5246. sub_A8B908(v15, v16, 982);
  5247. if (aub_1626844(*(int32_t *)0x1EC69C8, v15) == 0)
  5248. {
  5249. sub_46E30C(l_var, unk);
  5250. }
  5251. else
  5252. {
  5253. sub_A8B978(v15);
  5254. v14 = sub_9F8E10();
  5255. sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0);
  5256. }
  5257. *(int32_t *)(v2 + 140) = 250;
  5258. result2 = 250;
  5259. }
  5260. else
  5261. {
  5262. result2 = v20;
  5263. }
  5264. }
  5265. else
  5266. {
  5267. result2 = 0;
  5268. }
  5269. return result2;
  5270. }
  5271. result3 = aub_9F8FD8(v18);
  5272. v12 = v2;
  5273. v19 = *(int32_t *)(v12 + 28);
  5274. if (result3 != 0 || v19 == 0)
  5275. {
  5276. return result3;
  5277. }
  5278. v13 = v12;
  5279. if (*(int32_t *)(v19 + 8) != 0)
  5280. {
  5281. v20 = *(int32_t *)(v13 + 140);
  5282. if (v20 == 0)
  5283. {
  5284. v21 = *(int32_t *)(v13 + 28);
  5285. v7 = 0;
  5286. if (v21 != 0)
  5287. {
  5288. v7 = *(int32_t *)(v21 + 8);
  5289. }
  5290. v15 = &v8;
  5291. sub_A8B814(v15);
  5292. v16 = &v9;
  5293. sub_A8B908(v15, v16, 982);
  5294. if (sub_1626844(*(int32_t *)0x1EC69C8, v15) == 0)
  5295. {
  5296.  
  5297. }
  5298. else
  5299. {
  5300. sub_A8B978(v15);
  5301. v14 = sub_9F8E10();
  5302. sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0);
  5303. }
  5304. *(int32_t *)(v2 + 140) = 250;
  5305. result2 = 250;
  5306. }
  5307. else
  5308. {
  5309. result2 = v20;
  5310. }
  5311. }
  5312. else
  5313. {
  5314. result2 = 0;
  5315. }
  5316. return result2;
  5317. }
  5318. if (sub_9D8FD8(v6) != 0)
  5319. {
  5320. int32_t result4 = *(int32_t *)(v2 + 12);
  5321. if (result4 != 0)
  5322. {
  5323. return result4;
  5324. }
  5325. int32_t v22 = (int32_t)*(char *)(v2 + 173);
  5326. if (__asm_rlwinm(v22, 31, 31, 31) == 0)
  5327. {
  5328. int32_t v23 = __asm_rlwinm(v22, 25, 31, 31);
  5329. if (v23 == 0)
  5330. {
  5331. result2 = v2;
  5332. }
  5333. else
  5334. {
  5335. result2 = v23;
  5336. }
  5337. }
  5338. else
  5339. {
  5340. int32_t v24 = *(int32_t *)(v2 + 140);
  5341. if (v24 == 0)
  5342. {
  5343. if (*(int32_t *)(*(int32_t *)0x1CC57B8 + 36) != 0)
  5344. {
  5345. int32_t l_var = sub_15BA0E4(a1 + 4);
  5346. sub_46E098(l_var);
  5347. }
  5348. *(int32_t *)(v2 + 52) = 0;
  5349. result2 = sub_A563E4(v2, 0);
  5350. }
  5351. else
  5352. {
  5353. result2 = v24;
  5354. }
  5355. }
  5356. return result2;
  5357. }
  5358. result = __asm_rlwinm((int32_t)*(char *)(v2 + 173), 30, 31, 31);
  5359. if (result == 0)
  5360. {
  5361. return 0;
  5362. }
  5363. v11 = v2;
  5364. v17 = *(int32_t *)(v11 + 28);
  5365. if (v17 == 0)
  5366. {
  5367. //return sub_483F50(r3, r4, r5, r6, r7, r8);
  5368. }
  5369. v18 = *(int32_t *)(v17 + 8);
  5370. if (v18 == 0)
  5371. {
  5372. v13 = v11;
  5373. if (*(int32_t *)(v17 + 8) != 0)
  5374. {
  5375. v20 = *(int32_t *)(v13 + 140);
  5376. if (v20 == 0)
  5377. {
  5378. v21 = *(int32_t *)(v13 + 28);
  5379. v7 = 0;
  5380. if (v21 != 0)
  5381. {
  5382. v7 = *(int32_t *)(v21 + 8);
  5383. }
  5384. v15 = &v8;
  5385. sub_A8B814(v15);
  5386. v16 = &v9;
  5387. sub_A8B908(v15, v16, 982);
  5388. if (sub_1626844(*(int32_t *)0x1EC69C8, v15) == 0)
  5389. {
  5390.  
  5391. }
  5392. else
  5393. {
  5394. sub_A8B978(v15);
  5395. v14 = sub_9F8E10();
  5396. sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0);
  5397. }
  5398. *(int32_t *)(v2 + 140) = 250;
  5399. result2 = 250;
  5400. }
  5401. else
  5402. {
  5403. result2 = v20;
  5404. }
  5405. }
  5406. else
  5407. {
  5408. result2 = 0;
  5409. }
  5410. }
  5411. else
  5412. {
  5413. result3 = sub_9F8FD8(v18);
  5414. v12 = v2;
  5415. v19 = *(int32_t *)(v12 + 28);
  5416. if (result3 == 0 && v19 != 0)
  5417. {
  5418. v13 = v12;
  5419. if (*(int32_t *)(v19 + 8) != 0)
  5420. {
  5421. v20 = *(int32_t *)(v13 + 140);
  5422. if (v20 == 0)
  5423. {
  5424. v21 = *(int32_t *)(v13 + 28);
  5425. v7 = 0;
  5426. if (v21 != 0)
  5427. {
  5428. v7 = *(int32_t *)(v21 + 8);
  5429. }
  5430. v15 = &v8;
  5431. sub_A8B814(v15);
  5432. v16 = &v9;
  5433. sub_A8B908(v15, v16, 982);
  5434. if (sub_1626844(*(int32_t *)0x1ec69c8, v15) == 0)
  5435. {
  5436.  
  5437. }
  5438. else
  5439. {
  5440. sub_A8B978(v15);
  5441. v14 = sub_9F8E10();
  5442. sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0);
  5443. }
  5444. *(int32_t *)(v2 + 140) = 250;
  5445. result2 = 250;
  5446. }
  5447. else
  5448. {
  5449. result2 = v20;
  5450. }
  5451. }
  5452. else
  5453. {
  5454. result2 = 0;
  5455. }
  5456. }
  5457. else
  5458. {
  5459. result2 = result3;
  5460. }
  5461. }
  5462. return result2;
  5463. }
  5464.  
  5465.  
  5466.  
  5467.  
  5468.  
  5469.  
  5470.  
  5471.  
  5472.  
  5473.  
  5474. GlobalVariable::Set(1312638, 1);
  5475. GlobalVariable::Set(2403258, 1);
  5476. int Global_1312376 = GlobalVariable::Get(1312376);
  5477. SET_BIT(&Global_1312376, 0);
  5478. SET_BIT(&Global_1312376, 5);
  5479. GlobalVariable::Set(1312376 + 2, 0); // leaves but gets stuck in sky
  5480. GlobalVariable::Set(1312413, 1);
  5481. GlobalVariable::Set(1315318, 0);
  5482. GlobalVariable::Set(19940, 0);
  5483. GlobalVariable::Set(1315298, 32);
  5484. GlobalVariable::Set(1315299, 19); // leaves but gets stuck in sky
  5485. GlobalVariable::Set(1312629, 1); //R* server are unavailable
  5486. GlobalVariable::Set(1312623, 1);//servers are in maintenance
  5487. GlobalVariable::Set(1312631, 1); //has player been kicked by others
  5488. GlobalVariable::Set(2404047, 1); //is player cheater
  5489.  
  5490.  
  5491.  
  5492. // block mission circles
  5493. 0x159A64C = 0x4E800020; // on
  5494. 0x159A64C = 0x7C0802A6; // off
  5495.  
  5496.  
  5497.  
  5498.  
  5499.  
  5500.  
  5501.  
  5502.  
  5503.  
  5504.  
  5505.  
  5506.  
  5507.  
  5508.  
  5509.  
  5510. // sobiet threads and times called
  5511. // TODO: find correct names for these hashes
  5512. enum Threads
  5513. {
  5514. THREAD_pausemenu_map = 0x2CA4F81B, //6
  5515. THREAD_pausemenu_sp_repeat = 0x5B2DB305, //17
  5516. THREAD_chop = 0xFA543B0A, //82
  5517. THREAD_startup_positioning = 0x6D3E6ACB, //82
  5518. THREAD_email_controller = 0xFE612F1E, // //226
  5519. THREAD_controller_taxi = 0xFDE8F81F, // 226
  5520. THREAD_randomchar_controller = 0xFBD2C1A5, // 226
  5521. THREAD_friends_controller = 0xF989DB20, // 226
  5522. THREAD_bootycallhandler = 0xF92CFEBD, // 226
  5523. THREAD_clothes_shop_sp = 0xF8A3166B, // 226
  5524. THREAD_cellphone_controller = 0xF292D030, // 226
  5525. THREAD_ob_tv = 0xF0DE819B, // 226
  5526. THREAD_achievement_controller = 0xDF034893, // 226
  5527. THREAD_player_controller = 0xDAB812BA, // 226
  5528. THREAD_comms_controller = 0xD96D699D, // 226
  5529. THREAD_restrictedareas = 0xD8DD2E81, // 226
  5530. THREAD_pickup_controller = 0xD21EB4B0, // 226
  5531. THREAD_COMMON14 = 0xD1F9D9C5, // 226
  5532. THREAD_COMMON15 = 0xC9910456, // 226
  5533. THREAD_stock_controller = 0xC9833B07, // 226
  5534. THREAD_ingamehud = 0xC45650F0, // 226
  5535. THREAD_controller_ambientarea = 0xB7250D07, // 226
  5536. THREAD_player_controller_b = 0xB6B491B8, // 226
  5537. THREAD_family_scene_f0 = 0xB3F41E6B, // 226
  5538. THREAD_cheat_controller = 0xAFD9916D, // 226
  5539. THREAD_flow_help = 0xADE8F290, // 226
  5540. THREAD_flow_controller = 0x9CD55718, // 226
  5541. THREAD_stats_controller = 0x94A1CA9D, // 226
  5542. THREAD_dialogue_handler = 0x90EFDCAD, // 226
  5543. THREAD_launcher_carwash = 0x8A6A7147, // 226
  5544. THREAD_event_controller = 0x8668B4C2, // 226
  5545. THREAD_savegame_bed = 0x84CA83CD, // 226
  5546. THREAD_completionpercentage_controller = 0x81378091, // 226
  5547. THREAD_blip_controller = 0x80CFE974, // 226
  5548. THREAD_wardrobe_sp = 0x80925960, //226
  5549. THREAD_pi_menu = 0x79120DE3, // 226
  5550. THREAD_selector = 0x76F8DF52, // 226
  5551. THREAD_context_controller = 0x75B7261C, // 226
  5552. THREAD_candidate_controller = 0x678B6D24, // 226
  5553. THREAD_main_persistent = 0x5700179C, // 226
  5554. THREAD_COMMON37 = 0x561C3D14, // 226
  5555. THREAD_code_controller = 0x43F6C374, // 226
  5556. THREAD_emergencycalllauncher = 0x3E74E99B, // 226
  5557. THREAD_taxilauncher = 0x3C621FC5, // 226
  5558. THREAD_shop_controller = 0x39DA738B, // 226
  5559. THREAD_mission_triggerer_a = 0x2B1D6274, // 226
  5560. THREAD_main = 0x27EB33D7, // 226
  5561. THREAD_building_controller = 0x2495FCB6, // 226
  5562. THREAD_shoprobberies = 0x21A8101D, // 226
  5563. THREAD_pb_prostitute = 0x6A96798A // 503
  5564. };
  5565.  
  5566.  
  5567.  
  5568.  
  5569.  
  5570.  
  5571.  
  5572.  
  5573.  
  5574.  
  5575.  
  5576.  
  5577.  
  5578.  
  5579.  
  5580.  
  5581.  
  5582.  
  5583.  
  5584.  
  5585.  
  5586.  
  5587.  
  5588.  
  5589.  
  5590.  
  5591. typedef struct {
  5592. double r; // a fraction between 0 and 1
  5593. double g; // a fraction between 0 and 1
  5594. double b; // a fraction between 0 and 1
  5595. } rgb;
  5596.  
  5597. typedef struct {
  5598. double h; // angle in degrees
  5599. double s; // a fraction between 0 and 1
  5600. double v; // a fraction between 0 and 1
  5601. } hsv;
  5602.  
  5603.  
  5604. hsv rgb2hsv(rgb in);
  5605. rgb hsv2rgb(hsv in);
  5606.  
  5607. hsv UIManager::rgb2hsv(rgb in)
  5608. {
  5609. hsv out{};
  5610. double min, max, delta;
  5611.  
  5612. min = in.r < in.g ? in.r : in.g;
  5613. min = min < in.b ? min : in.b;
  5614.  
  5615. max = in.r > in.g ? in.r : in.g;
  5616. max = max > in.b ? max : in.b;
  5617.  
  5618. out.v = max; // v
  5619. delta = max - min;
  5620. if (delta < 0.00001)
  5621. {
  5622. out.s = 0;
  5623. out.h = 0; // undefined, maybe nan?
  5624. return out;
  5625. }
  5626. if (max > 0.0) { // NOTE: if Max is == 0, this divide would cause a crash
  5627. out.s = (delta / max); // s
  5628. }
  5629. else {
  5630. // if max is 0, then r = g = b = 0
  5631. // s = 0, h is undefined
  5632. out.s = 0.0;
  5633. out.h = NAN; // its now undefined
  5634. return out;
  5635. }
  5636. if (in.r >= max) // > is bogus, just keeps compilor happy
  5637. out.h = (in.g - in.b) / delta; // between yellow & magenta
  5638. else
  5639. if (in.g >= max)
  5640. out.h = 2.0 + (in.b - in.r) / delta; // between cyan & yellow
  5641. else
  5642. out.h = 4.0 + (in.r - in.g) / delta; // between magenta & cyan
  5643.  
  5644. out.h *= 60.0; // degrees
  5645.  
  5646. if (out.h < 0.0)
  5647. out.h += 360.0;
  5648.  
  5649. return out;
  5650. }
  5651.  
  5652. rgb UIManager::hsv2rgb(hsv in)
  5653. {
  5654. double hh, p, q, t, ff;
  5655. long i;
  5656. rgb out{};
  5657.  
  5658. if (in.s <= 0.0) { // < is bogus, just shuts up warnings
  5659. out.r = in.v;
  5660. out.g = in.v;
  5661. out.b = in.v;
  5662. return out;
  5663. }
  5664. hh = in.h;
  5665. if (hh >= 360.0) hh = 0.0;
  5666. hh /= 60.0;
  5667. i = (long)hh;
  5668. ff = hh - i;
  5669. p = in.v * (1.0 - in.s);
  5670. q = in.v * (1.0 - (in.s * ff));
  5671. t = in.v * (1.0 - (in.s * (1.0 - ff)));
  5672.  
  5673. switch (i) {
  5674. case 0:
  5675. out.r = in.v;
  5676. out.g = t;
  5677. out.b = p;
  5678. break;
  5679. case 1:
  5680. out.r = q;
  5681. out.g = in.v;
  5682. out.b = p;
  5683. break;
  5684. case 2:
  5685. out.r = p;
  5686. out.g = in.v;
  5687. out.b = t;
  5688. break;
  5689.  
  5690. case 3:
  5691. out.r = p;
  5692. out.g = q;
  5693. out.b = in.v;
  5694. break;
  5695. case 4:
  5696. out.r = t;
  5697. out.g = p;
  5698. out.b = in.v;
  5699. break;
  5700. case 5:
  5701. default:
  5702. out.r = in.v;
  5703. out.g = p;
  5704. out.b = q;
  5705. break;
  5706. }
  5707. return out;
  5708. }
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715. for (double i = 0; i <= 360; i++)
  5716. {
  5717. hsv h{ i, 1, 1 };
  5718. rgb col = hsv2rgb(h);
  5719.  
  5720. m_HeaderBackgroundColor.r = (uint8_t)(int32_t)(col.r * 255.0f);
  5721. m_HeaderBackgroundColor.g = (uint8_t)(int32_t)(col.g * 255.0f);
  5722. m_HeaderBackgroundColor.b = (uint8_t)(int32_t)(col.b * 255.0f);
  5723.  
  5724. m_SubmenuBarBackgroundColor.r = (uint8_t)(int32_t)(col.r * 255.0f);
  5725. m_SubmenuBarBackgroundColor.g = (uint8_t)(int32_t)(col.g * 255.0f);
  5726. m_SubmenuBarBackgroundColor.b = (uint8_t)(int32_t)(col.b * 255.0f);
  5727.  
  5728. m_FooterBackgroundColor.r = (uint8_t)(int32_t)(col.r * 255.0f);
  5729. m_FooterBackgroundColor.g = (uint8_t)(int32_t)(col.g * 255.0f);
  5730. m_FooterBackgroundColor.b = (uint8_t)(int32_t)(col.b * 255.0f);
  5731.  
  5732. m_DescriptionBackgroundColor.r = (uint8_t)(int32_t)(col.r * 255.0f);
  5733. m_DescriptionBackgroundColor.g = (uint8_t)(int32_t)(col.g * 255.0f);
  5734. m_DescriptionBackgroundColor.b = (uint8_t)(int32_t)(col.b * 255.0f);
  5735.  
  5736. m_InfoPaneHeaderColor.r = (uint8_t)(int32_t)(col.r * 255.0f);
  5737. m_InfoPaneHeaderColor.g = (uint8_t)(int32_t)(col.g * 255.0f);
  5738. m_InfoPaneHeaderColor.b = (uint8_t)(int32_t)(col.b * 255.0f);
  5739. }
  5740.  
  5741.  
  5742.  
  5743.  
  5744.  
  5745.  
  5746.  
  5747.  
  5748.  
  5749.  
  5750.  
  5751.  
  5752.  
  5753. void AskHostToKickPlayer()
  5754. {
  5755. if (IsSessionHost() == 0) // make sure we are not the host
  5756. {
  5757. uintptr_t netGamePlayerHost = GetNetGamePlayerOfHost();
  5758. if (netGamePlayerHost)
  5759. {
  5760. PrepareReply(&local_90);
  5761. uVar3 = 0x3D6;
  5762. PrepareExtraData(&local_90, auStack1152, 0x3D6);
  5763. l_hash = WriteSerializeMessageId(DAT_02258b90, &local_90);
  5764. bVar2 = false;
  5765. if (l_hash != 0)
  5766. {
  5767. uVar3 = 0;
  5768. if ((-1 < (char)local_78) && (uVar3 = 0, local_84 + 8 <= local_88))
  5769. {
  5770. if ((local_78 >> 6 & 1) == 0)
  5771. {
  5772. WriteSerializeData((ulonglong)local_90, 4, 8, (longlong)(local_84 + local_8c));
  5773. }
  5774. WriteSerializeDataOfSize(&local_90, 8);
  5775. uVar3 = 1;
  5776. }
  5777. bVar2 = false;
  5778. if ((int)uVar3 != 0)
  5779. {
  5780. bVar2 = true;
  5781. }
  5782. }
  5783. if (((int)register0x00000008 != 0xa8) && (uVar3 = 0, bVar2))
  5784. {
  5785. uVar3 = GetSerialization_CurrentBitFlag(&local_90);
  5786. }
  5787. if (bVar2)
  5788. {
  5789. SendReliableCommand_3(netGamePlayerHost, auStack1152, uVar3, 0, 0, 0);
  5790. }
  5791. }
  5792. }
  5793. }
  5794.  
  5795.  
  5796.  
  5797.  
  5798.  
  5799.  
  5800.  
  5801.  
  5802. struct PeerIdentification
  5803. {
  5804. uint32_t part1;
  5805. uint32_t part2;
  5806. uint16_t part3;
  5807. uint16_t part4;
  5808. uint32_t part5;
  5809. uint32_t remoteIp;
  5810. uint16_t remotePort;
  5811. uint16_t part8;
  5812. };
  5813.  
  5814. GAME_EXPORT uintptr_t GetNetGamePlayerOfHost(); // 0x12F6D7C
  5815. GAME_EXPORT void PrepareReply(uintptr_t* netMsg); // 0xA8B814
  5816. GAME_EXPORT void PrepareExtraData(uintptr_t* netMsg, uintptr_t* buffer, size_t size); // 0xA8B908
  5817. GAME_EXPORT uint32_t WriteSerializeMessageId(uint32_t msgId, uintptr_t buffer_0xC); // 0x1626844
  5818. GAME_EXPORT uint32_t WriteSerializeData(uintptr_t* bitBuffer, uint32_t bits, uint32_t size, uint32_t a4); // 0xA8B5FC
  5819. GAME_EXPORT uint32_t WriteSerializeDataOfSize(uintptr_t* bitBuffer, uint32_t size); // 0xA8BBBC
  5820. GAME_EXPORT uint32_t GetSerialization_CurrentBitFlag(uintptr_t* bitBuffer); // 0xA8B978
  5821. GAME_EXPORT uint32_t SendReliableCommand_3(uintptr_t from_netGamePlayer, uint32_t data, uintptr_t to_peerIdentifier, uint32_t a4_0x0, uint32_t a5_0x0, uint32_t a6_0x0); // 0x9F90E4
  5822.  
  5823. // receive function can be found here 0x13E0C38. only the host can receive it for obvious reasons
  5824.  
  5825. // clean it up a little
  5826. void AskHostToKickPlayer(Player player)
  5827. {
  5828. if (!IsSessionHost()) // make sure we are not the host
  5829. {
  5830. uintptr_t netGamePlayerHost = GetNetGamePlayerOfHost();
  5831. if (netGamePlayerHost)
  5832. {
  5833. rage::BitBuffer bitBuf;
  5834. PrepareReply(&bitBuf);
  5835. uint8_t rawReply[50];
  5836. PrepareExtraData(&bitBuf, rawReply, 0x3D6);
  5837. uintptr_t msgRequestKickFromHostPtr = 0x2258B88;
  5838. uint32_t msgIdRequestKickFromHost = *(uint32_t*)(msgRequestKickFromHostPtr + 0x8);
  5839. uint32_t result = WriteSerializeMessageId(msgIdRequestKickFromHost, &bitBuf);
  5840. if (result)
  5841. {
  5842. uint32_t kick_type = 4; // admin kick
  5843. uint32_t ret = rage::CSyncDataWriter->WriteByte(&bitBuf, &kick_type, 8);
  5844. if (ret != 0)
  5845. {
  5846. uint32_t ret = GetSerialization_CurrentBitFlag(&bitBuf);
  5847. SendReliableCommand_3(netGamePlayerHost, bitBuf.m_data, ret, 0, 0, 0);
  5848. }
  5849. }
  5850. }
  5851. }
  5852. }
  5853.  
  5854.  
  5855.  
  5856.  
  5857.  
  5858.  
  5859.  
  5860. class EmptyClass
  5861. {
  5862. public:
  5863. uint32_t m_1;
  5864. uint32_t m_2;
  5865. uint32_t m_3;
  5866. uint32_t m_4;
  5867. uint32_t m_5;
  5868. uint32_t m_6;
  5869. uint32_t m_7;
  5870. uint32_t m_8;
  5871. uint32_t m_9;
  5872. uint32_t m_10;
  5873. uint32_t m_11;
  5874. uint32_t m_12;
  5875. };
  5876.  
  5877. class BitBuffer
  5878. {
  5879. public:
  5880. EmptyClass* m_data; // 0x0000
  5881. uint32_t m_f8; // 0x0004
  5882. uint32_t m_maxBit; // 0x0008
  5883. uint32_t m_unkBit; // 0x000C
  5884. uint32_t m_curBit; // 0x0010
  5885. uint32_t m_unk2Bit; // 0x0014
  5886. uint8_t m_flagBits; // 0x0018
  5887. }; // Size=0x0018
  5888.  
  5889. bool SyncDataWriter_WriteByte(BitBuffer* data, uint8_t* value, size_t size)
  5890. {
  5891. bool result = false;
  5892. if (((data->m_flagBits >> 7) & 1) == 0)
  5893. {
  5894. if (data->m_unkBit + 8 <= data->m_maxBit)
  5895. {
  5896. if (((data->m_flagBits >> 6) & 1) == 0)
  5897. WriteSerializeData(data->m_data, *value, size, data->m_unkBit + data->m_f8);
  5898. WriteSerializeDataOfSize(data, size);
  5899. result = true;
  5900. }
  5901. }
  5902.  
  5903. return result;
  5904. }
  5905.  
  5906.  
  5907.  
  5908.  
  5909.  
  5910.  
  5911.  
  5912.  
  5913.  
  5914.  
  5915.  
  5916.  
  5917.  
  5918.  
  5919.  
  5920.  
  5921.  
  5922.  
  5923.  
  5924.  
  5925.  
  5926.  
  5927.  
  5928.  
  5929. GAME_EXPORT uint32_t WriteNetMessage_RemoveGamersFromSessionCmd(uintptr_t* a1, uintptr_t* netMsg); // 0x1626A4C
  5930. GAME_EXPORT void SendUnreliableCommand(uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uint32_t a5, uint32_t a6); // 0xD122B4
  5931. GAME_EXPORT void SendReliableCommand_5(uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uint32_t a5, uint32_t a6); // 0xD15F28
  5932.  
  5933. void RemoveGamerCommandV1()
  5934. {
  5935. BitBuffer reply;
  5936. PrepareReply(&reply);
  5937. uint8_t rawReply[50];
  5938. PrepareExtraData(&reply, rawReply, 0x3D6);
  5939. uint8_t removeGamerReply[50]; // this is a structure and needs some function to generate the values
  5940. if (WriteNetMessage_RemoveGamersFromSessionCmd(removeGamerReply, &reply))
  5941. {
  5942. uint32_t ret = GetSerialization_CurrentBitFlag(&reply);
  5943. SendUnreliableCommand(rage::netConnectionManager*, peerIdentifier, someSize, bitBuf.m_data, ret, 0x1000000);
  5944. }
  5945. }
  5946.  
  5947. void RemoveGamerCommandV2()
  5948. {
  5949. BitBuffer reply;
  5950. PrepareReply(&reply);
  5951. uint8_t rawReply[50];
  5952. PrepareExtraData(&reply, rawReply, 0x3CF);
  5953. uint8_t removeGamerReply[50]; // this is a structure and needs some function to generate the values
  5954. if (WriteNetMessage_RemoveGamersFromSessionCmd(removeGamerReply, &reply))
  5955. {
  5956. uint32_t ret = GetSerialization_CurrentBitFlag(&reply);
  5957. SendReliableCommand_5(v11 + 0x1EF8, v35, v66, ret, 0, 0);
  5958. }
  5959. }
  5960.  
  5961.  
  5962.  
  5963.  
  5964.  
  5965.  
  5966. bool DoesPlayerHaveSuperJump(Player player)
  5967. {
  5968. // 22 jumps normal
  5969. // 19 jumps normal
  5970. // 20 jumps normal
  5971. // 19 jumps normal
  5972. // 19 jumps normal
  5973.  
  5974. // 38 jumps of top of tall vehicle
  5975. // 33 jumps of top of tall vehicle
  5976.  
  5977. // 29 super jump
  5978. // 39 super jump
  5979. // 42 super jump
  5980. // 96 super jump max
  5981. // 89 super jump
  5982. // 90 super jump
  5983. // 91 super jump
  5984. // 96 super jump
  5985. // 95 super jump
  5986.  
  5987. // 524 when player jumped off maze bank then died
  5988.  
  5989. static int jumplength = 0;
  5990. if (IS_PED_JUMPING(GET_PLAYER_PED(player)))
  5991. jumplength++;
  5992.  
  5993. printf("%d jump ticks on player %d\n", jumplength, player);
  5994. if (jumplength > 40)
  5995. {
  5996. printf("player %d has super jump %d\n", player, jumplength);
  5997. jumplength = 0;
  5998. return true;
  5999. }
  6000.  
  6001. return false;
  6002. }
Add Comment
Please, Sign In to add comment