Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //static BOOL GET_PED_LAST_WEAPON_IMPACT_COORD(Ped ped, Vector3* coords) { return invoke<BOOL>(0x9B266079, ped, coords); } // 0x9B266079
- static BOOL(*GET_PED_LAST_WEAPON_IMPACT_COORD)(Ped ped, int coordsfreeMem) = (BOOL(*)(Ped, int))&__GET_PED_LAST_WEAPON_IMPACT_COORD_t;
- static BOOL GET_PED_LAST_WEAPON_IMPACT_COORD_MODIFYED(Ped ped, float coords[4]) {
- Vector3 in;
- ResetArgs();
- PushArg(ped);
- PushArg(&in);
- CallHash(0x9B266079, NativeArg);
- return GetResult<BOOL>();
- std::copy(GetDataResult<float*>(0), GetDataResult<float*>(0) + 4, coords);
- } // 0x9B266079
- template <typename R>
- R GetDataResult(uint8_t index)
- {
- R* Result;
- Result = (R*)NativeArg + 0x10 * (index + 4); //0x10030000
- return *(R*)Result;
- }
- static BOOL GET_PED_LAST_WEAPON_IMPACT_COORD_MODIFYED(Ped ped, Vector3 &coords) {
- float tmp[100]; ResetArgs(); PushArg(ped); PushArg(0x10030000);
- for (int i = 0; i < 3; i++)
- tmp[i] = *(float*)(0x10030000 + (i * 0x04));
- Vector3 vOut = FloatToVector(tmp[0], tmp[1], tmp[2]);
- coords = vOut;
- CallHash(0x9B266079, NativeArg);
- return GetResult<BOOL>();
- } // 0x9B266079
- static BOOL(*GET_PED_LAST_WEAPON_IMPACT_COORD)(Ped ped, int coordsfreeMem) = (BOOL(*)(Ped, int))&__GET_PED_LAST_WEAPON_IMPACT_COORD_t;
- int hitsomething = 0, entityHandle = 0; Vector3 endCoords, surfaceNormal;
- int getRaycastHandle(int type)
- {
- /*Vector3 camrot = GET_GAMEPLAY_CAM_ROT(2);
- Vector3 campos = GET_GAMEPLAY_CAM_COORD();
- Vector3 selfvec = GET_ENTITY_FORWARD_VECTOR(PLAYER_PED_ID());
- Vector3 multiplied = { RotationToDirection(camrot).x * 1000.0f, RotationToDirection(camrot).y * 1000.0f, RotationToDirection(camrot).z * 1000.0f };
- 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);
- return ray;*/
- Vector3 camPos = GET_GAMEPLAY_CAM_COORD();
- Vector3 camRot = GET_GAMEPLAY_CAM_ROT(2);
- float retz = camRot.z * 0.0174532924F;
- float retx = camRot.x * 0.0174532924F;
- float absx = ABSF(COS(retx));
- Vector3 camStuff = { SIN(retz) * absx * -1, COS(retz) * absx, SIN(retx) };
- 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);
- }
- unsigned int *getGlobalPtr(int globalId)
- {
- unsigned int **arr = (unsigned int **)(0x1E70370);
- return &arr[(globalId >> 18) & 0x3F][globalId & 0x3FFFF];
- //return (unsigned int *)(*(DWORD *)(0x000000 + 8i64 * ((globalId >> 18) & 0x3F) + moduleHandle) //reversed
- // + 8i64 * (globalId & 0x3FFFF));
- }
- //SetGlobal(1325955, 1662, 1337);
- *getGlobalPtr(OFF_THE_RADAR_TIME) = 1337; //DEADC0DE time
- //262145 wanted lvl
- //SetGlobal(2394218, 55, GET_NETWORK_TIME());
- //SetGlobal(2387908, 169, 1);
- //SetGlobal(2387908 + 223, 169, 1);
- //SetGlobal(2387908[PLAYER_ID() * 223], 169, 1);
- //SetGlobal(2390201, 171, 1);
- //SetGlobal(2390201 + 223, 171, 1);
- //SetGlobal2390201[PLAYER_ID() * 223], 171, 1);
- /*SetGlobal(2387908, 169, 1);
- SetGlobal(2390201, 171, 1);
- SetGlobal(2387908 + 223, 169, 1);
- SetGlobal(2387908 + PLAYER_ID() * 223, 169, 1);
- SetGlobal(2387908 + PLAYER_ID() + 223, 169, 1);
- SetGlobal(2387908 + PLAYER_ID(), 169, 1);*/
- void btnOffRadar_Click(object sender, EventArgs e)
- {
- if (ScriptGlobals.Read(2390201 + (uint)(NativeFuncs.player_id() * 223) + 170) == 0)
- {
- ScriptGlobals.Write(2390201 + (uint)(NativeFuncs.player_id() * 223) + 170, 1);
- ScriptGlobals.Write(2394218 + 55, 2147483647);
- }
- else
- ScriptGlobals.Write(2390201 + (uint)(NativeFuncs.player_id() * 223) + 170, 0);
- }
- if (featureTest)
- {
- Vector3 closestcoords = GET_ENTITY_COORDS(PLAYER_PED_ID(), FALSE);
- getNearEntities(PLAYER_PED_ID(), 1, 1, 7, 2, NULL);
- for (int i = 0; 0 < sizeof(); i++)
- {
- }
- EntitiesNearBy[i] = GET_ENTITY_ATTACHED_TO(PLAYER_PED_ID());
- EntitiesNearBy[i] = GET_CLOSEST_VEHICLE(closestcoords.x, closestcoords.y, closestcoords.z, 10.0f, 0, CARS_N_MOTOCYCLES_2);
- EntitiesNearBy[i] = GET_RANDOM_PED_AT_COORD(closestcoords.x, closestcoords.y, closestcoords.z, 10.0f, 10.0f, 10.0, -1);
- if (DOES_ENTITY_EXIST(EntitiesNearBy[i]))
- {
- if (!NETWORK_HAS_CONTROL_OF_ENTITY(EntitiesNearBy[i]))
- NETWORK_REQUEST_CONTROL_OF_ENTITY(EntitiesNearBy[i]);
- else
- {
- DETACH_ENTITY(EntitiesNearBy[i], 1, 1);
- SET_ENTITY_AS_MISSION_ENTITY(EntitiesNearBy[i], 1, 1);
- DELETE_ENTITY(&EntitiesNearBy[i]);
- }
- }
- int funcaddr = 0x139ECB0;//0x13321EC;
- ((void(*)(int, unsigned int, int, int, int, int, int, int, int))&funcaddr)(0x40022280, 0x1004004C, 1, 0, 0, 0, 0x540, 0x4ec, 0x59);
- GetClosestVehicle
- __int64 __fastcall sub_4549C8(__int64 a1, float a2, unsigned int a3, unsigned int a4)
- {
- signed int v4; // ebx@1
- unsigned int v5; // er14@1
- __int64 v6; // rdi@1
- signed int v7; // ebp@1
- float v8; // xmm6_4@1
- int v9; // eax@2
- unsigned int v10; // xmm1_4@3
- unsigned int v11; // xmm2_4@3
- float v12; // xmm6_4@3
- __int64 v13; // rcx@3
- unsigned int v14; // edi@3
- __int64 v15; // r9@4
- int v16; // eax@5
- __int64 v17; // rax@6
- __int64 v18; // rsi@9
- __m128 v19; // xmm2@12
- __m128i v20; // xmm2@12
- float v21; // xmm7_4@12
- int v22; // eax@13
- int v24; // [sp+20h] [bp-58h]@2
- __m128 v25; // [sp+30h] [bp-48h]@3
- int v26; // [sp+90h] [bp+18h]@1
- v4 = 0;
- v5 = a4;
- v6 = a1;
- v7 = 0;
- v8 = a2;
- v26 = (v26 | 0xFFFFFFF) & 0xFFFFFFF;
- if ( !a3
- || (v24 = 0xFFFF,
- sub_14079692C(a3, &v24),
- LOWORD(v26) = v24,
- v9 = v26 | 0xFFF0000,
- _bittestandreset((unsigned int *)&v9, 0x1Cu),
- v26 = v9,
- (unsigned __int16)v9 != 0xFFFF) )
- {
- v10 = *(_DWORD *)(v6 + 8);
- v11 = *(_DWORD *)(v6 + 16);
- v12 = v8 * v8;
- v13 = *(_QWORD *)VehiclePool;
- v25.m128_i32[0] = *(_DWORD *)v6;
- *(unsigned __int64 *)((char *)&v25.m128_u64[0] + 4) = __PAIR__(v11, v10);
- v14 = *(_DWORD *)(v13 + 8);
- if ( v14 )
- {
- do
- {
- --v14;
- v15 = *(_QWORD *)VehiclePool;
- if ( (signed int)v14 < *(_DWORD *)(*(_QWORD *)VehiclePool + 8i64)
- && (v16 = *(_DWORD *)(*(_QWORD *)(v15 + 48) + 4 * ((unsigned __int64)v14 >> 5)),
- _bittest((const unsigned int *)&v16, v14 & 0x1F)) )
- v17 = *(_QWORD *)v15 + v14 * *(_QWORD *)(v15 + 24);
- else
- v17 = 0i64;
- if ( v17 )
- v18 = *(_QWORD *)v17;
- else
- v18 = 0i64;
- if ( v18 )
- {
- v19 = _mm_sub_ps(*(__m128 *)(v18 + 144), v25);
- v20 = (__m128i)_mm_mul_ps(v19, v19);
- LODWORD(v21) = (unsigned __int128)_mm_add_ps(
- _mm_add_ps(
- (__m128)_mm_shuffle_epi32(v20, 0),
- (__m128)_mm_shuffle_epi32(v20, 85)),
- (__m128)_mm_shuffle_epi32(v20, -86));
- if ( v21 < v12 )
- {
- v22 = sub_140796DD8(&v26);
- if ( (unsigned __int8)sub_13FF39C34(v18, (unsigned int)v22, v5) )
- {
- v7 = sub_13FC7F104(v18);
- v12 = v21;
- }
- }
- }
- }
- while ( v14 );
- if ( v7 )
- sub_13FC728D0(v7);
- }
- v4 = v7;
- }
- return (unsigned int)v4;
- }
- __int64 __fastcall get_entity_type(int a1)
- {
- __int64 result; // rax@1
- signed int v2; // ecx@1
- char v3;
- result = GetAddressOfEntity(a1);
- v2 = 0;
- if (result)
- {
- v3 = *(_BYTE *)(result + 40);
- if (v3 == 4)
- {
- result = 1i64;
- }
- else if (v3 == 3)
- {
- result = 2i64;
- }
- else
- {
- if (v3 == 5)
- v2 = 3;
- result = (unsigned int)v2;
- }
- }
- return result;
- }
- char __fastcall is_model_a_vehicle(__int64 a1)
- {
- char v1; // bl@1
- __int64 v2; // rax@1
- int v4; // [sp+38h] [bp+10h]@1
- v1 = 0;
- v4 = 0xFFFF;
- LODWORD(v2) = sub_7FF601C276A4(a1, &v4);
- if (v2)
- {
- v1 = 0;
- if ((*(_BYTE *)(v2 + 157) & 0x1F) == 5)
- v1 = 1;
- }
- return v1;
- }
- int64 PLAYER_ID()
- {
- int64 v0; // rax@2
- __int64 result; // rax@2
- if (byte_7FF602DDAB4E)
- {
- LODWORD(v0) = sub_7FF60170275C(off_7FF602370AA0);
- result = *(_BYTE *)(v0 + 45);
- }
- else
- {
- result = 0i64;
- }
- return result;
- }
- // GTA5_dump_Static_1604.1_1.46
- int __fastcall sub_14113F31C(__int64 a1, __int64 a2)
- {
- __int64 v2; // rdi@1
- char v3; // bl@1
- __int64 v4; // rax@1
- __int64 v5; // r8@1
- __int64 v6; // r9@1
- __int64 v7; // rax@1
- v2 = a1;
- v3 = a2;
- LOBYTE(a2) = 1;
- sub_1416036D8(qword_14286B510, a2);
- LODWORD(v4) = sub_141568DC4(qword_142DF38C0);
- v6 = v4;
- v7 = 0i64;
- if ( v6 )
- {
- LOBYTE(v5) = v3;
- LODWORD(v7) = sub_141128C60(v6, *(_WORD *)(*(_QWORD *)(v2 + 208) + 10i64), v5);
- }
- return sub_141613B54(qword_14286B510, v7);
- }
- void __fastcall sub_14113F31C(__int64 a1, __int64 a2)
- {
- __int64 v2; // rdi@1
- char v3; // bl@1
- _DWORD *v4; // r9@1
- __int64 v5; // rax@1
- v2 = a1;
- v3 = a2;
- LOBYTE(a2) = 1;
- sub_1416036D8(qword_14286B510, a2);
- v4 = sub_141568DC4(qword_142DF38C0);
- v5 = 0i64;
- if ( v4 )
- v5 = sub_141128C60((__int64)v4, *(_WORD *)(*(_QWORD *)(v2 + 208) + 10i64), v3);
- sub_141613B54(qword_14286B510, v5);
- }
- template<typename T>
- T Invoke(unsigned int a_uiNativeHash, unsigned int a_uiArgCount, ...)
- {
- T* Result;
- va_list l_VaList;
- unsigned int l_uiIndex;
- unsigned int l_uiReadCount = 0;
- va_start(l_VaList, a_uiArgCount);
- for (l_uiIndex = 0; l_uiIndex < 16; l_uiIndex++)
- {
- if (l_uiIndex < a_uiArgCount)
- g_pArgs[l_uiIndex] = va_arg(l_VaList, unsigned int);
- else
- g_pArgs[l_uiIndex] = 0;
- }
- va_end(l_VaList);
- //DbgPrint("Calling: 0x%08X\n", a_uiNativeHash);
- if (a_uiNativeHash != PLAYER_ID_HASH)
- ((void(*)(struct NativeArg*))GetNativeFunction(a_uiNativeHash))(&g_NativeArg);
- else
- Original_Player_ID(&g_NativeArg);
- Result = (T*)&g_pArgs[l_uiReadCount];
- l_uiReadCount += sizeof(T);
- if ((sizeof(T) % 4) != 0)
- l_uiReadCount += 4 - (sizeof(T) % 4);
- return *(T*)Result;
- }
- void draw_menu(int a_iPosition, int a_iMenuItemCount, char ** a_pcMenu, char* a_pcTitle)
- {
- GRAPHICS::DRAW_RECT(0.90f, 0.2f, 0.15f, 0.05f, 0xFF, 0, 0, 0x90);
- 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);
- //GRAPHICS::DRAW_RECT(0.90f, 0.50f, 0.15f, 0.55f, 0xFF, 0, 0, 0x30);
- PrintToScreen(a_pcTitle, 0.90f, 0.18f, 255, 255, 255, 255, 0.8f, 0.8f, 1, 1);
- if (a_iMenuItemCount < 16)
- {
- GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(a_iPosition), 0.15f, 0.035f, 0xFF, 0, 0, 0x80);
- for (int l_iIndex = 0; l_iIndex < a_iMenuItemCount; l_iIndex++)
- {
- PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iIndex * .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0);
- }
- }
- else
- {
- if (a_iPosition < 7)
- {
- GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(a_iPosition), 0.15f, 0.035f, 0xFF, 0, 0, 0x80);
- for (int l_iIndex = 0; l_iIndex < 16; l_iIndex++)
- {
- PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iIndex * .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0);
- }
- }
- else
- {
- if (a_iPosition < a_iMenuItemCount - 8)
- {
- GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(7), 0.15f, 0.035f, 0xFF, 0, 0, 0x80);
- int l_iDrawIndex = 0;
- for (int l_iIndex = a_iPosition - 7; l_iIndex < a_iPosition + 9; l_iIndex++)
- {
- PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iDrawIndex* .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0);
- l_iDrawIndex++;
- }
- }
- else
- {
- GRAPHICS::DRAW_RECT(0.90f, 0.2425f + (float).035f*(16 - (a_iMenuItemCount - a_iPosition)), 0.15f, 0.035f, 0xFF, 0, 0, 0x80);
- int l_iDrawIndex = 0;
- for (int l_iIndex = a_iMenuItemCount - 16; l_iIndex < a_iMenuItemCount; l_iIndex++)
- {
- PrintToScreen(a_pcMenu[l_iIndex], 0.90f, (0.2225f + (l_iDrawIndex* .035f)), 255, 255, 255, 255, 0.4f, 0.4f, 1, 0);
- l_iDrawIndex++;
- }
- }
- }
- }
- }
- void PrintToScreen(char *str, float x, float y, int r, int g, int b, int a, float scaleX, float scaleY, int centerText, int font)
- {
- UI::SET_TEXT_FONT(font);
- UI::SET_TEXT_COLOUR(r, g, b, a);
- UI::SET_TEXT_SCALE(scaleX, scaleY);
- UI::SET_TEXT_OUTLINE();
- UI::SET_TEXT_CENTRE(centerText);
- UI::_SET_TEXT_ENTRY("STRING");
- UI::_ADD_TEXT_COMPONENT_STRING(str);
- UI::_DRAW_TEXT(x, y);
- }
- void HeistHUD(char* text)
- {
- }
- void InfoMessage(char* text)
- {
- }
- void MPMESSAGE(char* msg, char* desc)
- {
- featureBigMPMessge = true;
- BigMPMessagemgs = msg;
- BigMPMessagedesc = desc;
- PLAY_SOUND_FRONTEND(-1, "RACE_PLACED", "HUD_AWARDS");
- }
- if (featureBigMPMessge)
- {
- if (!HAS_SCALEFORM_MOVIE_LOADED(SFBigMPMessage))
- SFBigMPMessage = REQUEST_SCALEFORM_MOVIE("MP_BIG_MESSAGE_FREEMODE");
- else
- {
- if (GET_GAME_TIMER() > featureTimeMPMessage) {
- featureTimeMPMessage = GET_GAME_TIMER() + 20;
- _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBigMPMessage, "SHOW_SHARD_CREW_RANKUP_MP_MESSAGE"); //SHOW_SHARD_CENTERED_TOP_MP_MESSAGE
- set_text_component(BigMPMessagemgs);
- set_text_component(BigMPMessagedesc);
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- DRAW_SCALEFORM_MOVIE_FULLSCREEN(SFBigMPMessage, 255, 255, 255, 255);
- if (_BigMPMessagetime == 40) {
- _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBigMPMessage, "TRANSITION_UP");
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(&SFBigMPMessage);
- featureBigMPMessge = false;
- _BigMPMessagetime = 0;
- }
- else
- _BigMPMessagetime++;
- }
- }
- }
- case 5: MPMESSAGE("ROULETTE", "coding like a rockstar"); break;
- bool _scaleformFadeTimerEnabled = 0;
- int SFBMPM;
- DWORD _scaleformFadeTimerWaiter = 0;
- if (_scaleformFadeTimerEnabled)
- {
- if (!HAS_SCALEFORM_MOVIE_LOADED(SFBMPM))
- SFBMPM = REQUEST_SCALEFORM_MOVIE("MP_BIG_MESSAGE_FREEMODE");
- else
- {
- _scaleformFadeTimerWaiter = GET_GAME_TIMER() + 2000;
- _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBMPM, "SHOW_SHARD_CREW_RANKUP_MP_MESSAGE" /*titleStr, msgStr, rankNumber, emblemTXD, emblemTXN, alpha*/); //SHOW_SHARD_CENTERED_TOP_MP_MESSAGE
- _BEGIN_TEXT_COMPONENT("STRING");
- ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("TheRouletteBoi");
- _END_TEXT_COMPONENT();
- _BEGIN_TEXT_COMPONENT("STRING");
- ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("ROULETTE");
- _END_TEXT_COMPONENT();
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- DRAW_SCALEFORM_MOVIE_FULLSCREEN(SFBMPM, 255, 255, 255, 255);
- if (GET_GAME_TIMER() > _scaleformFadeTimerWaiter)
- {
- _PUSH_SCALEFORM_MOVIE_FUNCTION(SFBMPM, "TRANSITION_UP");
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(0.2000000/*duration*/);
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(&SFBMPM);
- _scaleformFadeTimerEnabled = false;
- }
- }
- }
- case 11: SET_WARNING_MESSAGE("Panic Mode is enabled.", 3, "Press square and triange to disable Panic Mode.", false, -1, 0, 0, true);
- //Panic Mode is enabled.
- //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.
- //Press square and triange to disable Panic Mode.
- //http://steamcommunity.com/id/clarexobearrx3/screenshots/
- break;
- Vector3 rot_to_direction(Vector3* rot)
- {
- float radiansZ = rot->z * 0.0174532924f;
- float radiansX = rot->x * 0.0174532924f;
- float num = ABSF((float)COS((double)radiansX));
- Vector3 dir;
- dir.x = (float)((double)((float)(-(float)SIN((double)radiansZ))) * (double)num);
- dir.y = (float)((double)((float)COS((double)radiansZ)) * (double)num);
- dir.z = (float)SIN((double)radiansX);
- return dir;
- }
- Vector3 add(Vector3* vectorA, Vector3* vectorB)
- {
- Vector3 result;
- result.x = vectorA->x;
- result.y = vectorA->y;
- result.z = vectorA->z;
- result.x += vectorB->x;
- result.y += vectorB->y;
- result.z += vectorB->z;
- return result;
- }
- Vector3 multiply(Vector3* vector, float x)
- {
- Vector3 result;
- result.x = vector->x;
- result.y = vector->y;
- result.z = vector->z;
- result.x *= x;
- result.y *= x;
- result.z *= x;
- return result;
- }
- float get_distance(Vector3* pointA, Vector3* pointB)
- {
- float a_x = pointA->x;
- float a_y = pointA->y;
- float a_z = pointA->z;
- float b_x = pointB->x;
- float b_y = pointB->y;
- float b_z = pointB->z;
- double x_ba = (double)(b_x - a_x);
- double y_ba = (double)(b_y - a_y);
- double z_ba = (double)(b_z - a_z);
- double y_2 = y_ba * y_ba;
- double x_2 = x_ba * x_ba;
- double sum_2 = y_2 + x_2;
- return (float)sqrt(sum_2 + z_ba);
- }
- float get_vector_length(Vector3* vector)
- {
- double x = (double)vector->x;
- double y = (double)vector->y;
- double z = (double)vector->z;
- return (float)sqrt(x * x + y * y + z * z);
- }
- void UpdateBusySpinner()
- {
- /*func_83(P);
- if (_0xF6015178("SHOW_WARNING_MESSAGE"))
- {
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_BOOL(uParam0);
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(uParam1);
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(uParam2);
- _BEGIN_TEXT_COMPONENT("STRING");
- ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("Loading, Please wait.");
- _END_TEXT_COMPONENT();
- _BEGIN_TEXT_COMPONENT("STRING");
- ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("LOADING DONE!");
- _END_TEXT_COMPONENT();
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(uParam5);
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_STRING(uParam6);
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_STRING(uParam7);
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- }*/
- if (!HAS_SCALEFORM_MOVIE_LOADED(SFMBS))
- SFMBS = REQUEST_SCALEFORM_MOVIE("busy_spinner");
- else
- {
- _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "CLEAR_ALL");
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "SET_DATA_SLOT"); // CREATE_CONTAINER
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(0);
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(LOADING_HALF_CIRCLE_RIGHT);
- _BEGIN_TEXT_COMPONENT("STRING");
- ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("Loading, Please wait.");
- _END_TEXT_COMPONENT();
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "DRAW_INSTRUCTIONAL_BUTTONS");
- _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT(-1);
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- }
- /*if (!HAS_SCALEFORM_MOVIE_LOADED(SFMBS))
- SFMBS = REQUEST_SCALEFORM_MOVIE("CUSTOM_WARNING_SCREEN");
- else
- {
- //"BANNED FOR EVER."
- //"BITCH YOU'VE BEEN BANNED."
- _PUSH_SCALEFORM_MOVIE_FUNCTION(SFMBS, "SHOW_CUSTOM_WARNING_SCREEN");
- _POP_SCALEFORM_MOVIE_FUNCTION_VOID();
- }*/
- DRAW_SCALEFORM_MOVIE_FULLSCREEN(SFMBS, 255, 255, 255, 255);
- }
- /*
- WT_HEALTH //health
- PS_SPEC_AB //special
- LOB_CAT_9 //wanted levels
- FMMC_NONE; //unavailable
- FACE_HAIR; //Hair
- FACE_BRD; //Beard
- HLTH_REGEN2; //max health
- LOB_CAT_9; //wanted levels
- PIM_DHIGH0; off
- PIM_DHIGH1; //on
- MOD_MNU;
- CELL_221; //enter number
- HTX_ENTER; //enter
- CM_SPECTATE spectate player (beta)
- CM_SHOW_GAMER_CARD show profile
- CMOD_MOD_22_D increase downforce.
- cell_19 Players
- cell_18 Map
- cell_32 Qucik Save //for recovery menu
- cell_35 Player List
- CELL_MP_1001 invite to party
- CELL_MP_1005 Player
- CELL_MP_1007 View Profile
- PM_MP_OPTIONS Options
- PM_FRESES Join Friends
- PM_CRESES Join Crew Members
- PM_PLYRS Players
- PM_SWAP_CHAR Swap Character
- PM_FIND_SESS Find new Session
- UGC_FL_UNEX The Rockstar game services are unavailable right now. Please try again later.
- PM_MY_PLIST My Playlists
- PM_R_PLIST Rockstar Playlists
- PM_R_V_PLIST Rockstar Verified playlist
- PM_DLOAD_PLIST My Bookmarked Playlists
- PM_AVAIL_CHALL Challenges
- PM_MULTI x
- PM_CH_NM_AL Please choose a valid title for your Challenge.
- PM_CLMN_WRNT1 No Playlists
- PM_CREWS Crews
- PM_INF_AJ2T1 Bookmarked
- PM_INF_LEAT Leave
- PM_FIND_SESS Find New Session
- PM_INF_CHCT Choose Character
- PM_INF_PGOT Play GTA Online
- PM_INF_CRWT Crews
- PM_INF_AWDT Awards
- PM_INF_WEPT Weapons
- PM_INF_UNLT Unlocks
- PM_INF_PLLT Playlists
- PM_INF_PLLT00 R* Tournaments
- PM_INF_PLLT0 My Playlists
- PM_CLMN_WRNT5 No Challenges
- BM_INV_SENT Inviting Players
- BM_NO_INV No invites sent
- PIM_TINVE Inventory
- PIM_THELP Brief
- PIM_TOBJ Objective
- PM_INVO_FM Invite Only Session
- PM_GO Go
- PM_NCREW_FM Crew Session
- PM_CREW_FM Closed Crew Session
- PM_FRIEND_FM Closed Friend Session
- PM_SOLO_FM Solo Session
- PM_ON On
- PM_OFF Off
- PM_SHUFFLE Shuffle Playlist
- HUD_INVPROG Joining session in progress.
- R2P_MENU_TINV PLAYER LIST
- BLIP_0 Destination
- BLIP_1 Destination
- BLIP_2 Destination
- BLIP_3 Police
- BLIP_4 Objective
- BLIP_5 Objective
- BLIP_6 Player
- BLIP_7 North
- BLIP_8 Waypoint
- HUD_LOADMAIN rockstart game sercives are temportily unavailable
- HUD_KICKRES Kick from session for beeing idle too long
- HUD_KICKRES1 You were kicked from this GTA Online session by others players
- HUD_KICKRES2 you have been classed as a cheater
- HUD_KICKWARN Players are voting for you to be removed from the session. Improve your behavior or you will be kicked.
- HUD_ENDPARTYLEFT The party leader has left.
- HUD_MPBAILMESG Connection to the session lost due to an unknown network error.
- HUD_TIMEJOIN Timed out joining session.
- HUD_TIMEST Timed out loading player data.
- HUD_TIMEFIN Timed out loading session.
- HUD_TIMEWAIT Timed out locating session.
- HUD_MPTIMOUT Connecting to the session has timed out.
- HUD_CONNPROB alert
- HUD_SPRETURNTRY Please return to Grand Theft Auto V and try again later.
- HUD_CHNGCREWMSG You have changed your Crew during a session.
- HUD_QURETMEN Returning to Character Selection.
- HUD_KICKCREWMSG You were kicked from your Crew.
- HUD_SPRETRNFRSH Please return to Grand Theft Auto V.
- CLOUD_LD_FL2 Return to GTA Online.
- HUD_LOADMAIN The Rockstar game services are temporarily unavailable due to maintenance.
- HUD_BAILSC There has been an error joining a session.
- HUD_BAIL1 You have bailed the game from Rag.
- HUD_BAIL2 A sign-in change has occurred.
- HUD_BAIL3 New content has been installed.
- HUD_BAIL4 Failed to find a compatible GTA Online session.
- HUD_BAIL5 Failed to host a GTA Online session.
- HUD_BAIL6 Failed to join intended GTA Online session.
- HUD_BAIL7 Failed to start the active GTA Online session.
- HUD_BAIL8 Failed to host an active GTA Online session.
- HUD_BAIL9 Connection to the session host has been lost. Unable to determine a new host. The GTA Online session will be terminated.
- HUD_BAIL10 Failed to host a GTA Online party.
- HUD_BAIL11 Failed to join intended GTA Online party.
- HUD_BAIL12 Timed out joining GTA Online.
- HUD_BAIL13 Connection to the active GTA Online session lost due to an unknown network error.
- HUD_BAIL14 Timed out when launching the activity.
- HUD_BAIL15 Timed out when leaving the active GTA Online session.
- HUD_BAIL16 Timed out when matchmaking for a compatible GTA Online session to join.
- HUD_MM_FAIL The Rockstar Matchmaking Service has failed to find a suitable match.
- HUD_QURETSP Return to Grand Theft Auto V.
- HUD_MPREENTER Joining a new GTA Online session.
- //CM_JOIN_GAME Accept Game Invite
- //CM_JIP_GAME Join Game
- //CM_JIP_GAME_DIS Join Game (Disabled)
- //CM_SPECTATE Spectate Player (BETA)
- //CM_SPECTATE_DISABLED Spectate Player (Disabled by Player)
- //CM_JOIN_PARTY Join Party
- //CM_SEND_FRIEND_INVITE Send Friend Request
- //CM_SEND_CREW_INVITE Invite to
- //CM_SEND_PARTY_INVITE Send Party Invite
- //CM_KICK_PARTY Kick from Party
- //CM_SEND_GAME_INVITE Send Game Invite
- //CM_SEND_GAME_INVITE_DIS Send Game Invite (Disabled)
- //CM_KICK_DIS Kick (Disabled)
- //CM_UNKICK Unkick
- //CM_REPORT Report
- //CM_REPORT_DIS Report (Disabled)
- //CM_COMMEND Commend
- //CM_COMMEND_DIS Commend (Disabled)
- //CM_MUTE Toggle Mute
- //CM_SHOW_GAMER_CARD Show Profile
- //CM_ADD_A_FRIEND Add A Friend
- //CM_GAMER_REVIEW Player Review
- //IB_JOINCREW Join Crew
- //HUD_INPUT53 Back
- //CC_PM_OPT OPTIONS
- //CC_PM_DET DETAILS
- //PM_SCR_CCY YOU
- //CRW_MINE My Crews
- //CRW_ROCKSTAR Suggested Crews
- //CRW_FRIENDS Friends' Crews
- //CRW_INVITES Invitations
- //CRW_REQUESTS Requests
- //CRW_LEADERBOARDS Leaderboard
- //FM_COR_KICKOC You have been kicked from the Job. You are no loger on call.
- //HUD_ENDKICK You were kicked from the session.
- //HUD_ENDADMINKICK You Have been removed from this session by a Rockstar Games administrator.
- //HUD_KICKROCK The session you were spectating is being assessed by Rockstar with a view to broadcasting that as an Online TV Channel.
- //HUD_ROSBANNED You have been banned from Grand Theft Auto Online.
- //HUD_CONNPROB alert
- //HUD_QURETSP Return to Grand Theft Auto V.
- //HUD_KICKCREWMSG You were kicked from your Crew. Global_1315377
- //MP_PROP_PUR_KICK2 You no longer have access tp the property as the owner has left the game.
- //MP_PROP_PUR_KICK0 You no longer have access to the property as you have traded it in.
- //MP_PROP_PUR_KICK1 You no loger have access to the property as the owner has traded it.
- //FM_COR_KICKA You have been kicked from the Activity
- //FM_COR_KICK You have been kicked from the Job.
- //PLYKICKED was voted from the game.
- //SCTV_FEED0 Show Feed
- //SCTV_FEED1 Show List
- //SCTV_HELI_OFF Online TV Heli Off
- //SCTV_HELI_ON Online TV Heli On
- //SCTV_TS_CTFG GTA - fighting for transport
- //SCTV_TS_CTFR Raid - protecting their base of operations
- //SCTV_TS_CTFC Contend - bringing it back to base
- //SCTV_TS_CTFH Hold - holding on for dear life
- //SCTV_TS_LTS2 Two Team LTS - in a two team enter one leaves situation
- //SCTV_TS_LTS3 Three Team LTS - in a three way.. battle for survival
- //SCTV_TS_LTS4 four Team LTS - unlikely to survive a four team fight
- //SCTV_T_LTS LTS
- //SCTV_T_VS versus
- //SCLB_MIS_NN Mission
- //SCTV_SSYOU has stopped spectating you.
- //SCTV_SYOU is spectating you.
- //DSV_TPLYS destroy the ~r~target vehicle.
- //PTD_TPLYSH took down the Smuggler Helicopter.
- //SCLB_PROFILE View Profile
- //SCLB_NO_ROS The Rockstar game services are unavailable right now. Please try again later.
- //SCLB_SIGN_OUT You have signed out of PlayStation Network and will be unable to view leaderboard data.
- //SCLB_NOT_ONL Sign in to Playstation Network to view leaderboards data.
- //FMMC_COR_SCLB5 Driver
- //FMMC_COR_SCLB6 Co-Driver
- //SCLB_C_RANK POSITION
- //SCLB_RCE_NN Race
- SCLB_GLOBAL GLOBAL
- SCLB_FRIENDS FRIENDS
- SCLB_CREW CREW
- SHOP_CONTENT_1 beach bum
- SHOP_CONTENT_2 business update
- SHOP_CONTENT_3 festive
- SHOP_CONTENT_4 valentine's
- SHOP_CONTENT_5 high life update
- SHOP_CONTENT_6 "im not a hipster"
- SHOP_CONTENT_6b "im not a hipster" update
- SHOP_CONTENT_7 heists
- SHOP_CONTENT_8 independence day
- SHOP_CONTENT_9 san andreas flight school
- SHOP_CONTENT_10 last team standing
- SHOP_CONTENT_12 ill-gotten gains update part 1
- SHOP_CONTENT_13 video edditor
- SHOP_CONTENT_14 ill-gotten gains update part 2
- PIM_INVAT Invite to Apartment has been send to .
- PIM_HINVAP Invite this player to your apartment.
- PIM_HINVA Invite players to your Apartment.
- PIM_INVAP Invite to Apartment.
- PIM_TINVE Inventory
- PIM_HHEIS Choose to Spectate other members of your Heist Crew.
- PIM_HHEIB Your Heist Crew cannot currently be spectated.
- PIM_HINVE Your Inventory contains carried oteams such as cash and clothing Accessories.
- PIM_HPASIY Confirm turning on Passive Mode.
- PIM_HPASIN Confrim turning off Passive Mode.
- PIM_HHLPL Make your blip flash to other players for a short time.
- PIM_HHLPR Make the selected player's blip flash to you for a short time.'
- PIM_HPGS A list of all the players in your session.
- PIM_HLJCE Cash earned from the last Job.
- PIM_HHEISP Select to spectate this player.
- PIM_TCHT Chat
- PIM_TAPV Vehicle Access.
- 0x1BA5E3C4 Rockstar wants to know what you
- 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.
- 0x41818A76 Your Sony Entertainment Network account has chat restrictions enabled, only Rockstar content will be available and voice chat is disabled.
- 0x2A199171 Cheater classification release date ~1~/~1~/~1~.
- 0x093ADE5F Rockstar Dev SCTV
- 0x0BD9B728 You have been removed from this session by a Rockstar Games administrator.
- 0x28DBEF47 Rockstar Game Services have corrected your GTA Dollars by -$~1~.
- 0xCF6AEAC0 Rockstar Games SCADMIN Version
- TICK_PH_INV joined job.
- TICK_PH_INVA joined activity.
- TICK_BC_ON has active their Broadcast app.
- TICK_BC_OFF has deactivated their Broadcast app.
- TICK_HEAD NULL
- TICK_DIED died.
- PIM_EMVTK kicked you from thier Personal Vehicle.
- TICK_BC_ON has activated thier Brodcast app.
- TICK_BC_OFF has deactivated thier Brodcast app.
- PLYVEH_INS_DES1 Your insured Personal Vehicle has been destroyed The player who destroyed it has paid $ towards the clain premium.
- PLYVEH_INS_DES has detroyed your insured Personal Vehicle They have paid $ towards the claim premium.
- TICK_PH_INV joined Job.
- 0xA1519D54 Return to Grand Theft Auto V
- 0x478FDC87 GTA Online
- 0x56F3BD49 Grand Theft Auto Online
- 0x5E96ECC Are you sure you want to quit this session?
- 0x14610888 Progress will be automatically saved.
- 0x73A36AB4 Playing story
- 0x83BA9913 Prologue
- 0xABB00DEB Grand Theft Auto V
- 0x6F927644 Bay City Ave
- 0xFBD41663 Alert
- 0xAB11B305 Quit
- 0xC3881591 No
- 0xC4A4A05C Yes
- 0x9E643CB0 driveby_parachute
- NT_INV_CONFIG Getting GTA Online session details.
- NT_INV_MP_SAVE Are you sure you want to join a different GTA Online session? Progress will be automatically saved.
- NT_INV Are you sure you want to join a GTA Online session? Any unsaved progress will be lost.
- NT_INV_IN_SESSION You are already a member of this GTA Online session.
- NT_INV_SP_SAVE Are you sure you want to join a GTA Online session? Any unsaved progress will be lost.
- CWS_SPEC_FAILED Failed to connect to the session.
- CWS_JIP_FAILED Failed to connect to the session.
- NT_INV_FREE Are you sure you want to join a different GTA Online session? Any unsaved progress will be lost.
- BAIL_BLACKLIST You have already been voted out of this game session. Joning a new GTA Online session.
- VEH_CLASS_0 Compacts
- VEH_CLASS_1 Sedans
- VEH_CLASS_2 SUVs
- VEH_CLASS_3 Coupes
- VEH_CLASS_4 Muscle
- VEH_CLASS_5 Sports Classics
- VEH_CLASS_6 Sports
- VEH_CLASS_7 Super
- VEH_CLASS_8 Motorcycles
- VEH_CLASS_9 Off-Road
- VEH_CLASS_10 Industrial
- VEH_CLASS_11 Utility
- VEH_CLASS_12 Vans
- VEH_CLASS_13 Cycles
- VEH_CLASS_14 Boats
- VEH_CLASS_15 Helicopters
- VEH_CLASS_16 Planes
- VEH_CLASS_17 Service
- VEH_CLASS_18 Emergency
- VEH_CLASS_19 Military
- VEH_CLASS_20 Commercial
- VEH_CLASS_21 Trains
- */
- COMMEND_SPAM_TIMEOUT_DISABLED = 0x6133E077
- COMMEND_SPAM_TIMEOUT = 0xA76D3517
- MPPLY_LAST_COMMEND_RESTORE = 0x181F07A6
- MPPLY_LAST_COMMEND_PENALTY = 0x8CF94EB4
- MPPLY_COMMEND_STRENGTH = 0xADA7E7D3
- REPORT_SPAM_TIMEOUT_DISABLED = 0x33406312
- REPORT_SPAM_TIMEOUT = 0x332F884E
- MPPLY_LAST_REPORT_RESTORE = 0x211774A4
- MPPLY_LAST_REPORT_PENALTY = 0xB87499EA
- MPPLY_REPORT_STRENGTH = 0x850CF917
- COMMEND_TIMEOUT_DISABLED = 0x73DC7AA3
- COMMEND_TIMEOUT = 0xABE83C3B
- REPORT_TIMEOUT_DISABLED = 0x7266E8B2
- REPORT_TIMEOUT = 0xA13B434D
- CL_SEND_FRIEND_REQUEST = 0xAFEA09C6
- KICK_TIMEOUT = 0xB2111FE4
- KICK_TIMEOUT_DISABLED = 0xD892E535
- IDLEKICK_KICK = 0x949C8AAD
- ENABLE_KICK = 0xE2E1805E
- KICK_VOTES_NEEDED_RATIO = 0xEED6D618
- BADSPORT_THRESHOLD = 0x4C507C3D
- BADSPORT_THRESHOLD_NOTCHEATER = 0x727F6777
- IDLEKICK_WARNING1 = 0xB3A4D684
- IDLEKICK_WARNING2 = 0xC16F7219
- IDLEKICK_WARNING3 = 0xE009AF49
- COMMENDREPORT_MAX_STRENGTH = 0xF227F666
- MP_GLOBAL = 0x38CEB237, 953070135
- BASE_GLOBALS = 0xB5EE873, 190769267
- CONTENT_MODIFIER_ = 0xE8895D8A, 3901316490
- MP_FM_RACES = 0xC32348A0, 3273869472
- MP_FM_RACES_CAR = 0x3D76C61B, 1031194139
- MP_FM_RACES_SEA = 0xCC580A3A, 3428321850
- MP_FM_RACES_AIR = 0xF4175CBB, 4095171771
- MP_FM_BASEJUMP = 0x30C5F8C6, 818280646
- MP_FM_RACES_CYCLE = 0xEA4446C2, 3930343106
- MP_FM_RACES_BIKE = 0xC795D7FC, 3348486140
- MP_FM_MISSIONS = 0x202DE323, 539878179
- MP_FM_CONTACT = 0xBDD1A4F5, 3184633077
- MP_FM_RANDOM = 0xAD9BAC56, 2912660566
- MP_FM_VERSUS = 0x56A36BC3, 1453550531
- MP_FM_LTS = 0xFCDE7FF3, 4242440179
- MP_FM_CAPTURE = 0xF508B799, 4110989209
- MP_FM_DM = 0x7030EBCC, 1882254284
- MP_FM_SURVIVAL = 0x2217A8F1, 571975921
- MP_FM_GANG_ATTACK = 0x67F82C09, 1744317449
- MP_CNC = 0x53599429, 1398379561
- MP_CNC_TEAM_COP = 0xEE611088, 3999338632
- MP_CNC_TEAM_VAGOS = 0xBB04D34F, 3137655631
- MP_CNC_TEAM_LOST = 0x3AEFBEA0, 988790432
- MP_FM = 0x43FE68BD, 1140746429
- DISABLE_SCTV_GTAO_TV = 0xB715B652, 3071653458
- DISABLE_SCTV_FRIENDS_SPECTATE = 0x74AFE8F8, 1957685496
- DisableSpectate = 0xCAB5C6A2, 3400910498
- DisableSpectate = 0x2A5A6D1F, 710569247
- mpply_crew_0_id = 0x1838E2E9, 406381289
- mpply_crew_1_id = 0x6388AA41, 1669900865
- mpply_crew_2_id = 0x33A7D8B, 54164875
- mpply_crew_3_id = 0xCDC93A60, 3452516960
- mpply_crew_4_id = 0xA202D7E4, 2718095332
- mpply_crew_local_xp_0 = 0xA9C0CB15, 2847984405
- mpply_crew_local_xp_1 = 0x9C0D2FAE, 2618109870
- mpply_crew_local_xp_2 = 0x4C579040, 1280806976
- mpply_crew_local_xp_3 = 0xBEA1F4D7, 3198285015
- mpply_crew_local_xp_4 = 0x70E5595B, 1894078811
- mpply_became_cheater_num = 0xA2A859D5, 2728942037
- mpply_friendly = 0xDAFB10F9, 3673886969
- mpply_offensive_language = 0x3CDB43E2, 1021002722
- mpply_griefing = 0x9C6A0C42, 2624195650
- mpply_helpful = 0x893E1390, 2302546832
- mpply_offensive_ugc = 0xF3DE4879, 4091431033
- mpply_offensive_tagplate = 0xE8FB6DD5, 3908791765
- mpply_exploits = 0x9F79BA0B, 2675554827
- mpply_game_exploits = 0xCBFD04A4, 3422356644
- mpply_vc_hate = 0xE7072CD, 242250445
- mpply_vc_annoyingme = 0x62EB8C5A, 1659604058
- //badsport and some cheat stuff hashes. need to be bruteforced
- 0x6D7F0859 = awd_car_bombs_enemy_kills
- 0xBC707798
- 0xC71E28C5
- //vehicle weapons code:
- Vector3 Global_1312302_8; //coords from 1
- Vector3 Global_1312302_11; //coords from 2
- Vector3 Global_1312302_2; //coords to 1
- Vector3 Global_1312302_5; //coords to 2
- Vector3 Global_1312295_2; //spike coords
- int Global_1312295_5; //spike pickup
- void func_3000()
- {
- int iVar0;
- Vector3 Var1;
- Vector3 Var2;
- float fVar3;
- float uVar4;
- Vector3 vVar5;
- Vector3 vVar6;
- float uVar7;
- Vector3 vVar8;
- Vector3 vVar9;
- if (IS_PLAYER_PLAYING(PLAYER_ID()))
- {
- if (IS_PED_IN_ANY_VEHICLE(PLAYER_PED_ID(), 0))
- {
- _DISABLE_INPUT_GROUP(2);
- iVar0 = GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), 0);
- GET_MODEL_DIMENSIONS(GET_ENTITY_MODEL(iVar0), &Var1, &Var2);
- if (IS_CONTROL_JUST_PRESSED(2, INPUT_SCRIPT_LS) || IS_CONTROL_PRESSED(2, INPUT_SCRIPT_LS))
- {
- if (IS_CONTROL_PRESSED(2, INPUT_SCRIPT_RS))
- {
- Global_1312302_8 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var1.x - 0.2f), (Var1.y - 0.5f), 0.0f);
- Global_1312302_11 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var2.x + 0.2f), (Var1.y - 0.5f), 0.0f);
- if (!IS_ENTITY_IN_AIR(iVar0))
- {
- _GET_GROUND_Z_COORD_WITH_OFFSETS(Global_1312302_8.x, Global_1312302_8.y, Global_1312302_8.z, &uVar4, &vVar5);
- vVar6 = func_363(vVar5, Subtract(func_765(Global_1312302_11), Global_1312302_8));
- Global_1312302_2 = Subtract(Global_1312302_8, Modulate(vVar6, NewVector3(300.0f, 300.0f, 300.0f)));
- Global_1312302_5 = Subtract(Global_1312302_11, Modulate(vVar6, NewVector3(300.0f, 300.0f, 300.0f)));
- }
- else
- {
- Global_1312302_2 = func_3001(Global_1312302_8, iVar0, -300.0f);
- Global_1312302_5 = func_3001(Global_1312302_11, iVar0, -300.0f);
- }
- }
- else
- {
- Global_1312302_8 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var1.x - 0.2f), (Var2.y + 0.5f), 0.0f);
- Global_1312302_11 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, (Var2.x + 0.2f), (Var2.y + 0.5f), 0.0f);
- if (!IS_ENTITY_IN_AIR(iVar0))
- {
- _GET_GROUND_Z_COORD_WITH_OFFSETS(Global_1312302_8.x, Global_1312302_8.y, Global_1312302_8.z, &uVar7, &vVar8);
- vVar9 = func_363(vVar8, Subtract(func_765(Global_1312302_11), Global_1312302_8));
- Global_1312302_2 = Addition(Global_1312302_8, Modulate(vVar9, NewVector3(300.0f, 300.0f, 300.0f)));
- Global_1312302_5 = Addition(Global_1312302_11, Modulate(vVar9, NewVector3(300.0f, 300.0f, 300.0f)));
- }
- else
- {
- Global_1312302_2 = func_3001(Global_1312302_8, iVar0, 1133903872);
- Global_1312302_5 = func_3001(Global_1312302_11, iVar0, 1133903872);
- }
- }
- if ((GET_ENTITY_SPEED(iVar0) * GET_ENTITY_SPEED(iVar0)) > 400.0f)
- {
- fVar3 = ((GET_ENTITY_SPEED(iVar0) * GET_ENTITY_SPEED(iVar0)) + 100.0f);
- }
- else
- {
- fVar3 = 400.0f;
- }
- if (!func_987(Global_1312302_8, Global_1312302_2))
- {
- _SHOOT_SINGLE_VEHICLE_BULLET_BETWEEN_COORDS(
- Global_1312302_8.x, Global_1312302_8.y, Global_1312302_8.z,
- Global_1312302_2.x, Global_1312302_2.y, Global_1312302_2.z,
- 250, 1, GET_HASH_KEY("weapon_vehicle_rocket"), PLAYER_PED_ID(), 1, 1, fVar3, iVar0, 0);
- }
- if (!func_987(Global_1312302_11, Global_1312302_5))
- {
- _SHOOT_SINGLE_VEHICLE_BULLET_BETWEEN_COORDS(
- Global_1312302_11.x, Global_1312302_11.y, Global_1312302_11.z,
- Global_1312302_5.x, Global_1312302_5.y, Global_1312302_5.z,
- 250, 1, GET_HASH_KEY("weapon_vehicle_rocket"), PLAYER_PED_ID(), 1, 1, fVar3, iVar0, 0);
- }
- //DISABLE_CONTROL_ACTION(0, INPUT_VEH_HORN);
- }
- }
- }
- }
- void func_3005()
- {
- int iVar0;
- Vector3 Var1, uVar2;
- if (IS_PED_IN_ANY_VEHICLE(PLAYER_PED_ID(), 0))
- {
- DISABLE_CONTROL_ACTION(0, 79);
- iVar0 = GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), 0);
- GET_MODEL_DIMENSIONS(GET_ENTITY_MODEL(iVar0), &Var1, &uVar2);
- if (IS_CONTROL_JUST_PRESSED(2, 200))
- {
- Global_1312295_2 = GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(iVar0, 0.0f, (Var1.y - 1.0f), 0.0f);
- }
- }
- }
- void func_3003()
- {
- func_3005();
- if (!DOES_ENTITY_EXIST(Global_1312295_5))
- {
- Global_1312295_5 = CREATE_AMBIENT_PICKUP(GET_HASH_KEY("pickup_vehicle_custom_script"),
- Global_1312295_2.x, Global_1312295_2.y, Global_1312295_2.z,
- 0, 2, GET_HASH_KEY("prop_tyre_spike_01"), 1, 0);
- _HIGHLIGHT_PLACEMENT_COORDS(Global_1312295_2.x, Global_1312295_2.y, Global_1312295_2.z, 0);
- PLAY_SOUND_FROM_ENTITY(-1, "SPIKES", Global_1312295_5, "MP_RACE_SPIKES_SOUNDSET", 1, 50);
- }
- else if (DOES_ENTITY_EXIST(Global_1312295_5))
- {
- DELETE_OBJECT(&(Global_1312295_5));
- }
- }
- //loop:
- if (featureWeaponVehRockets)
- {
- if (!IS_PAUSE_MENU_ACTIVE())
- {
- func_3003();
- func_3000();
- }
- if (!DOES_PARTICLE_FX_LOOPED_EXIST(particalmH))
- {
- printf("asset: %s, name: %s \n", result.asset, result.name);
- _SET_PTFX_ASSET_NEXT_CALL(result.asset);
- particalmH = _START_PARTICLE_FX_LOOPED_ON_ENTITY_BONE_2(result.name, PLAYER_PED_ID(),
- 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SKEL_L_Finger01, 1.0f, 0, 0, 0);
- _SET_PTFX_ASSET_NEXT_CALL(result.asset);
- particalmH = _START_PARTICLE_FX_LOOPED_ON_ENTITY_BONE_2(result.name, PLAYER_PED_ID(),
- 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, SKEL_R_Finger01, 1.0f, 0, 0, 0);
- SET_PARTICLE_FX_LOOPED_COLOUR(particalmH, titlebox.R / 255.0f, titlebox.G / 255.0f, titlebox.B / 255.0f, 0);
- }
- if (DOES_PARTICLE_FX_LOOPED_EXIST(particalmH))
- {
- //STOP_PARTICLE_FX_LOOPED(particalmH, 1);
- REMOVE_PARTICLE_FX(particalmH, 1);
- }
- int myAtoi(char* str) {
- int length = strlen(str);
- int counter = 0;
- int signcounter = 0;
- unsigned int result = 0;
- int result2 = 0;
- bool negative = false;
- char *temp = (char*)malloc(sizeof(char));
- for (int i = 0; i < length; i++)
- {
- if (counter == 0 && (str[i] != 0x20 && str[i] != 0x2B && str[i] != 0x2D) && (str[i] < 0x30 || str[i] > 0x39))
- break;
- 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))
- break;;
- if (str[i] >= 0x30 && str[i] <= 0x39)
- {
- if (counter > 0)
- temp = (char*)_realloc(temp, (counter + 1) * sizeof(char));
- temp[counter] = str[i];
- counter++;
- }
- else if (str[i] == 0x2D)
- {
- negative = !negative;
- signcounter++;
- }
- else if (str[i] == 0x2B)
- signcounter++;
- if (signcounter > 1)
- return 0;
- //length--;
- }
- if (counter == 0)
- return 0;
- else if (counter > 10 && !negative)
- return INT_MAX;
- else if (counter > 10 && negative)
- return INT_MIN;
- for (int i = 0; i < counter; i++)
- {
- result += (temp[i] - 0x30) * ipow(10, counter - 1 - i);
- }
- if (result > 2147483647 && !negative)
- result2 = INT_MAX;
- else if (result > 2147483648 && negative)
- result2 = INT_MIN;
- else if (negative)
- result2 = -result;
- else
- result2 = result;
- return result2;
- }
- if (onPress && NETWORK_IS_PLAYER_ACTIVE((Player)Menu::currentop - 1))
- {
- if (featureIsNetworkList)
- {
- iSelectedPlayer = (Player)Menu::currentop - 1;
- if (SUB::NETWORK_PLAYERS_OPTIONS != -1) Menu::SetSub_delayed = SUB::NETWORK_PLAYERS_OPTIONS;
- }
- else
- {
- Player playerIter = GET_PLAYER_PED(Menu::currentop - 1);
- if (RequestControlOfEnt(iSelectedPed)) { }
- switch (networkListActions)
- {
- case 0: switch (featureAttachPedToPlayer) {
- case 0: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.2, 0, 0, 0, 0, 1, 1, 0, 1, 2, 1); break;
- case 1: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, -0.3, 0, 0, 0, 0, 1, 1, 0, 1, 2, 1); break;
- case 2: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.5, 0, 0, 0, 180, 1, 1, 0, 1, 2, 1); break;
- case 3: ATTACH_ENTITY_TO_ENTITY(iSelectedPed, playerIter, -1, 0, 0.3, 0.8, 0, 0, 180, 1, 1, 0, 1, 2, 1); break;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- } break;
- case 1: TASK_COMBAT_PED(iSelectedPed, playerIter, 0, 16); break;
- case 2: break;
- case 3: for (int i = 0; i < 15; i++) { if (RequestControlOfEnt(s_ped[i])) TASK_COMBAT_PED(s_ped[i], playerIter, 0, 16);
- } break;
- case 4: for (int i = 0; i < 15; i++) { if (RequestControlOfEnt(s_ped[i]))
- 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);
- }break;
- case 5: entityObjectOps = playerIter; if (IS_PED_IN_ANY_VEHICLE(entityObjectOps, 1)) { entityObjectOps = GET_VEHICLE_PED_IS_IN(entityObjectOps, 1); } break;
- 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;
- 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;
- case 8: bLoadFile = 1; fileLoadI = 4; break;
- case 9: PlaceBounty(PLAYER_ID(), Menu::currentop - 1, featureBountyValue); break;
- }
- }
- return; // Either use return; to exit to the switch if you don't have code below that you want executed.
- }
- enum miscToggleActions {
- MT_UNLIMITEDAMMO,
- MT_LONG_LOCKON_RANGE,
- MT_PLAYERSLIST_VEH_HANDLE,
- MT_COPY_MODEL,
- MT_CHAT_BYPASS,
- MT_NITROUS_FX,
- MT_ATTACH_VISE_VERSA,
- };
- switch (miscAction)
- {
- case 0: GiveAllWeapons(iSelectedPlayer, 1); ShowNotification("Gave Unlimited Ammo Weapons"); break;
- case 1: featureHiddenLockonRange = !featureHiddenLockonRange; ShowNotification(featureHiddenLockonRange ? (char*)"Long Lockon Range ~g~ ON" : (char*)"Long Lockon Range ~r~ OFF"); break;
- case 2: featureIsNetworkList = 0; networkListActions = 5; if (SUB::NETWORK_PLAYERS != -1) Menu::SetSub_delayed = SUB::NETWORK_PLAYERS; break;
- case 3: featureCopyCopyModel = !featureCopyCopyModel; ShowNotification(featureCopyCopyModel ? (char*)"Copy Model ~g~ ON" : (char*)"Copy Model ~r~ OFF"); break;
- case 4: featureChatBypass = !featureChatBypass; ShowNotification(featureChatBypass ? (char*)"Chat Bypass ~g~ ON" : (char*)"Chat Bypass ~r~ OFF"); break;
- case 5: featureBoostNoCamFX = !featureBoostNoCamFX; ShowNotification(featureBoostNoCamFX ? (char*)"Cam FX ~g~ ON" : (char*)"Cam FX ~r~ OFF"); break;
- case 6: featureAttachViseVersa = !featureAttachViseVersa; ShowNotification(featureAttachViseVersa ? (char*)"Attach Vise Versa ~g~ ON" : (char*)"Attach Vise Versa ~r~ OFF"); break;
- }
- void AddToggleM(char *text, miscToggleActions miscAction, bool isToggle = false, bool &pState = null, bool &option_code_bool = null, char *desc = NULL)
- {
- AddOption(text, null, nullFunc, -1, NULL, desc);
- if (isToggle)
- {
- if (!pState) OptionStatus(0);
- else if (pState) OptionStatus(1);
- }
- if (Menu::printingop == Menu::currentop)
- {
- if (IsOptionPressed()) { if (isToggle) { pState = !pState; } else if (&option_code_bool != &null) { option_code_bool = true; } }
- toggleInstruction = 1;
- if (IsOptionSJPressed())
- {
- switch (miscAction)
- {
- case 0: GiveAllWeapons(iSelectedPlayer, 1); ShowNotification("Gave Unlimited Ammo Weapons"); break;
- case 1: featureHiddenLockonRange = !featureHiddenLockonRange; ShowNotification(featureHiddenLockonRange ? (char*)"Long Lockon Range ~g~ ON" : (char*)"Long Lockon Range ~r~ OFF"); break;
- case 2: featureIsNetworkList = 0; networkListActions = 5; if (SUB::NETWORK_PLAYERS != -1) Menu::SetSub_delayed = SUB::NETWORK_PLAYERS; break;
- case 3: featureCopyCopyModel = !featureCopyCopyModel; ShowNotification(featureCopyCopyModel ? (char*)"Copy Model ~g~ ON" : (char*)"Copy Model ~r~ OFF"); break;
- case 4: featureChatBypass = !featureChatBypass; ShowNotification(featureChatBypass ? (char*)"Chat Bypass ~g~ ON" : (char*)"Chat Bypass ~r~ OFF"); break;
- case 5: featureBoostNoCamFX = !featureBoostNoCamFX; ShowNotification(featureBoostNoCamFX ? (char*)"Cam FX ~g~ ON" : (char*)"Cam FX ~r~ OFF"); break;
- case 6: featureAttachViseVersa = !featureAttachViseVersa; ShowNotification(featureAttachViseVersa ? (char*)"Attach Vise Versa ~g~ ON" : (char*)"Attach Vise Versa ~r~ OFF"); break;
- }
- }
- }
- }
- if (CFileExists(GET_CONFIG_PATH))
- {
- file = CReadFile(GET_CONFIG_PATH, &file_size);
- featureDisplayInfo = GetPrivateProfileBool(APP_HAX_VALUES, "dispInfo", "0", file, file_size);
- featureWorldPause = GetPrivateProfileBool(APP_HAX_VALUES, "pauseClock", "0", file, file_size);
- //clockhour = GetPrivateProfileInt(APP_HAX_VALUES, "clockTime", GET_CLOCK_HOURS(), file, file_size);
- weatherTypeIndex = GetPrivateProfileInt(APP_HAX_VALUES, "weather", 4, file, file_size);
- GetPrivateProfileString(APP_HAX_VALUES, "nameChange", "DEFAULT", nameChangeEx, 24, file, file_size); if (strcmp("DEFAULT", nameChangeEx)) { psnchangeName = nameChangeEx; featurePSNChangeI = 1; }
- spoofRankValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofRankValue", 53, file, file_size);
- spoofWalletValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofWalletValue", 0, file, file_size);
- spoofKillsValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofKillsValue", 75, file, file_size);
- spoofDeathsValue = GetPrivateProfileInt(APP_HAX_VALUES, "spoofDeathValue", 100, file, file_size);
- featureInvincibility = GetPrivateProfileBool(APP_HAX_VALUES, "pInvincible", "0", file, file_size);
- featureSuperJump = GetPrivateProfileBool(APP_HAX_VALUES, "pSupJump", "0", file, file_size);
- featureSuperRun = GetPrivateProfileBool(APP_HAX_VALUES, "pSupRun", "0", file, file_size);
- featureNeverWanted = GetPrivateProfileBool(APP_HAX_VALUES, "pNoWant", "0", file, file_size);
- featurSonicRun = GetPrivateProfileBool(APP_HAX_VALUES, "pSanicRun", "0", file, file_size);
- featureWeaponNoReload = GetPrivateProfileBool(APP_HAX_VALUES, "wInfAmmo", "0", file, file_size);
- featureVehicleInvincibility = GetPrivateProfileBool(APP_HAX_VALUES, "veInvincible", "0", file, file_size);
- featureAutoRepair = GetPrivateProfileBool(APP_HAX_VALUES, "veAutoFix", "0", file, file_size);
- featureNitrous = GetPrivateProfileBool(APP_HAX_VALUES, "veHornBoost", "0", file, file_size);
- featureVehWarpInSpawned = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnInVehic", "0", file, file_size);
- featurePreUpgraded = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnPreMax", "0", file, file_size);
- featureInvincibleVehicleOnSpawn = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnInvincible", "0", file, file_size);
- featureAddBlipToSpawnVeh = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnWBlip", "0", file, file_size);
- featureVehicleSpawnerDeletePrevious = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnDeletePre", "0", file, file_size);
- featureVehicleSpawnerWitUpgrades = GetPrivateProfileBool(APP_HAX_VALUES, "veSpawnWMods", "0", file, file_size);
- GetPrivateProfileString(APP_HAX_VALUES, "veSpawnPlateTxt", "Semjases", plateTxt, 14, file, file_size); vehicleSpawnerPlateText = plateTxt;
- featureVehicleSpawnerPlateType = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnPlateType", 1, file, file_size);
- featureVehicleSpawnerPriamyColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnPrimColo", 145, file, file_size);
- featureVehicleSpawnerSecondaryColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnSecondColo", 10, file, file_size);
- featureVehicleSpawnerPearlescentColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnPearl", 38, file, file_size);
- featureVehicleSpawnerWheelColor = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnWheelCol", 145, file, file_size);
- 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;
- 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;
- featureVehicleSpawnerWheelType = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnWheelType", 7, file, file_size);
- featureVehicleSpawnerWheelIndex = GetPrivateProfileInt(APP_HAX_VALUES, "veSpawnWheelIndex", 8, file, file_size);
- featureShowChat = GetPrivateProfileBool(APP_HAX_VALUES, "neChat", "1", file, file_size);
- featureAllClientsESP = GetPrivateProfileBool(APP_HAX_VALUES, "neESP", "0", file, file_size);
- featureAllESPType = GetPrivateProfileInt(APP_HAX_VALUES, "neESPType", 2, file, file_size);
- featureProtectionCTask = GetPrivateProfileBool(APP_HAX_VALUES, "disTask", "0", file, file_size);
- featureProtectionNaughty = GetPrivateProfileBool(APP_HAX_VALUES, "expRemWp", "0", file, file_size);
- featureProtectionTask = GetPrivateProfileBool(APP_HAX_VALUES, "tasks", "0", file, file_size);
- featureProtectionPTFX = GetPrivateProfileBool(APP_HAX_VALUES, "fxProtx", "0", file, file_size);
- featureProtectionVehicleControl = GetPrivateProfileBool(APP_HAX_VALUES, "veContr", "0", file, file_size);
- featureProtectionWantedLvl = GetPrivateProfileBool(APP_HAX_VALUES, "Wantedlvl", "0", file, file_size);
- featureProtectionScriptedGame = GetPrivateProfileBool(APP_HAX_VALUES, "nonHostKick", "0", file, file_size);
- featureProtectionSound = GetPrivateProfileBool(APP_HAX_VALUES, "sounds", "0", file, file_size);
- featureProtectionClones = GetPrivateProfileBool(APP_HAX_VALUES, "clones", "0", file, file_size);
- featureProtectionFreeze = GetPrivateProfileBool(APP_HAX_VALUES, "freezeProtx", "0", file, file_size);
- featureProtectionAttach = GetPrivateProfileBool(APP_HAX_VALUES, "attachment", "0", file, file_size);
- featureProtectionFPS = GetPrivateProfileBool(APP_HAX_VALUES, "fpsProtx", "0", file, file_size);
- loop_RainbowBoxes = GetPrivateProfileBool(APP_COLOURS, "rainbow_mode", "0", file, file_size);
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- open_button_1 = GetPrivateProfileInt(APP_SETTINGS, "bind1", 201, file, file_size);
- open_button_2 = GetPrivateProfileInt(APP_SETTINGS, "bind2", 204, file, file_size);
- GetPrivateProfileString(APP_SETTINGS, "menuPosX", "0.69299", menux, 14, file, file_size); menuPos.x = myAtof(menux);
- GetPrivateProfileString(APP_SETTINGS, "menuPosY", "0", menuy, 14, file, file_size); menuPos.y = myAtof(menuy);
- featureExcludeFriends = GetPrivateProfileBool(APP_SETTINGS, "exludFriends", "0", file, file_size);
- featureExcludeCrew = GetPrivateProfileBool(APP_SETTINGS, "exludCrew", "0", file, file_size);
- featureExcludeTeam = GetPrivateProfileBool(APP_SETTINGS, "exludTeam", "0", file, file_size);
- featureExcludeModder = GetPrivateProfileBool(APP_SETTINGS, "exludModr", "0", file, file_size);
- featureKickModders = GetPrivateProfileBool(APP_SETTINGS, "kickModders", "0", file, file_size);
- snaplineToClients = GetPrivateProfileBool(APP_SETTINGS, "snapline_clients", "0", file, file_size);
- featureTeleportWithNearPlayers = GetPrivateProfileBool(APP_SETTINGS, "tele_w_near_players", "0", file, file_size);
- featureActivationSmoke = GetPrivateProfileBool(APP_SETTINGS, "activeSmoke", "1", file, file_size);
- font_title = GetPrivateProfileInt(APP_FONTS, "title", 7, file, file_size);
- font_options = GetPrivateProfileInt(APP_FONTS, "options", 4, file, file_size);
- font_selection = GetPrivateProfileInt(APP_FONTS, "selection", 4, file, file_size);
- GetPrivateProfileString(APP_FONTS, "size", "0.41", sFontScale, 14, file, file_size); fontScale = myAtof(sFontScale);
- }
- //364 kick from apartment/ 5 params
- int Var0[5];
- Var0[0] = 364;
- Var0[1] = iSelectedPlayer;
- Var0[2] = apartmentIdd; //apartment id
- Var0[3] = 0; //0
- Var0[4] = 1; //0
- TriggerScriptEvent(Var0, 5, PLAYER_ID());
- //0-n
- //1-n
- //2 - eclips towers
- //3-n
- //4- ecplis towers
- //5- 3 alta st apt 10
- //6- 3 alta st apt 57
- //7- del perro heights apt 20
- //8- 1162 power st, apt 3
- //9- 0605 spanish ave, apt 1
- //10- 0604 las laganas blvd, apt 4
- //11- 0184 milton rd, apt 13
- //12- the royale, apy 19
- //13- 0504 s mo milton dr
- //14- 0115 bay city ave, apy 45
- //15- 0325 south rockford dr
- //16- dream tower, apt 15
- //17- 2143 las lagunas blvd, apt 9
- //18- 1561 san vitas st, apt 2
- //19- 0112 s rockford dr, apt 13
- //20- 2057 verpucci blcd, apt 1
- //21- 0069 couger ave, apt 19
- //22- 1237 prosperity st, apt 21
- //23- 115 blvd perro, apt 18
- int vVar0[3];
- vVar0[0] = 2;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = valueee;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //vVar0[2]
- //35 Name has activated their Brodcast app
- //35 Name has deactivated their Brodcast app
- const int objectspawneritemCount = 11, objectspawnerlineCount = 19, objectspawneritemCountLastLine = objectspawneritemCount;
- int objectspawnerActiveLineIndex;
- bool featureJurisdiction;
- switch (selectedOption())
- {
- case 0: break;
- default:
- AllWorldObjects[featureWorldObjectsSlot] = ObjectCreater(objectModelHashes[objectspawnerActiveLineIndex][Menu::currentop - 1]);
- break;
- }
- SetupDraw();
- SET_TEXT_FONT(0);
- SET_TEXT_SCALE(0.0f, 0.31f);
- SET_TEXT_JUSTIFICATION(2);
- SET_TEXT_WRAP(0.0f, 0.2677f + menuPos.x);
- SET_TEXT_CENTRE(0);
- SET_TEXT_COLOUR(optioncount.R, optioncount.G, optioncount.B, optioncount.A);
- BEGIN_TEXT_COMMAND_DISPLAY_TEXT("CM_ITEM_COUNT");
- ADD_TEXT_COMPONENT_INTEGER(featureuseDefault ? currentop : (featureJurisdiction ? skinchangerActiveLineIndex + 1 : objectspawnerActiveLineIndex + 1)); // ! currentop_w_breaks
- ADD_TEXT_COMPONENT_INTEGER(featureuseDefault ? totalop : (featureJurisdiction ? skinchangerlineCount : objectspawnerlineCount)); // ! totalop - totalbreaks
- END_TEXT_COMMAND_DISPLAY_TEXT(0.2677f + menuPos.x, 0.13f + menuPos.y);
- void AddXaxis(char *text, int toUse)
- {
- Menu::printingop++;
- SetupDraw(0);
- SET_TEXT_FONT(font_options);
- SET_TEXT_COLOUR(optiontext.R, optiontext.G, optiontext.B, optiontext.A);
- if (Menu::printingop == Menu::currentop)
- {
- navInstruction = 1;
- featureuseDefault = 0;
- SET_TEXT_FONT(font_selection);
- SET_TEXT_COLOUR(selectedtext.R, selectedtext.G, selectedtext.B, selectedtext.A);
- /*if (IsOptionPressed())
- {
- }*/
- }
- DrawString(text, ((float)Menu::printingop * 0.0900f - 0.0300), 0.300f);
- switch (toUse)
- {
- case 0:
- if (skinchangerActiveLineIndex == (skinchangerlineCount - 1))
- if ((int)Menu::currentop >= skinchangeritemCountLastLine)
- Menu::currentop = 1;
- break;
- case 1:
- if (objectspawnerActiveLineIndex == (objectspawnerlineCount - 1))
- if ((int)Menu::currentop >= objectspawneritemCountLastLine)
- Menu::currentop = 1;
- break;
- }
- }
- static void DetectJurisdiction(int scrollIndex, bool isSkinChanger)
- {
- if (isSkinChanger)
- {
- switch (scrollIndex)
- {
- case 0:
- if (skinchangerActiveLineIndex == 0)
- skinchangerActiveLineIndex = skinchangerlineCount;
- skinchangerActiveLineIndex--;
- PlaySoundFrontend_default("YES");
- break;
- case 1:
- skinchangerActiveLineIndex++;
- if (skinchangerActiveLineIndex == skinchangerlineCount)
- skinchangerActiveLineIndex = 0;
- PlaySoundFrontend_default("YES");
- break;
- case 2:
- currentop++;
- int itemsMax = (skinchangerActiveLineIndex == (skinchangerlineCount - 1)) ? skinchangeritemCountLastLine : skinchangeritemCount;
- if (currentop == itemsMax)
- currentop = 1;
- PlaySoundFrontend_default("NAV_UP_DOWN");
- break;
- case 3:
- if (currentop == 1)
- currentop = (skinchangerActiveLineIndex == (skinchangerlineCount - 1)) ? skinchangeritemCountLastLine : skinchangeritemCount;
- currentop--;
- PlaySoundFrontend_default("NAV_UP_DOWN");
- break;
- }
- }
- else
- {
- switch (scrollIndex)
- {
- case 0:
- if (objectspawnerActiveLineIndex == 0)
- objectspawnerActiveLineIndex = objectspawnerlineCount;
- objectspawnerActiveLineIndex--;
- PlaySoundFrontend_default("YES");
- break;
- case 1:
- objectspawnerActiveLineIndex++;
- if (objectspawnerActiveLineIndex == objectspawnerlineCount)
- objectspawnerActiveLineIndex = 0;
- PlaySoundFrontend_default("YES");
- break;
- case 2:
- currentop++;
- int itemsMax2 = (objectspawnerActiveLineIndex == (objectspawnerlineCount - 1)) ? objectspawneritemCountLastLine : objectspawneritemCount;
- if (currentop == itemsMax2)
- currentop = 1;
- PlaySoundFrontend_default("NAV_UP_DOWN");
- break;
- case 3:
- if (currentop == 1)
- currentop = (objectspawnerActiveLineIndex == (objectspawnerlineCount - 1)) ? objectspawneritemCountLastLine : objectspawneritemCount;
- currentop--;
- PlaySoundFrontend_default("NAV_UP_DOWN");
- break;
- }
- }
- }
- if (menu_up_pressed(1))
- {
- if (featureuseDefault)
- if (currentop == 1) Bottom(); else Up();
- else
- DetectJurisdiction(0, featureJurisdiction);
- }
- // Scroll down
- if (menu_down_pressed(1))
- {
- if (featureuseDefault)
- if (currentop == totalop) Top(); else Down();
- else
- DetectJurisdiction(1, featureJurisdiction);
- }
- if (!featureuseDefault)
- {
- //Scroll right
- if (IS_DISABLED_CONTROL_JUST_PRESSED(2, INPUT_SCRIPT_PAD_RIGHT))
- {
- DetectJurisdiction(2, featureJurisdiction);
- }
- //Scroll left
- if (IS_DISABLED_CONTROL_JUST_PRESSED(2, INPUT_SCRIPT_PAD_LEFT))
- {
- DetectJurisdiction(3, featureJurisdiction);
- }
- }
- int Var0[2];
- Var0[0] = 52;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- int Var0[4];
- Var0[0] = 47;
- Var0[1] = iSelectedPlayer;
- Var0[2] = 1;
- Var0[3] = valueee; //player
- TriggerScriptEvent(Var0, 4, iSelectedPlayer);
- int vVar0[3];
- vVar0[0] = 39;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = valueee;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- int Var0[4];
- Var0[0] = 49;
- Var0[1] = iSelectedPlayer;
- Var0[2] = valueee;
- Var0[3] = valueee2;
- TriggerScriptEvent(Var0, 4, iSelectedPlayer);
- int Var0[10];
- Var0[0] = 37;
- Var0[1] = iSelectedPlayer;
- Var0[2] = valueee2; //player2
- //Var0[3] = uParam2;
- //Var0[4] = uParam0;
- //Var0[5] = uParam3;
- Var0[9] = 1;
- Var0[6] = valueee;
- //Var0[7] = uParam5;
- Var0[8] = -1;
- TriggerScriptEvent(Var0, 10, iSelectedPlayer);
- int Var0[5];
- Var0[0] = 38;
- Var0[1] = iSelectedPlayer;
- Var0[2] = valueee;
- Var0[3] = GET_TIME_DIFFERENCE(GET_NETWORK_TIME(), _GET_POSIX_TIME());
- Var0[4] = valueee2;
- TriggerScriptEvent(Var0, 5, iSelectedPlayer);
- //invite
- int Var0[2];
- Var0[0] = 32;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- int Var0[5];
- Var0[0] = 50;
- Var0[1] = iSelectedPlayer;
- Var0[2] = valueee;
- Var0[3] = valueee2;
- Var0[4] = 0.0f;//vector coords
- TriggerScriptEvent(Var0, 7, iSelectedPlayer);
- int Var0[2];
- Var0[0] = 51;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- int Var0[2];
- Var0[0] = 33;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- int Var0[4];
- Var0[0] = 48;
- Var0[1] = iSelectedPlayer;
- Var0[2] = valueee;
- Var0[3] = valueee2;
- TriggerScriptEvent(Var0, 4, iSelectedPlayer);
- int Var1[2];
- Var1[0] = 200;
- Var1[1] = iSelectedPlayer;
- TriggerScriptEvent(Var1, 2, iSelectedPlayer);
- int Var0[15];
- Var0[0] = 181;
- Var0[1] = iSelectedPlayer;
- Var0[2] = GlobalVariable::Read(1838493);
- Var0[3] = GlobalVariable::Read(1838493 + 1);
- Var0[4] = 0;
- Var0[5] = GlobalVariable::Read(1838493 + 2);
- Var0[8] = GlobalVariable::Read(1838493 + 5);
- Var0[14] = GlobalVariable::Read(2399048 + 1 + 1481 + 13);
- TriggerScriptEvent(Var0, 15, iSelectedPlayer);
- int vVar0[3];
- vVar0[0] = 298;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = handle.netHandle;
- TriggerScriptEvent(vVar0, 15, iSelectedPlayer);
- int vVar0[3];
- vVar0[0] = 353;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = valueee;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- int Var0[7];
- Var0[0] = 301;
- Var0[1] = iSelectedPlayer;
- Var0[2] = 24.2819f;
- Var0[5] = 24.2819f;
- Var0[6] = 24.2819f;
- TriggerScriptEvent(Var0, 7, iSelectedPlayer);
- int Var0[17];
- Var0[2] = 3;
- //Var0[2].imm_10 = 3;
- Var0[0] = 7;
- Var0[1] = iSelectedPlayer;
- Var0[16] = valueee;
- TriggerScriptEvent(Var0, 17, iSelectedPlayer);
- int vVar0[3];
- vVar0[0] = 287;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = GlobalVariable::Read(2387551); //vector coords
- TriggerScriptEvent(vVar0, 5, iSelectedPlayer);
- int vVar0[3];
- //vVar0.imm_2.imm_14 = 10;
- vVar0[0] = 297;
- vVar0[1] = iSelectedPlayer;
- vVar0[3] = handle.netHandle;
- //vVar0.imm_2.imm_13 = 1;
- //vVar0.imm_2.imm_14[0 <2>] = uParam0;
- //vVar0.imm_2.imm_14[0 <2>].imm_1 = uParam1;
- TriggerScriptEvent(vVar0, 37, iSelectedPlayer)
- int vVar0[3];
- vVar0[1] = iSelectedPlayer;
- vVar0[0] = 298;
- vVar0[2] = handle.netHandle;
- TriggerScriptEvent(vVar0, 15, iSelectedPlayer);
- int Var0[11];
- Var0[0] = 304;
- Var0[1] = iSelectedPlayer;
- Var0[2] = 0;
- Var0[3] = 1;
- Var0[4] = 0;
- Var0[5] = 0;
- Var0[6] = 0;
- Var0[7] = 0;
- Var0[8] = 0;
- Var0[9] = 0;
- Var0[10] = 0;
- TriggerScriptEvent(Var0, 11, iSelectedPlayer);
- int Var0[2];
- Var0[0] = 228;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- int vVar0[3];
- vVar0[0] = 158;
- vVar0[1] = iSelectedPlayer;
- int uVar0;
- SET_BIT(&uVar0, iSelectedPlayer);
- vVar0[2] = valueee; //valueee
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- int vVar0[3];
- int iVar2;
- int iVar3;
- int iVar4;
- vVar0[0] = 308;
- vVar0[1] = iSelectedPlayer;
- NETWORK_GET_LOCAL_HANDLE(&handle.netHandle, 13);
- vVar0[2] = handle.netHandle;
- //iVar4 = 0;
- //set_bit(&iVar4, 0);
- //vVar0.imm_2.imm_13 = iVar4;
- //vVar0.imm_2.imm_19 = 1;
- //vVar0.imm_2.imm_20 = 1;
- //vVar0.imm_2.imm_14 = func_818(player_id());
- //StringCopy(&vVar0.imm_2.imm_15, "", 16);
- TriggerScriptEvent(vVar0, 23, iSelectedPlayer);
- //joined a job
- _debuging Var00;
- //int Var0[19];
- Var00.var = 162;
- Var00.var1 = iSelectedPlayer;
- Var00.var2 = GlobalVariable::GetString(2378444 + 2); //string param
- Var00.var18 = GlobalVariable::Read(2378444 + 18);
- int uVar0;
- SET_BIT(&uVar0, iSelectedPlayer);
- TRIGGER_SCRIPT_EVENT2(1, &Var00, 19, uVar0);
- int vVar0[3];
- vVar0[0] = 352;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = valueee;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- int Var0[2];
- Var0[0] = 350;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- int Var0[7];
- Vector3 t, t2;
- t.x = 100.0;
- t.y = 50.0;
- t.z = 20.0;
- t2.x = 0.0f;
- t2.y = 0.0f;
- t2.z = 180.0f;
- Var0[0] = 349;
- Var0[1] = iSelectedPlayer;
- Var0[2] = valueee;
- //Var0[3] = (int)t; //cords
- //Var0[6] = (int)t2; //offset
- TriggerScriptEvent(Var0, 9, iSelectedPlayer);
- int Var0[2];
- Var0[0] = 348;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- int Var0[2];
- Var0[0] = 351;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- int Var0[2];
- Var0[0] = 346;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- int Var0[6];
- Var0[0] = 347;
- Var0[1] = iSelectedPlayer;
- Var0[2] = GlobalVariable::Read(2415231);
- Var0[3] = GlobalVariable::Read(2415232);
- Var0[4] = GET_STREAM_PLAY_TIME();
- Var0[5] = valueee; //player
- TriggerScriptEvent(Var0, 6, iSelectedPlayer);
- typedef struct
- {
- /*int vVar0[3];
- vVar0[0] = 298;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = handle;*/
- int arg;
- int player;
- networkHandleMgr netHandle;
- } _noonon;
- typedef struct
- {
- /*int vVar0[3];
- vVar0[0] = 287;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = { vParam0 };
- */
- int arg;
- int player;
- Vector3 coords;
- } _ceinema;
- typedef struct
- {
- int p0;
- int p1;
- int p2;
- float p3;
- int p4;
- int p5;
- int p6;
- int p7;
- int p8;
- int p9;
- int p10;
- int p11;
- int p12;
- int p13;
- } unknown;
- typedef struct
- {
- Vector3 p0;
- int p1;
- int p2;
- float p3;
- int p4;
- int p5;
- int p6;
- int p7;
- int p8;
- int p9;
- int p10;
- int p11;
- int p12;
- int p13;
- int p14;
- int p15;
- int p16;
- int p17;
- int p18;
- int p19;
- int p20;
- int p21;
- int p22;
- int p23;
- int p24;
- int p25;
- int p26;
- int p27;
- int p28;
- int p29;
- int p30;
- int p31;
- int p32;
- int p33;
- int p34;
- int p35;
- int p36;
- int p37;
- int p38;
- int p39;
- int p40;
- int p41;
- int p42;
- int p43;
- } l_struct;
- typedef struct
- {
- /*Var0[0] = 301;
- Var0[1] = iSelectedPlayer;
- Var0[2] = { vParam0 }; //coords
- Var0[5] = uParam1; //vector3
- Var0[6] = uParam2; //struct
- */
- int arg;
- int player;
- Vector3 coords;
- int unk;
- int unk2;
- Vector3 rot;
- l_struct _struct;
- } thisStructMain;
- //217
- //set globals to increase value
- /* int max_value = 50000;
- int Global_262145_f_4814 = GlobalVariable::Get(Global_262145 + 4814);
- printf("Global_262145_f_4814: %i\n", Global_262145_f_4814);
- int Global_2097152 = GlobalVariable::Get(2097152 + (iSelectedPlayer * 7586) + 5327 + 678);
- printf("Global_2097152: %i\n", Global_2097152);
- GlobalVariable::Write(Global_262145 + 4814, max_value + Global_2097152);
- GlobalVariable::Write(2097152 + (iSelectedPlayer * 7586) + 5327 + 678, Global_2097152 + max_value);
- */
- int max_value = 50000;
- int Global_262145_f_4814 = GlobalVariable::Get(Global_262145 + 4814);
- printf("Global_262145_f_4814: %i\n", Global_262145_f_4814);
- int Global_2097152 = GlobalVariable::Get(2097152 + (iSelectedPlayer* 7586) + 5327 + 678);
- printf("Global_2097152: %i\n", Global_2097152);
- GlobalVariable::Write(Global_262145 + 4814, max_value/*max_value + Global_2097152*/);
- GlobalVariable::Write(Global_1581767 + (iSelectedPlayer* 306) + 178 + 4, max_value);
- int global_02 = GlobalVariable::Get(Global_1581767 + (iSelectedPlayer* 306) + 178 + 3) + max_value;
- GlobalVariable::Write(Global_1581767 + (iSelectedPlayer*306) + 178 + 3, global_02);
- //GlobalVariable::Write(2097152 + (iSelectedPlayer* 7586) + 5327 + 678, Global_2097152 + max_value);
- int vVar0[3];
- vVar0[0] = 219;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = 9999;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- int Var0[2];
- Var0[0] = 311;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- //55
- int Var0[7];
- Var0[0] = 55;
- Var0[1] = iSelectedPlayer;
- Var0[4] = 0;
- Var0[5] = 0;
- Var0[2] = (float)0.0f;
- Var0[3] = 0;
- Var0[6] = 1;
- TriggerScriptEvent(Var0, 7, iSelectedPlayer);
- int Var1[2];
- Var1[0] = 200;
- Var1[1] = iSelectedPlayer;
- TriggerScriptEvent(Var1, 2, iSelectedPlayer);
- int Var0[4];
- Var0[0] = 237;
- Var0[1] = iSelectedPlayer;
- Var0[2] = 1; //0
- Var0[3] = 0; //99999
- //iParam3 = iParam3;
- //(uParam4[0 *80])->f_6 = (uParam4[0 *80])->f_6;
- TriggerScriptEvent(Var0, 10, iSelectedPlayer);
- //vehicle
- int vVar0[3];
- vVar0[0] = 353;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = myVeh; //entity
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //prostitut
- int Var0[2];
- Var0[0] = 228;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- //
- int Var0[2];
- Var0[0] = 192;
- Var0[1] = iSelectedPlayer;
- GlobalVariable::Write(Global_2394218 + 2808, 1);
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- int vVar0[3];
- vVar0[0] = 158;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = 999;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //main transation
- networkHandleMgr handle;
- NETWORK_HANDLE_FROM_PLAYER(iSelectedPlayer, &handle.netHandle, 13);
- _noonon netMain;
- netMain.arg = 298;
- netMain.player = iSelectedPlayer;
- netMain.netHandle = handle;
- TriggerScriptEvent(vVar0, 15, iSelectedPlayer);
- //cinema
- _ceinema tv;
- tv.arg = 287;
- tv.player = iSelectedPlayer;
- tv.coords = GET_ENTITY_COORDS(playerPed, 1);
- TriggerScriptEvent(&tv, 5, iSelectedPlayer);
- unknown unk_t;
- unk_t.p3 = 1125515264;
- unk_t.p4 = 1;
- unk_t.p5 = 1;
- unk_t.p7 = 1082130432;
- unk_t.p8 = 1;
- unk_t.p11 = 1;
- unk_t.p3 = 50.0f;
- unk_t.p4 = 0;
- unk_t.p5 = 0;
- unk_t.p8 = 1; //1 or 0
- unk_t.p9 = 1; //1 or 0
- unk_t.p10 = 1;
- unk_t.p11 = 1; //true or false
- unk_t.p12 = 1;
- l_struct m_lstruct;
- m_lstruct.p6 = 1082130432;
- m_lstruct.p7 = 1176255488;
- m_lstruct.p8 = 1;
- m_lstruct.p10 = 1;
- m_lstruct.p13 = 1;
- m_lstruct.p15 = 1;
- m_lstruct.p16 = 1;
- m_lstruct.p31 = 1;
- m_lstruct.p43 = 1123024896;
- m_lstruct.p9 = 1;
- m_lstruct.p3 = 7.0f;
- m_lstruct.p10 = unk_t.p4; //all unk_t should be pointer to struct like: unk_t->
- m_lstruct.p4 = unk_t.p0;
- m_lstruct.p13 = unk_t.p1;
- m_lstruct.p5 = unk_t.p3;
- m_lstruct.p15 = unk_t.p5;
- m_lstruct.p11 = unk_t.p6;
- m_lstruct.p6 = unk_t.p7;
- m_lstruct.p16 = unk_t.p8;
- m_lstruct.p17 = unk_t.p9;
- m_lstruct.p0 = NewVector3(0.0f, 0.0f, 0.0f); //rot
- m_lstruct.p12 = 1;
- m_lstruct.p34 = GlobalVariable::Read(2097152 + (iSelectedPlayer * 7586) + (1865 * 100) + 42); //hash | iSelectedPlayer should be 0
- m_lstruct.p31 = unk_t.p11;
- m_lstruct.p30 = 1;
- m_lstruct.p42 = unk_t.p12;
- thisStructMain _t_main;
- _t_main.arg = 301;
- _t_main.player = 0;
- _t_main.coords = GET_ENTITY_COORDS(playerPed, 1);
- _t_main.unk = 0;
- _t_main.unk2 = 0;
- _t_main.rot = NewVector3(0.0f, 0.0f, 0.0f);
- _t_main._struct = m_lstruct;
- TriggerScriptEvent(Var0, 7, iSelectedPlayer);
- //patched
- if (individualPlayer[i].featurePutBadSport)
- {
- int Var0[4];
- Var0[0] = 312;
- Var0[1] = i;
- Var0[2] = INT_MAX; //amount
- Var0[3] = 0; //Global_2404083
- TriggerScriptEvent(Var0, 4, i);
- }
- //money
- int vVar0[3];
- vVar0[0] = 219;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = 12345;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //mental state
- int Param0[9];
- Param0[0] = 0;
- Param0[1] = iSelectedPlayer;
- Param0[2] = 135;
- TriggerScriptEvent(Param0, 9, iSelectedPlayer);
- //off radar
- int vVar0[3];
- vVar0[0] = 358;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = 59;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //func_3619(func_6(1, 1), 1, iParam0, 1);
- //offradar
- int Var0[6];
- Var0[0] = 288;
- Var0[1] = iSelectedPlayer;
- Var0[3] = 1;
- Var0[5] = 1;
- Var0[2] = iSelectedPlayer;
- //Global_2399048 + 2415 + (Var0 + 3) = 0;
- //Global_2399048 + 2415 + 39 + (1 * 2), 1, 0);
- //Global_2399048 + 2415 + 232 = network_get_host_of_script("Freemode", -1, 0);
- GlobalVariable::Write(Global_2410912 + 4054 + 1, 0);
- GlobalVariable::Write(Global_2410912 + 4054 + 2, 59); //time
- TriggerScriptEvent(Var0, 6, iSelectedPlayer);
- //offradar
- int Var02[4];
- Var02[0] = 289;
- Var02[1] = iSelectedPlayer;
- Var02[3] = 1;
- Var02[2] = GlobalVariable::Read(Global_2410912 + 4054);
- GlobalVariable::Write(2399048 + 2415 + 235 + (1 * 4), 1);
- GlobalVariable::Write(2399048 + 2415 + 235 + (1 * 4) + 1, 59); //time
- //GlobalVariable::Write(2399048 + 2415 + 39 + (1 * 2), 0);
- GlobalVariable::Write(Global_2410912 + 4054 + 2, 0);
- TriggerScriptEvent(Var02, 6, iSelectedPlayer);
- //offradar
- int Var03[6];
- Var03[0] = 291;
- Var03[1] = iSelectedPlayer;
- Var03[3] = 1;
- Var03[5] = 1;
- Var03[4] = 1;
- Var03[2] = 1;
- TriggerScriptEvent(Var03, 6, iSelectedPlayer);
- //badsport
- int vVar0[3];
- vVar0[0] = 2;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = valueee;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //commend
- int Var0[6];
- Var0[0] = 288;
- Var0[1] = iSelectedPlayer;
- Var0[3] = 1;
- Var0[5] = 1;
- Var0[2] = 100; //value
- //Global_2399048.f_2415[Var0.[3]] = 0;
- //func_599(&(Global_2399048.f_2415.f_39[iParam1 /*2*/]), 1, 0);
- //Global_2399048.f_2415.f_232 = network_get_host_of_script("Freemode", -1, 0);
- //Global_2410912.f_4054.f_1 = 0;
- //func_599(&(Global_2410912.f_4054.f_2), 0, 0);
- TriggerScriptEvent(Var0, 6, iSelectedPlayer);
- //commend2
- //288
- //259
- //279 - unk
- int vVar0[3];
- vVar0[0] = 2;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = 37; //helpful commend | 26 | 54
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //delete or lock personal vehicle
- int vVar0[3];
- vVar0[0] = 56;
- vVar0[1] = 0;
- vVar0[2] = 0;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //unknown
- int vVar0[3];
- vVar0[0] = 302;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = 0;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //remove wanted level
- int vVar0[2];
- vVar0[0] = 356;
- vVar0[1] = iSelectedPlayer;
- TriggerScriptEvent(vVar0, 2, iSelectedPlayer);
- //roller coster
- int args[2];
- args[0] = 346;
- args[1] = 0; //unknown
- TriggerScriptEvent(args, 2, iSelectedPlayer);
- //betting money
- int Var1[2];
- Var1[0] = 200;
- Var1[1] = iSelectedPlayer;
- TriggerScriptEvent(Var1, 2, iSelectedPlayer);
- //switch mission blips
- int vVar0[3];
- vVar0[0] = 365;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = 1;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //358 off the radar
- int vVar0[3];
- vVar0[0] = 358;
- vVar0[1] = PLAYER_ID();
- vVar0[2] = 50; //time
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //41 death match notifaction/from me
- int Var0[6];
- Var0[0] = 41;
- Var0[1] = PLAYER_ID();
- Var0[3] = 1; //last or current vehicle active
- Var0[5] = 1; //some kind of return stat value
- TriggerScriptEvent(Var0, 6, iSelectedPlayer);
- //288/289 bullshark
- int Var0[6];
- Var0[0] = 288;
- Var0[1] = iSelectedPlayer;
- Var0[3] = 1;
- Var0[5] = 1;
- Var0[2] = iSelectedPlayer; //player 2
- TriggerScriptEvent(Var0, 6, iSelectedPlayer);
- //close interaction menu/paused 259
- int vVar0[3];
- vVar0[0] = 259;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = 0;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //false leave
- int var0[3];
- var0[0] = 203;
- var0[1] = iSelectedPlayer;
- var0[2] = 100000;
- TriggerScriptEvent(&ride, 3, iSelectedPlayer);
- int var0[3];
- var0[0] = 27;
- var0[1] = iSelectedPlayer;
- var0[2] = 1;
- TriggerScriptEvent(&ride, 3, iSelectedPlayer);
- //arg/ 3 params
- //1 fake leave
- //27 notifacation sound
- //30 bullshark started
- //31 bullshark end
- //56 request personal vehicle
- //64 anon bounty
- //67 empty notifaction
- //151 fake leave
- //161 remove blips
- //162 RDR_LEAKS join Job.
- //163 remove blips
- //173 armour truck
- //174 enable blips back
- //300 insurance message
- //312 hospital bill
- //318 fake leave
- //322 fake leave
- //325 fave leave
- typedef struct
- {
- int arg;
- int player;
- char *weather;
- } onlineWeather;
- onlineWeather weather;
- weather.arg = 16;
- weather.player = iSelectedPlayer;
- weather.weather = "BLIZZARD";
- TriggerScriptEvent(&weather, 3, iSelectedPlayer);
- //unlock all test
- int Var0[9];
- GlobalVariable::Write(1573885, 0);
- Var0[0] = 199;
- Var0[1] = PLAYER_ID();
- //Vector3 coords = GlobalVariable::Read(Global_2394218 + 2529);
- //Var0[2] = coords;
- Var0[6] = 0;
- Var0[8] = IS_BIT_SET(GlobalVariable::Get(Global_1581767 + (PLAYER_ID() * 306) + 114), 0);
- Var0[7] = GlobalVariable::Get(Global_1581767 + (PLAYER_ID() * 306) + 76 + 27);
- //func_551();
- //func_555(vParam0.z);
- //GlobalVariable::WriteVector3(Global_2394218 + 2529, coords);
- char *prt = GlobalVariable::GetString(Global_2394218 + 2444 + 51);
- strncpy(prt, 0, 64);
- char *prt2 = GlobalVariable::GetString(Global_2394218 + 2444 + 67);
- strncpy(prt2, 0, 64);
- int iVar1 = GlobalVariable::Get(Global_2390201 + (PLAYER_ID() * 223) + 121 + 1);
- int iVar2 = GlobalVariable::Get((Global_2390201 + (PLAYER_ID() * 223) + 121 + 1 + GlobalVariable::Get(Global_2390201 + (PLAYER_ID() * 223) + 121 + 1 + 1)));
- Var0[5] = ROUND(((TO_FLOAT(iVar1) / TO_FLOAT(iVar2)) * 100.0f));
- if (Var0[5] <= 0)
- {
- Var0[5] = GET_RANDOM_INT_IN_RANGE(5, 100);
- }
- //func_554(1);
- TriggerScriptEvent(Var0, 9, PLAYER_ID());
- //unlock all 2
- int Var0[2];
- Var0[0] = 309;
- Var0[1] = PLAYER_ID();
- TriggerScriptEvent(Var0, 2, PLAYER_ID());
- //unlock all 3
- int vVar0[3];
- vVar0[0] = 167;
- vVar0[1] = PLAYER_ID();
- vVar0[2] = GlobalVariable::Get(2388295 + (PLAYER_ID() * 40) + 3 + 17);
- TriggerScriptEvent(vVar0, 3, PLAYER_ID());
- //earn from pickup
- int Var0[4];
- Var0[0] = 44;
- Var0[1] = iSelectedPlayer;
- Var0[2] = iSelectedPlayer; //player 2
- Var0[3] = 100; //value
- TriggerScriptEvent(Var0, 4, iSelectedPlayer);
- //something
- int vVar0[3];
- vVar0[0] = 43;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = iSelectedPlayer; //player 2
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- //somthing else
- int Var0[19];
- //struct<20> Var1;
- Var0[0] = 59;
- Var0[1] = iSelectedPlayer;
- int zeroo = 0;
- int uVar56 = 0;
- SET_BIT(&uVar56, zeroo);
- Var0[16] = uVar56;
- Var0[2] = iSelectedPlayer; //player 2
- Var0[18] = GlobalVariable::Get(1572928 + 4 + (iSelectedPlayer * 3) + 1);
- Var0[17] = 1;
- Var0[3] = GlobalVariable::Get(2097152 + (zeroo * 7586) + 7168);
- /*StringCopy(&Var1, get_player_name(player_id()), 32);
- if (func_5666(iParam1, 0, 1))
- {
- StringCopy(&(Var1.f_8), get_player_name(iParam1), 32);
- }
- Var1[16] = uParam3;
- Var1[17] = iParam5;
- Var1[18] = Global_1581767[player_id() * 306].f_178.f_6;
- Var1[19] = iParam4;
- _0x0B9A3512(&Param2);
- _0x628F489B(&Var1);*/
- TriggerScriptEvent(Var0, 20, iSelectedPlayer);
- //something idk
- int Var0[2];
- Var0[0] = 204;
- Var0[1] = iSelectedPlayer;
- TriggerScriptEvent(Var0, 2, iSelectedPlayer);
- //am_vehicle_spawn
- int Var0[5];
- Var0[0] = 296;
- Var0[1] = PLAYER_ID();
- Var0[2] = PLAYER_ID();
- Var0[3] = 5; //0 - through 5
- Var0[4] = VEHICLE_ADDER;
- TriggerScriptEvent(Var0, 5, PLAYER_ID());
- //am_vehicle_spawn
- int Var0[5];
- Var0[0] = 295;
- Var0[1] = PLAYER_ID();
- Var0[2] = PLAYER_ID();
- Var0[3] = 1; //0 - through 5
- Var0[4] = VEHICLE_ADDER;
- TriggerScriptEvent(Var0, 5, PLAYER_ID());
- //undocumented events
- //192 / crew awards unlock
- //210 / promote or demote a crew member
- //182 / crew left
- //203 / kick from crew
- //213 / set some crew var to true
- if (featureForgeGun)
- {
- DISABLE_PLAYER_FIRING(PLAYER_ID(), 1);
- 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); } }
- if (forge_target_locked)
- {
- if (RequestControlOfEnt(forge_entity))
- {
- Vector3 min, max;
- GET_MODEL_DIMENSIONS(GET_ENTITY_MODEL(forge_entity), &min, &max);
- Vector3 camvf = get_coords_from_cam(featureForgeGunRange + max.y);
- SET_ENTITY_COORDS_NO_OFFSET(forge_entity, camvf.x, camvf.y, camvf.z, 1, 1, 1);
- if (IS_ENTITY_A_VEHICLE(forge_entity)) { SET_ENTITY_HEADING(forge_entity, GET_ENTITY_HEADING(PLAYER_PED_ID()) + 90.0f); }
- }
- }
- else
- {
- if (DOES_ENTITY_EXIST(forge_entity))
- FREEZE_ENTITY_POSITION(forge_entity, 1);
- }
- }
- case 10:
- //featureClearAttachmentsNet = 1;
- if (detachObjectsFromPlayerCurrentlyRunning == 0)
- {
- detachObjectsFromPlayerCurrentlyRunning = 1;
- detachObjectsFromPlayerAddr = playerPedIter;
- detachObjectsFromPlayerCurrentIndex = 0;
- clearAttachmentsCallback(0);
- }
- break;
- void nullFuncH(int handle) { return; }
- void(*saveFunc)(int);
- Entity featureClearEentity = 0, detachObjectsFromPlayerAddr = 0;
- int featureClearAttamentTimeout = 0, detachObjectsFromPlayerCurrentIndex = 0;
- bool featureClearAttachmentsNet = 0, detachObjectsFromPlayerCurrentlyRunning = 0;
- void markEntityForDeletion(int ent, void(*handle)(int) = nullFuncH)
- {
- featureClearAttamentTimeout = 0;
- featureClearEentity = ent;
- featureClearAttachmentsNet = 1;
- saveFunc = handle;
- }
- void clearAttachmentsCallback(Entity previousEntity)
- {
- CEntityPool *Entities = (CEntityPool*)*(unsigned int*)_entityPoolAddress;
- if (detachObjectsFromPlayerCurrentIndex >= Entities->maxPoolSize)
- {
- detachObjectsFromPlayerCurrentlyRunning = 0;
- return;
- }
- poolEntity *ent = &Entities->getEntity(detachObjectsFromPlayerCurrentIndex);
- while (true)
- {
- if (ent->isValid())
- {
- int index = EntityToIndex(ent->addr);
- if (GET_ENTITY_ATTACHED_TO(index) == detachObjectsFromPlayerAddr)
- {
- break;
- }
- }
- detachObjectsFromPlayerCurrentIndex++;
- if (detachObjectsFromPlayerCurrentIndex >= Entities->maxPoolSize)
- {
- detachObjectsFromPlayerCurrentlyRunning = 0;
- return;
- }
- ent = &Entities->getEntity(detachObjectsFromPlayerCurrentIndex);
- }
- int entityIndex = EntityToIndex(ent->addr);
- markEntityForDeletion(entityIndex, clearAttachmentsCallback);
- detachObjectsFromPlayerCurrentIndex++;
- }
- //use this to get the args that are getting past by other players to you, works similar to hooking the actual event function
- void func_4()
- {
- //event num: 291, event num: 0, event num: 289 /off the radar
- //arg struct 259 /join session
- //event num: 244 /smoke bong
- int iVar0;
- int iVar1;
- int iVar2[3];
- int m_args[2];
- int m_args2[3];
- int m_args3[10];
- int m_args4[12];
- int m_args5[3];
- int m_args6[28];
- int m_args7[2];
- int m_args8[21];
- int m_args9[14];
- iVar0 = 0;
- while (iVar0 < GET_NUMBER_OF_EVENTS(1))
- {
- iVar1 = GET_EVENT_AT_INDEX(1, iVar0);
- if (iVar1 == 166) //freemode
- {
- GET_EVENT_DATA(1, iVar0, iVar2, 3);
- printf("arg: %i, arg2: %i, arg3: %i\n", iVar2[0], iVar2[1], iVar2[2]);
- if (iVar2[0] == 303)
- {
- printf("vehicle windows removed \n");
- }
- if (iVar2[0] == 312)
- {
- printf("badsport \n");
- }
- }
- if (iVar1 == 164) //main transition
- {
- GET_EVENT_DATA(1, iVar0, m_args, 3);
- printf("main transition event args: 0x%X, arg2: 0x%X\n", m_args[0], m_args[1]);
- }
- if (iVar1 == 163)//main transition
- {
- GET_EVENT_DATA(1, iVar0, m_args2, 3);
- printf("main transition2 event args: %i, arg2: 0x%X\n", m_args2[0], m_args2[1]);
- }
- if (iVar1 == 177) //freemode stats
- {
- GET_EVENT_DATA(1, iVar0, m_args3, 10);
- 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]);
- }
- if (iVar1 == 154) //main_presistent | admin kick
- {
- //func_1091
- GET_EVENT_DATA(1, iVar0, m_args5, 1);
- 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]);
- }
- if (iVar1 == 192) //main_presistent | disable multiplayer
- {
- GET_EVENT_DATA(1, iVar0, m_args6, 28);
- 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]);
- }
- if (iVar1 == 175) //main_presistent | session error
- {
- GET_EVENT_DATA(1, iVar0, m_args7, 2);
- printf("session error: arg: %i, arg2: %i\n", m_args7[0], m_args7[1]);
- }
- if (iVar1 == 175) //main_presistent | new session
- {
- GET_EVENT_DATA(1, iVar0, m_args8, 21);
- printf("new session: arg: %i, arg2: %i, arg3: %i, arg4: %i\n", m_args8[0], m_args8[1], m_args8[2], m_args8[3]);
- }
- if (iVar1 == 215) //main_presistent | dev kick
- {
- GET_EVENT_DATA(1, iVar0, m_args9, 14);
- printf("dev kick: arg: %i, arg2: %i, arg3: %i, arg4: %i\n", m_args9[0], m_args9[1], m_args9[2], m_args9[3]);
- }
- if (iVar1 == 150) //freemode unlocks
- {
- //Var0.f_3
- //m_args4[3] = 88; //stat set int with global - Global_2428195
- //m_args4[4] = 34; //stat set bool with global - Global_2428460
- //m_args4[5] = 1; //stat set float with global - Global_1330608
- //m_args4[6] = 2949; //stat set int with global - Global_2417731
- //m_args4[7] = 228; //stat set bool with global - Global_2427264
- //m_args4[8] = 228; //stat set float with global - Global_2426579
- GET_EVENT_DATA(1, iVar0, m_args4, 12);
- 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]);
- }
- iVar0++;
- }
- }
- //char xp
- //Global_1330708
- //events
- //1 check points for mini games
- //2 cops & crooks & broadcast app
- //3 am_cr_securityvan & am_crate_drop
- //150 freemode awards
- //312 health care bill
- //32 apartment invite
- //346 beach ride
- //353 insurance car
- //16 weather
- //55 kick from personal veh
- //56 delete personal vehicle - personal vehicle network id: Global_2390201[vVar0.y /*223*/].f_48
- //58 bounty
- //59 rank and money from bounty
- //300 destroy personal vehicle
- //356 remove wanted
- //357 some type of time
- //216 xp from partner or gen
- //218 money from last shared job
- //219 - PIM_TIRLJ
- //67 CnC_PV_THEFT
- //
- typedef struct
- {
- int arg;
- int player;
- int unknown;
- int intStatAwards; // stat index of Global_2428195[index here][charater here]
- int boolStatActivities; // stat index of Global_2428460[index here][charater here]
- int floatStatTempAward; // stat index of Global_1330608[index here][charater here]
- int intStatCareer; // stat index of Global_2417731[index here][charater here]
- int boolStatWeapons; // stat index of Global_2427264[index here][charater here]
- int floatStatVehicles; // stat index of Global_2426579[index here][charater here]
- int intStatSet; // stat set int value
- float floatStatSet; // stat set float value
- bool boolStatSet; // stat set bool value
- /*//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
- //used by scripts but not used by trigger script event native
- int stringStatGerneral; // stat index of Global_2427949[index here][charater here]
- //used by scripts but not used by trigger script event native
- 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
- //used in script but I'm not sure if it's used by trigger script event native
- int dateStatAward; // stat index of Global_2428010[index here][charater here]
- //used in script but I'm not sure if it's used by trigger script event native
- int PosStat; // stat index of Global_2428116[index here][charater here]
- //used in script but I'm not sure if it's used by trigger script event native
- int useridStat; // stat index of Global_1330505[index here][charater here]
- //used in script but I'm not sure if it's used by trigger script event native
- int intStatmpplyMiscAwards; // stat index of Global_1330616[index here]
- //used by scripts but not used by trigger script event native
- int floatStatmpply; // stat index of Global_1330622[index here]
- //used in script but I'm not sure if it's used by trigger script event native
- int boolStatmpply; // stat index of Global_1330624[index here]
- //used by scripts but not used by trigger script event native
- int unknownTypeStatmpply; // stat index of Global_1330636[index here]
- */
- } mp_client_stats;
- mp_client_stats stat;
- stat.arg = 150;
- stat.player = iSelectedPlayer;
- stat.unknown = iSelectedPlayer;
- stat.intStatAwards = 88;
- stat.boolStatActivities = 34;
- stat.floatStatTempAward = 1;
- stat.intStatCareer = 2949;
- stat.boolStatWeapons = 288;
- stat.floatStatVehicles = 288;
- stat.intStatSet = 0;
- stat.floatStatSet = 0;
- stat.boolStatSet = 0;
- //now set stat becuase that's what scrips do
- //set 500 super heavy armour to player
- stat.intStatCareer = 1867; //Global_2417731[1867 /*3*/][0] = joaat("mp0_mp_char_armour_5_count");
- stat.intStatSet = 500;
- //set player rp | rank 120
- //stat.intStatCareer = 626; //Global_2417731[626 /*3*/][0] = joaat("mp0_char_xp_fm");
- //stat.intStatSet = 2017150; //rp for rank 120
- //set admin rp to them | rank 120
- //stat.intStatCareer = 1868; //Global_2417731[1868 /*3*/][0] = joaat("mp0_char_set_rp_gift_admin");
- //stat.intStatSet = 2017150; //rp for rank 120
- TriggerScriptEvent(&stat, 12, iSelectedPlayer);
- 0x1C6C530 NETWORK_INCREMENT_STAT_EVENT
- 0x12D137C NETWORK_INCREMENT_STAT_FUNC
- //GAME_EXPORT int 0x12D141C(int32_t a1, int32_t a2, int32_t a3);
- //0x12D141C(0xdafb10f9, dword, dword); //hash = mpply_friendly
- /*
- 0x12D141C follow this address back to 0xC3FA0
- 0xC3FA0 contains the stat data
- 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);
- 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
- GAME_EXPORT int _0x324CB0(int *a1, int a2);
- //0x325EF0(Hash hash, unsigned int value, unsigned int value2);
- GAME_EXPORT int _0x325EF0(int32_t *a1);
- GAME_EXPORT int 0x12D8D2C(0xB5EE873, 0x3C0AF527, int value);
- GAME_EXPORT int 0x12DEC4C(someVtable, unsinged int, Hash, int value);
- GAME_EXPORT unsigned int 0xAE8E98(int32_t a1);
- 0xB5EE873 = BASE_GLOBALS
- unsigned int _0xA076C0(int strc)
- //GAME_EXPORT int _0x12D141C(unsigned int v2, unsigned int v4, unsigned int v5)
- GAME_EXPORT void _0x324CB0(int *a1, char *a2)
- //int value = 0;
- //_0x324CB0(&value, "MPPLY_LAST_REPORT_RESTORE");
- GAME_EXPORT int *_0x12DEC4C(int32_t a1, int32_t value, int array_index) //returns an array
- //_0x12DEC4C(0x38CEB237, 0, 3); //0x38CEB237 = mp_global
- GAME_EXPORT void _0x12B4710(unsigned int hash_table_address, unsigned int hash, unsigned int data)
- // unsigned int dword_1CFB0B8 = 0x1CFB0B8;
- //_0x12B4710(dword_1CFB0B8, 0x1C95C751, 0x10); //0xF227F666 COMMENDREPORT_MAX_STRENGTH
- GAME_EXPORT _0x12CF8F0(char *a1, char *a2, int value) //returns an array looks like
- //_0x12CF8F0("MP_GLOBAL", "KICK_TIMEOUT", 0);
- //_0x12CF8F0("MP_GLOBAL", "KICK_TIMEOUT_DISABLED", 2);
- GAME_EXPORT char _0xC3C8C(const char *a1, int32_t a2, int32_t a3)
- GAME_EXPORT char *_0x12F89B8(const char *a1)
- GAME_EXPORT void _0xA23BD0(int32_t *a1, int32_t a2, int a3)
- unsigned int CNetGamePlayer()
- {
- unsigned int s = 0x00000000;
- unsigned int v23 = *(unsigned int*)(s + 0x4C);
- return _0xA076C0(v23);
- }
- int g_global = GlobalVariable::Get(1310891 + (PLAYER_ID() * 6) + 1);
- int vVar0[3];
- vVar0[0] = 168;
- vVar0[1] = iSelectedPlayer;
- vVar0[2] = g_global;
- TriggerScriptEvent(vVar0, 3, iSelectedPlayer);
- int Var2[4];
- Var2[0] = 157;
- Var2[1] = iSelectedPlayer;
- int bit = 0;
- SET_BIT(&bit, PLAYER_ID());
- Var2[2] = bit; //bitset
- Var2[3] = g_global;
- TriggerScriptEvent(Var2, 4, iSelectedPlayer);
- int FadeTime = 700;
- RGBA ColorList[4] = {
- { 255, 0, 0, 255 },
- { 0, 255, 0, 255 },
- { 0, 0, 255, 255 },
- { 255, 255, 0, 255 },
- };
- float fadeAmount;
- int colorIndex;
- RGBA startColor = ColorList[0], endColor = ColorList[1];
- RGBA currentColor;
- double Lerp(double d1, double d2, double d)
- {
- return d1 + (d2 - d1) * d;
- }
- RGBA FadeTo(RGBA color1, RGBA color2, double d)
- {
- RGBA col;
- double r = Lerp(color1.R, color2.R, d);
- double g = Lerp(color1.G, color2.G, d);
- double b = Lerp(color1.B, color2.B, d);
- col.R = r;
- col.G = g;
- col.B = b;
- return col;
- }
- if (fadeAmount < 1.0f)
- {
- fadeAmount += GET_FRAME_TIME() * (1000.0f / FadeTime);
- if (fadeAmount < 0.0f)
- fadeAmount = 0.0f;
- else if (fadeAmount > 1.0f)
- fadeAmount = 1.0f;
- currentColor = FadeTo(startColor, endColor, fadeAmount);
- }
- else
- {
- colorIndex++;
- colorIndex %= sizeof(ColorList);
- startColor = currentColor;
- endColor = ColorList[colorIndex];
- fadeAmount = 0.0f;
- }
- if (IS_PED_IN_ANY_VEHICLE(myVeh, 1))
- SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(myVeh, currentColor.R, currentColor.G, currentColor.B);
- //18 players in session
- _NETWORK_SESSION_SET_MAX_PLAYERS(0, 18); //Player
- _NETWORK_SESSION_SET_MAX_PLAYERS(4, 18); //Spectator
- _NETWORK_SESSION_SET_MAX_PLAYERS(8, 18); //SCTV
- _NETWORK_SCTV_SLOTS(18);
- *(int *)(0x3E42EC) = BLR; //_NETWORK_SESSION_SET_MAX_PLAYERS
- int getProofs(Entity entity, int bit)
- {
- int address = getScriptHandleBaseAddress(entity);
- printf("address: 0x%X\n", address);
- int fire = 5;
- int melee = 7;
- int bullet = 4;
- int explosion = 11;
- int collision = 6;
- int onlyDamageByPlayer = 9;
- int invincible = 8;
- //other unknown params?
- int ten = 10;
- int fourteen = 14;
- int fifthteen = 15;
- int canEntityBeDamaged = 18;
- int twentyfour = 24;
- /*
- nothing:
- toggle: 1 = byte 0x30000800
- toggle: 0 = byte 0x30000800
- player invincible
- toggle: 1 = byte 0x30800800
- toggle: 0 = byte 0x30000800
- bullet proof:
- toggle: 1 = byte 0x38000800
- toggle: 0 = byte 0x30000800
- fire proof:
- toggle: 1 = byte 0x34000800
- toggle: 0 = byte 0x30000800
- explosion proof:
- toggle: 1 = byte 0x30200800
- toggle: 0 = byte 0x30000800
- collision proof:
- toggle: 1 = byte 0x32000800
- toggle: 0 = byte 0x30000800
- melee proof:
- toggle: 1 = byte 0x31000800
- toggle: 0 = byte 0x30000800
- p6 proof:
- toggle: 1 = byte 0x30020800
- toggle: 0 = byte 0x30000800
- p7 proof: //next byte
- toggle: 1 = byte 0x30000800
- toggle: 0 = byte 0x30000800
- p8 proof:
- toggle: 1 = byte 0x30010800
- toggle: 0 = byte 0x30000800
- only damaged by player:
- toggle: 1 = byte 0x30400800
- toggle: 0 = byte 0x30000800
- can entity be damaged:
- toggle: 1 = byte 0x30800800
- toggle: 0 = byte 0x30000800
- apartment
- toggle: 1 = byte 0x30800800
- toggle: 0 = byte 0x30000800
- while ringing apartment door
- toggle: 1 = byte 0x30800800
- toggle: 0 = byte 0x30000800
- garge
- toggle: 1 = byte 0x30000800
- toggle: 0 = byte 0x30000800
- getting out of apartment
- toggle: 1 = byte 0x30800000
- toggle: 0 = byte 0x30000800
- console trainer
- toggle: 1 = byte 0x30800800
- toggle: 0 = byte 0x30000800
- api intense
- toggle: 1 = byte 0x30800800
- toggle: 0 = byte 0x30000800
- dark hores menu
- toggle: 1 = byte 0x3FA30800 //a lot of god modes enableds like proofs and others
- toggle: 0 = byte 0x30000800
- while driving
- toggle: 1 = byte 0x30000000
- toggle: 0 = byte 0x30000800
- swiming in water
- toggle: 1 = byte 0xF0000800
- toggle: 0 = byte 0x30000800
- in air
- toggle: 1 = byte 0x30000000
- toggle: 0 = byte 0x30000800
- respawning
- toggle: 1 = byte 0x30800000
- toggle: 0 = byte 0x30000800
- getting into heli
- toggle: 1 = byte 0x30000004 //or maybe 0x30000804
- toggle: 0 = byte 0x30000800
- getting into lazer jet
- toggle: 1 = byte 0x30000004
- toggle: 0 = byte 0x30000800
- climbing a latter
- toggle: 1 = byte 0x30000A04
- toggle: 0 = byte 0x30000800
- in deathmath
- toggle: 1 = byte 0x30000100
- toggle: 0 = byte 0x30000800
- after deathmath
- toggle: 1 = byte 0x30000900
- toggle: 0 = byte 0x30000900
- invincible:
- int32_t v4 = 0x800000;
- int32_t result2 = byte & -0x800001 | v4;
- proofs:
- int v4_2;
- result =
- 0x8000000 * a2 & 0x8000000 | //bullet proof
- byte & -0xf230001 | //god mode???
- 0x4000000 * a3 & 0x4000000 | //fire proof
- 0x200000 * a4 & 0x200000 | //exploion proof
- 0x2000000 * a5 & 0x2000000 | //collision proof
- 0x1000000 * a6 & 0x1000000 | //melle proof
- 0x20000 * a7 & 0x20000 | //unk6
- 0x10000 * v4_2 & 0x10000; //unk8
- onlyDamageByPlayer:
- bool a2 = 0;
- int32_t result = 0x400000 * a2 & 0x400000 | byte & -0x400001;
- can entity be damaged:
- *v5 = 0x40000 * v4 & 0x800000 | *v5 & -0x800001;
- */
- }
- if (NETWORK_IS_HOST())
- {
- NETWORK_SESSION_KICK_PLAYER(iSelectedPlayer);
- }
- //activate admin kick on self
- GlobalVariable::Write(1315298, 30);
- GlobalVariable::Write(60515, 0);
- GlobalVariable::Write(1312335, 1);
- GlobalVariable::Write(1312455, 6); //admin kick
- /*
- //(*(int*)0x1CC4A34) + 0x2A4) cnetplayer from first player probs the host
- //a1 = 2, 4, 5, 8,
- GameclockHost(5, (*(int*)0x1CC4A34) + 0x2A4);
- //NOTICE THEY DONT CHANGE ON YOUR SCREEN
- int strcut = *(int *)(0x1CC4A54);
- int net_script = *(int *)(strcut);
- //non host
- int prt = *(int *)(0x1CC4A54);
- unsigned int *a1 = _0xA546A8(prt);
- GameClockFn(a1, 5, (*(int*)0x1CC4A34) + 0x2A4);
- *(int *)(a1 + 0x2C) = hour;
- *(int *)(a1 + 0x20) = weather; //could be wrong
- //GameClockFn(a1, 5, CNetGamePlayerFn(iSelectedPlayer, 1));
- /*
- r0=00000000012C2A40 r8=0000000000000003 r16=0000000000000000 r24=0000000001C28AA0
- r1=00000000D003FEB0 r9=0000000002150000 r17=00000000D0040430 r25=0000000000000001
- r2=0000000001C85330 r10=0000000000000000 r18=0000000035F35344 r26=0000000000000000
- r3=00000000401DC6E0 r11=000000003279AFF4 r19=0000000001CC2FA8 r27=0000000035F2BFFF
- r4=0000000000000005 r12=00000000D003FB10 r20=000000003228FAB4 r28=0000000035F35344
- r5=000000000222E250 r13=0000000010007060 r21=0000000035F00000 r29=000000000222E250
- r6=0000000000000003 r14=0000000000000000 r22=0000000001E70370 r30=0000000000000005
- r7=000000001FFFFFFF r15=0000000000000000 r23=00000000321A7080 r31=00000000401DC6E0
- xer=0000000020000000 ctr=00000000012C2A00 lr=00000000012C2A50 fpscr=AE302500
- cr=44000042 cr0=GT cr1=GT cr2= cr3= cr4= cr5= cr6=GT cr7=EQ
- pc=00000000012C2898
- Executing
- 401DC6E0 0000005E 00030000 401C2AF4 0222DC80 000D63E8 ...^....@.*.."....c.
- 401DC6F4 00004000 00000000 00002C38 4375B5EE 0000006D ..@.......,8Cu.....m
- 401DC708 019262B0 00000000 FFFFFFFF 00740000 00000008 ..b..........t......
- 401DC71C 01892C38 C875557D 66726565 6D6F6465 00000005 ..,8.uU}freemode....
- 401DC730 95B61B42 00001000 0222DC80 00000000 00010000 ...B....."..........
- 401DC744 003D8112 00000000 FFFFFFFF C875557D 00000000 .=...........uU}....
- 401DC758 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC76C 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC780 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC794 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC7A8 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC7BC 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC7D0 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC7E4 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC7F8 00000000 00000000 0000005F 00030000 401C2B98 ..........._....@.+.
- 401DC80C 0222DC80 000D63E8 00004000 00000000 00002C38 ."....c...@.......,8
- 401DC820 BF397BCC 00000065 019262B0 00000000 FFFFFFFF .9{....e..b.........
- 401DC834 00000000 00000009 01892C38 C875557D 66726565 ..........,8.uU}free
- 401DC848 6D6F6465 00FFFFFF C875557D 00000004 00000000 mode.....uU}........
- 401DC85C FFFFFFFF 00000000 003D8112 00000000 FFFFFFFF .........=..........
- 401DC870 C875557D 00000000 00000000 00000000 00000000 .uU}................
- 401DC884 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC898 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC8AC 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC8C0 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC8D4 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC8E8 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC8FC 00000000 00000000 00000000 00000000 00000000 ....................
- 401DC910 00000000 00000000 00000000 00000000 00000060 ...................`
- 401DC924 00030000 401C2C3C 0222DC80 000D63E8 00004000 ....@.,<."....c...@.
- 401DC938 00000000 0000EC00 376F3515 00000000 019262B0 ........7o5.......b.
- 401DC94C 00000000 FFFFFFFF 00F10006 0000000A 01892C38 ..................,8
- 401DC960 C875557D 66726565 6D6F6465 00000000 00000000 .uU}freemode........
- 401DC974 00000000 00000000 00000000 00000000 003D8112 .................=..
- 401DC988 00000000 FFFFFFFF C875557D 00000000 00000000 .........uU}........
- 401DC99C 00000000 00000000 00000000 00000000 00000000
- 0222E250 0192F460 00000000 00000000 00000000 FFFFFFFF ...`................
- 0222E264 00000000 00000000 FFFFFFFF 00000000 FFFFFFFF ....................
- 0222E278 03FF0000 00000000 00000000 000C9F70 FFFFFFFF ...............p....
- 0222E28C 00000000 0222EA10 00000000 00000000 00000000 ....."..............
- 0222E2A0 00000000 00000000 00000000 00000000 00000000 ....................
- 0222E2B4 FFFFFFFF 00000000 20000000 00000000 00000000 ........ ...........
- 0222E2C8 00000000 FFFFFFFF 00000000 00000000 00000000 ....................
- 0222E2DC 00000000 00000000 0000000A 00000012 00000000 ....................
- 0222E2F0 00000000 00000000 00000000 00000000 00F99D27 ...................'
- 0222E304 D003E390 00000000 02230000 00000000 00000000 .........#..........
- 0222E318 00000000 00000000 00000000 00000000 00000000 ....................
- 0222E32C 00000000 00000000 00000000 00000000 00000000 ....................
- 0222E340 00000000 00000000 00000000 00000000 00000000 ....................
- 0222E354 00000000 00000000 00000000 00000000 00000000 ....................
- 0222E368 00000000 0022E250 00000000 00000000 0222DA1C .....".P........."..
- 0222E37C 0222E250 0222DA28 0222E250 0222DA34 00000000 .".P.".(.".P.".4....
- 0222E390 0222DA40 00000000 00000000 400222D0 00000000 .".@........@.".....
- 0222E3A4 00000000 00000000 00000000 00000000 00000000 ....................
- 0222E3B8 00000000 00000000 00000000 000000FF 00000000
- *
- int s = 0x0000000
- int p2 = (int )(s + 0xD04);
- GameWeatherFn(int unk, int strut, 0);
- //1, 0, 4E = extrasunny
- //1, 1, 4E clear
- //1, 2, 4E clouds
- //1, 3, 4E = smog
- //1, 4, 4E = foggy
- //1, 5, 4E = overcast
- //1, 6, 4E = rain
- //1, 7, 4E = thunder
- //1, 8, 4E clearing
- //1, 9, 4E = netutral
- //1, A, 4E snow
- //1, B, 4E blizzard
- //1, C, 4E snowlight
- //1, D, 4E xmas
- //0, 0, 4E reset
- //sub_0x003D402C();
- //sub_0x0046EE68(value_0x040D130D0, value_0x046EE68, value_0x0470810);
- //sub_0x0109592C();
- //sub_0x010959D0();
- //these args could be found in the data to hook to find the weather they changed it to
- //sub_1095B24(time_cycle_struct/*0x2148E84*, value_0x97, value_0x4A38);
- //sub_12F3C00(cNetPlayer, cNetPlayer, value_0x1340940);
- //weahther event caller
- //sub_12C2ECC(0x1, 0xD, 0x4E);
- //joining a new session
- //sub_109570C(time_cycle_struct/*0x2148E84*, value_1, value_0x497C8, value_0x1388, "ECYCLE/W_EXTRASUNNY.XML.");
- //for all session.
- //sub_109536C(dword_2148E84_not_prt, weather_value, value_1_or_0);
- /*
- r0=00000000010953E0 r8=0000000002240000 r16=0000000000000000 r24=0000000001C28AA0
- r1=00000000D003FC60 r9=0000000002C91001 r17=00000000D0040430 r25=0000000000000001
- r2=0000000001C85330 r10=0000000000000000 r18=0000000035F35344 r26=0000000000000000
- r3=0000000000000001 r11=000000003225B1F4 r19=0000000001CC2FA8 r27=0000000035F2BFFF
- r4=0000000000000005 r12=00000000D003FB10 r20=000000003228FAB4 r28=0000000035F35344
- r5=00000000000000AC r13=0000000010007060 r21=0000000035F00000 r29=0000000000000005
- r6=0000000000000000 r14=0000000000000000 r22=0000000001E70370 r30=0000000000000001
- r7=0000000000000000 r15=0000000000000000 r23=00000000321A7080 r31=0000000002148E84
- xer=0000000020000000 ctr=00000000008FD3B0 lr=0000000001095434 fpscr=BE302500
- cr=24000022 cr0=EQ cr1=GT cr2= cr3= cr4= cr5= cr6=EQ cr7=EQ
- pc=00000000012C2ECC
- Executing
- */
- GAME_EXPORT bool networkIsHost();
- GAME_EXPORT void networkKickPlayer_host(int32_t host_prt, int32_t value);
- GAME_EXPORT void request_something_from_host(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5);
- GAME_EXPORT int32_t sub_12F6D7C()
- 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)
- 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)
- {
- int32_t result = sub_150AA80(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10);
- if (*(int32_t *)result == 0)
- {
- return result;
- }
- if (*(int32_t *)(result + 8) == 0 || *(int32_t *)(result + 12) == 0)
- {
- return 0;
- }
- int32_t result2 = 0;
- if (sub_16276C4((int32_t)&result2, *(int32_t *)(result + 4)) == 0)
- {
- return 0;
- }
- if (result2 != *(int32_t *)0x2258B90)
- {
- return result2;
- }
- if (networkIsHost() == 0 || *(int32_t *)(result + 8) == 0)
- {
- return 0;
- }
- int32_t result4;
- int32_t v1 = &result4;
- sub_A8B814(v1);
- sub_A8B8DC(v1, *(int32_t *)result);
- int32_t v2 = 0;
- if (sub_16271AC((int32_t)&v2, v1) != 0)
- {
- int32_t v3;
- if ((v3 & 64) == 0 & *(int32_t *)0x2258B90 == v2)
- {
- int32_t result3;
- int32_t v4;
- int32_t v5;
- int32_t v6;
- if (v5 + 8 <= ((v3 & 128) == 0 ? v6 : v4))
- {
- int32_t v7;
- int32_t v8;
- sub_A8B588((int32_t)&v7, 8, v5 + v8);
- sub_A8BAD8(v1, 8);
- int32_t v9 = sub_A8BA28(v1);
- if (v9 == *(int32_t *)(result + 4))
- {
- int32_t v10 = *(int32_t *)(result + 8);
- result3 = networkKickPlayer_host(*(int32_t *)0x1CF72C4, v10, v7 % 256);
- }
- else
- {
- result3 = v9;
- }
- }
- else
- {
- result3 = result4;
- }
- return result3;
- }
- }
- return result4;
- }
- //mgrKickPlayer class
- //MsgBlacklist class
- //MsgBlacklist12AutoIdDesc__E
- int32_t sub_176404C(int32_t a1) //request kick
- {
- //0x1888B90 rage::AutoIdDescriptorE
- //0x22693F8 rage::msgPartyLeaveGame::AutoIdDesc__
- //0x1FFE474 rage::netMessage::AutoIdDesc__
- //0x18F25D0 class rage::AutoIdDescriptor<netMessage>
- //0x19318C0 msgRequestKickFromHost::AutoIdDesc__
- //TEXT 0x19318C8 = msgRequestKickFromHost
- int32_t v1 = sub_1803770(a1);
- sub_D04088(v1, 1, 0x19318C8, 0x1FFE474, 1);
- *(int32_t *)v1 = 0x18F25D0;
- if (*(char *)0x2269418 == 0)
- {
- sub_D03258(0x22693F8);
- *(char *)0x2269418 = 1;
- }
- sub_D04260(0x22693F8, v1);
- *(int32_t *)v1 = 0x19318C0;
- return 0x19318C0;
- }
- int32_t sub_1624C94(int32_t a1) //black list
- {
- int32_t v1 = sub_1803770(a1);
- *(int32_t *)v1 = 0x18F25D0;
- if (*(char *)0x2269418 == 0)
- {
- sub_D03258(0x22693F8);
- *(char *)0x2269418 = 1;
- }
- sub_D03298(0x22693F8, v1);
- *(int32_t *)v1 = 0x1888B90;
- return 0x1888B90;
- }
- int32_t sub_162A01C(int32_t a1) //kick msg
- {
- int32_t v1 = sub_1803770(a1);
- int32_t v2 = v1;
- if (v1 == 0)
- {
- return 0;
- }
- *(int32_t *)v1 = 0x18F25D0;
- if (*(char *)0x2269418 == 0)
- {
- sub_D03258(0x22693F8);
- *(char *)0x2269418 = 1;
- }
- sub_D03298(0x22693F8, v2);
- *(int32_t *)v2 = 0x1888B90;
- return sub_10230(v2, 0x1888B90);
- }
- int32_t sub_1357CA0(int32_t a1, int32_t a2, int32_t a3)
- {
- int32_t v1 = loc_150AA84(a1, a2, a3);
- int32_t v2;
- int32_t v3 = &v2;
- v2 = 0;
- int32_t result;
- if (sub_A91D04(a2, 0x1850D34, v3, 32) == 0)
- {
- result = false;
- }
- else
- {
- int32_t v4 = sub_AE580C(v3, 0);
- *(int32_t *)(v1 + 4) = v4;
- if (v4 == 0xDD245B9C) //hash of "vehicle"
- {
- sub_A91D04(a2, 0x1851F70, v1 + 12, 64);
- }
- result = 1;
- }
- return result;
- }
- 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)
- {
- int32_t v1 = sub_150AA84(a1, a2, a3, a4, a5, a6, a7);
- switch (*(int32_t *)(v1 + 4))
- {
- case 0xDD245B9C: //hash of "vehicle"
- {
- int32_t v2 = *(int32_t *)(*(int32_t *)0x1CEFCF8 + 4);
- if (v2 != 0)
- {
- if ((*(int32_t *)(v2 + 3556) & 0x40000000) != 0)
- {
- if (*(int32_t *)(v2 + 3740) != 0)
- {
- return 0;
- }
- }
- sub_103FCA4(v1 + 12);
- }
- return 0;
- }
- case 0xC2F12A5B: // hash collosion but works "cxazuog" //hash of "" // related to EXPLOSION_EVENT
- {
- int32_t v3 = sub_1117978();
- if (v3 == 0)
- {
- return 0;
- }
- int32_t v4;
- int32_t v5 = &v4;
- sub_5704A8(v5, v3, 0);
- int32_t v6 = sub_AEBB54(*(int32_t *)0x1CBAEAC, 276, 16);
- sub_570AC4(v6, v5, 16, 0);
- int32_t v7;
- int32_t v8 = &v7;
- sub_622E4(v8, 3, v6, 0, 79, 0, 0);
- int32_t v9 = sub_585C8(*(int32_t *)(v3 + 3020) + 788, v8);
- if (v9 != 0)
- {
- char * v10 = (char *)(v9 + 12);
- *v10 = *v10 % 128;
- }
- sub_62368(v8);
- int32_t v11;
- if (v11 != 0)
- {
- sub_150AD08((int32_t)&v11);
- }
- return 0;
- }
- case 0x84643284: //hash of "kick"
- {
- if (networkIsHost() == 0)
- {
- int32_t v12 = sub_12F6D7C();
- if (v12 != 0)
- {
- int32_t v13;
- int32_t v14 = &v13;
- sub_A8B814(v14);
- int32_t v15;
- int32_t v16 = &v15;
- sub_A8B908(v14, v16, 982);
- bool v17 = false;
- if (sub_1626844(*(int32_t *)0x2258B90, v14) != 0)
- {
- bool v18 = false;
- int32_t v19;
- int32_t v20;
- int32_t v21;
- if (v20 + 8 <= v19 && (v21 & 128) == 0)
- {
- if ((v21 & 64) == 0)
- {
- int32_t v22;
- sub_A8B5FC(v13, 4, 8, v20 + v22, v22);
- }
- sub_A8BBBC(v14, 8);
- v18 = true;
- }
- v17 = v18;
- }
- sub_A8B978(v14);
- if (v17)
- {
- request_something_from_host(v12, v16, 0, 0, 0);
- }
- }
- }
- else
- {
- if (*(int32_t *)(*(int32_t *)0x1CF72BC + 140) != 0)
- {
- //value = 0 you been kicked from this GTA Online sesison by other players
- //value = 1 connection was lost due to an unknown network error
- //value = 2 says player left. (cool kinda kick, player can join back)
- //value = 3 connection was lost due to an unknown network error
- //value = 4 You Have been removed from this session by a Rockstar Games administrator.
- //value = 5 connection was lost due to an unknown network error
- //value = 6 connection was lost due to an unknown network error
- //value = 7 connection was lost due to an unknown network error
- //vlaue = 8 You were kicked from this GTA Online sesison by other players
- networkKickPlayer_host(*(int32_t *)0x1CF72C4, 4);
- }
- }
- return 0;
- }
- case 0x4349E22B: //hash of "relax" // related to RAGDOLL_REQUEST_EVENT
- {
- int32_t v23 = sub_1117978();
- if (v23 != 0)
- {
- int32_t v24 = sub_AEBB54(*(int32_t *)0x1CBAEAC, 196, 16);
- sub_7075A0(v24, 1000, 0x2710, 0x149f0, 0); // v24 = CTaskMoveStandStill
- int32_t v25;
- int32_t v26 = &v25;
- sub_67924(v26, 0x2710, v24, 0, 1000);
- sub_10194B0(v23, v26); // v23 = CPed, v26 = 37
- sub_67990(v26);
- }
- return 0;
- }
- }
- return 0;
- }
- int32_t sub_A17A58(int32_t a1, int32_t a2, int32_t a3, uint32_t a4, int32_t a5, int32_t a6)
- {
- int32_t v1 = 0;
- uint32_t v2 = 32 - a3;
- uint32_t v3 = v2 % 32;
- uint32_t v4 = (v2 & 32) != 0 ? 0 : -1 << v3;
- uint32_t v5 = a4 % 8;
- uint32_t v6 = (v2 & 32) != 0 ? 0 : a2 << v3;
- char * v7 = (char *)v1;
- unsigned char v8 = *v7;
- uint32_t v9 = 8 - v5;
- uint32_t v10 = v6 << v9;
- int32_t v11 = v1 + 1;
- char * v12 = (char *)v11;
- uint32_t v13 = v4 << v9;
- *v7 = (char)((int32_t)v8 & (v4 / 0x1000000 >> v5 ^ 255) | v6 / 0x1000000 >> v5);
- int32_t v14 = sub_A8B68C(v9, v13, a3, v10, v11, v4);
- unsigned char v15 = *v12; // 0xa8b65c
- *v12 = (char)((int32_t)v15 & (v13 / 0x1000000 ^ 255) | v10 / 0x1000000);
- return v14 + 8;
- }
- int32_t networkKickPlayer_host(int32_t a1, int32_t * a2, int32_t a3, int32_t a4)
- {
- int32_t v1 = (int32_t)a2;
- int32_t v2 = loc_150AA6C(a1, v1, a3, a4);
- if (a2 == NULL | sub_96D614(*(int32_t *)(v2 + 64)) == 0)
- {
- return 0;
- }
- int32_t v3 = a3 < 3;
- int32_t v4;
- int32_t v5;
- int32_t v6;
- int32_t result;
- if (sub_9F8FD8(v1) != 0)
- {
- sub_1358AAC(v2, a3);
- v4 = 0;
- switch (a3)
- {
- case 0:
- {
- v4 = 1;
- break;
- }
- case 4:
- {
- v4 = 1;
- break;
- }
- }
- if (v3 == 0)
- {
- v5 = sub_6BBC08(v1);
- sub_135282C(v3, v5, v4);
- }
- v6 = sub_6BBC08(v1);
- result = sub_970F28(*(int32_t *)(v2 + 64), v6, 1, 0, 0);
- return result;
- }
- if (a3 == 2)
- {
- if (v3 == 0)
- {
- v5 = sub_6BBC08(v1);
- sub_135282C(v3, v5, 0);
- }
- v6 = sub_6BBC08(v1);
- result = sub_970F28(*(int32_t *)(v2 + 64), v6, 1, 0, 0);
- return result;
- }
- int32_t v7;
- sub_D26100((int32_t)&v7);
- sub_9716D8(*(int32_t *)(v2 + 64));
- sub_9F8688(v1);
- int32_t v8 = sub_96EF94(*(int32_t *)(v2 + 64), sub_9f87BC(v1));
- if (v8 != 0)
- {
- sub_1358D14(sub_96D0D0(v8));
- }
- v4 = 0;
- switch (a3)
- {
- case 0:
- {
- v4 = 1;
- break;
- }
- case 4:
- {
- v4 = 1;
- break;
- }
- }
- if (v3 == 0)
- {
- v5 = sub_6BBC08(v1);
- sub_135282C(v3, v5, v4);
- }
- v6 = sub_6BBC08(v1);
- result = sub_970F28(*(int32_t *)(v2 + 64), v6, 1, 0, 0);
- return result;
- }
- int32_t sub_1356F48(int32_t a1, int32_t a2, int32_t a3, int32_t a4)
- {
- int32_t v1 = loc_150AA80(a1, a2, a3, a4);
- if (sub_12D804C(1) == 0)
- {
- return 0;
- }
- int32_t v2 = sub_D3D6EC(a3);
- if (v2 == 0)
- {
- return v2 != 0;
- }
- int32_t v3 = sub_12EF35C();
- int32_t v4;
- int32_t v5 = &v4;
- int32_t v6 = 0x1931800;
- sub_D21058(v5);
- int32_t v7;
- int32_t v8 = &v7;
- sub_D247A8(v8);
- sub_14F6178(v5, a3, 9);
- int32_t v9 = 18;
- int32_t v10 = 0;
- while (true)
- {
- int32_t v11 = v10;
- *(char *)(v11 + 136) = *(char *)(a3 + 16 + v10);
- *(char *)(v11 + 137) = *(char *)(17 + a3 + v10);
- int32_t v12 = v9 - 1;
- v9 = v12;
- if (v12 == 0)
- {
- int32_t v13;
- sub_D04070((int32_t)&v13, a3 + 52);
- sub_14F6178(v8, v3, 46);
- int32_t v14;
- sub_D3D738(v5, (int32_t)&v14, 768, 0);
- int32_t result = sub_13518A4((int32_t)&v6, v1, a2);
- return result;
- }
- v10 += 2;
- }
- }
- int32_t sub_13519D0(int32_t a1, int32_t a2)
- {
- int32_t v1 = loc_150AA80(a1, a2);
- int32_t result = sub_12E4FAC(v1);
- if (result != 0)
- {
- return result;
- }
- if (sub_D2D690(0) == 0)
- {
- return 0;
- }
- int32_t v2 = sub_D2EA08(result);
- if (sub_D2D338(v2) == 0)
- {
- return 0;
- }
- int32_t v3;
- int32_t v4 = &v3;
- int32_t v5;
- int32_t v6 = &v5;
- sub_A8F724(v4, v6, 1024, 1);
- if (sub_A8F950(v4, 0, 0) == 0 || sub_13300F0(v1, v4) == 0 || sub_A8FBDC(v4) == 0)
- {
- return 0;
- }
- if ((a2 & 8) != 0)
- {
- sub_D44010(result, v6);
- }
- if ((a2 & 16) != 0)
- {
- if (sub_D3A440(result) != 0)
- {
- sub_D44230(result, v6);
- }
- }
- if ((a2 & 4) == 0)
- {
- return 0;
- }
- int32_t v7;
- int32_t v8 = &v7;
- sub_D247A8(v8);
- if (sub_D2D610(result, v8) == 0)
- {
- return 0;
- }
- int32_t v9;
- int32_t v10 = &v9;
- sub_D40558(v10, 0x1878AA4, v6);
- int32_t v11;
- int32_t v12 = &v11;
- int32_t v13;
- int32_t v14 = &v13;
- sub_A8F788(v12, v14, 1024, 1);
- int32_t result2;
- if (sub_D405A0(v10, v12) != 0)
- {
- result2 = sub_D43FF0(result, v8, 1, v14, 0);
- }
- else
- {
- result2 = 0;
- }
- return result2;
- }
- int32_t sub_13518A4(int32_t a1, int32_t a2, int32_t a3)
- {
- int32_t v1 = loc_150AA7C(a1, a2, a3);
- int32_t result = sub_12E4fAC(v1);
- if (result != 0)
- {
- return result;
- }
- if (sub_D2D690(0) == 0)
- {
- return 0;
- }
- int32_t v2 = sub_D2EA08(result);
- if (sub_D2D338(v2) == 0)
- {
- return 0;
- }
- int32_t v3;
- int32_t v4 = &v3;
- int32_t v5;
- int32_t v6 = &v5;
- sub_A8F724(v4, v6, 1024, 1);
- if (sub_A8F950(v4, 0, 0) == 0)
- {
- return 0;
- }
- int32_t result2;
- if (sub_13300F0(v1, v4) != 0)
- {
- int32_t v7 = sub_A8FBDC(v4);
- if (v7 != 0 && a2 != 0 && a3 > 0)
- {
- int32_t v8;
- int32_t v9 = &v8;
- sub_D40558(v9, 0x1878AA4, v6);
- int32_t v10;
- int32_t v11 = &v10;
- int32_t v12;
- int32_t v13 = &v12;
- sub_A8F788(v11, v13, 1024, 1);
- if (sub_D405A0(v9, v11) != 0)
- {
- result2 = sub_D43FD0(result, a2, a3, v13, 0);
- }
- else
- {
- result2 = 0;
- }
- return result2;
- }
- result2 = v7;
- }
- else
- {
- result2 = 0;
- }
- return result2;
- }
- int32_t sub_D44010(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5, int32_t a6)
- {
- int32_t v1 = loc_150AA70(a1, a2, a3, a4, a5, a6);
- int32_t v2 = 0;
- int32_t v3;
- int32_t v4 = &v3;
- bool result2 = false;
- int32_t v5 = v4;
- sub_AE8C70(v4, 0, 48);
- int32_t v6 = -1;
- *(char *)(v5 + 44) = (char)result2;
- int32_t v7 = v5;
- *(char *)(v7 + 45) = (char)result2;
- *(int32_t *)v5 = v6;
- sub_AE8C70(v7, 0, 48);
- *(int32_t *)v5 = v6;
- *(char *)(v5 + 44) = (char)result2;
- v2++;
- *(char *)(v5 + 45) = (char)result2;
- *(int32_t *)(v5 + 48) = (int32_t)result2;
- int32_t v8 = v5 + 52;
- v5 = v8;
- while (v2 < 100)
- {
- sub_AE8C70(v8, 0, 48);
- v6 = -1;
- *(char *)(v5 + 44) = (char)result2;
- v7 = v5;
- *(char *)(v7 + 45) = (char)result2;
- *(int32_t *)v5 = v6;
- sub_AE8C70(v7, 0, 48);
- *(int32_t *)v5 = v6;
- *(char *)(v5 + 44) = (char)result2;
- v2++;
- *(char *)(v5 + 45) = (char)result2;
- *(int32_t *)(v5 + 48) = (int32_t)result2;
- v8 = v5 + 52;
- v5 = v8;
- }
- int32_t v9 = 100;
- int32_t v10 = sub_D43B5C(v1, v4, (int32_t)&v9);
- int32_t result = result2;
- if (v10 == 0)
- {
- return result;
- }
- int32_t v11;
- int32_t v12 = &v11;
- v5 = v12;
- sub_AE8C70(v12, 0, 48);
- *(char *)(v5 + 44) = (char)result2;
- result++;
- *(char *)(v5 + 45) = (char)result2;
- *(int32_t *)v5 = -1;
- int32_t v13 = v5 + 48;
- v5 = v13;
- while (result < 100)
- {
- sub_AE8C70(v13, 0, 48);
- *(char *)(v5 + 44) = (char)result2;
- result++;
- *(char *)(v5 + 45) = (char)result2;
- *(int32_t *)v5 = -1;
- v13 = v5 + 48;
- v5 = v13;
- }
- int32_t v14 = result2;
- v6 = v14;
- int32_t v15 = v9;
- v5 = v14;
- int32_t v16;
- int32_t v17;
- int32_t v18;
- int32_t v19;
- int32_t v20;
- int32_t v21;
- int32_t v22;
- int32_t v23;
- int32_t v24;
- if (v15 <= 0)
- {
- if (v14 == 0)
- {
- return 1;
- }
- v22 = a2;
- v21 = 0x1851618;
- sub_150BB04((int32_t)&v24, (int32_t)&v21, 64);
- v16 = &v19;
- sub_150BB04(v16, (int32_t)&v22, 1024);
- v17 = &v23;
- v18 = &v20;
- sub_A8F788(v17, v18, 1024, 1);
- if (sub_D405A0(v16, v17) == 0)
- {
- return result2;
- }
- if (sub_D3F6AC(v1, v12, v5, v18, 0) != 0)
- {
- result2 = true;
- }
- return result2;
- }
- result = v4;
- int32_t v25;
- int32_t v26 = &v25;
- v2 = v26;
- int32_t v27 = v14;
- int32_t v28 = v14;
- int32_t v29;
- while (true)
- {
- v29 = v27;
- int32_t v30 = v15;
- int32_t v31 = v4;
- int32_t v32 = v26;
- int32_t v33 = v28;
- if ((*(int32_t *)v26 & 2) != 0)
- {
- sub_AE8C70(1176, 0, 48);
- *(char *)1220 = (char)result2;
- *(char *)1221 = (char)result2;
- *(int32_t *)1176 = -1;
- sub_14F6178(1176, result, 46);
- int32_t v34 = v5 + 1;
- v5 = v34;
- v29 = v34;
- v30 = v9;
- v31 = result;
- v32 = v2;
- v33 = v6;
- }
- int32_t v35 = v33 + 1;
- v6 = v35;
- int32_t v36 = v32 + 52;
- v2 = v36;
- int32_t v37 = v31 + 52;
- result = v37;
- if (v35 >= v30)
- {
- break;
- }
- v27 = v29;
- v28 = v35;
- v15 = v30;
- v4 = v37;
- v26 = v36;
- }
- if (v29 == 0)
- {
- return 1;
- }
- v22 = a2;
- v21 = 0x1851618;
- sub_150BB04((int32_t)&v24, (int32_t)&v21, 64);
- v16 = &v19;
- sub_150BB04(v16, (int32_t)&v22, 1024);
- v17 = &v23;
- v18 = &v20;
- sub_A8F788(v17, v18, 1024, 1);
- if (sub_D405A0(v16, v17) != 0)
- {
- if (sub_D3F6AC(v1, v12, v5, v18, 0) != 0)
- {
- result2 = true;
- }
- }
- return result2;
- }
- //sub_D3F6AC(0, "NAME_PADDING", 1, json_context, 0);
- int32_t sub_D3F6AC(int32_t a1, int32_t a2, int32_t a3, int32_t a4, int32_t a5)
- {
- int32_t v1 = loc_150AA70(a1, a2, a3, a4, a5);
- bool result = false;
- char v2 = *(char *)0x1CCB210;
- if (a4 == 0 || v1 > 0 || ((int32_t)(v1 < 0) || (int32_t)(v2 == 0)) != 0 || sub_14F8DD4(a4) <= 0)
- {
- return result;
- }
- int32_t v3 = result;
- bool v4 = true;
- if (*(char *)0x1CCB134 != 0)
- {
- v3 = 0x2005010;
- }
- int32_t v5 = *(int32_t *)v3;
- int32_t v6 = v5;
- if (v5 == 0)
- {
- return result;
- }
- sub_D320D8(v5, 0, 0);
- *(int32_t *)(v6 + 1592) = -1;
- *(int32_t *)v6 = 0x1908950;
- sub_D32030(v6 + 1600, -1, 0x1908950);
- int32_t v7 = result;
- *(int32_t *)(v6 + 3160) = v7;
- *(int32_t *)(v6 + 3164) = v7;
- *(int32_t *)(v6 + 3168) = v7;
- *(int32_t *)(v6 + 28) = v3;
- *(int32_t *)v6 = 0x190BA90;
- if (v6 == 0)
- {
- return result;
- }
- int32_t v8 = v6 + 3164;
- v3 = v8;
- int32_t * v9;
- int32_t v10;
- int32_t v11;
- int32_t v12;
- if (v8 != 0)
- {
- if (*(int32_t *)v8 == 1)
- {
- v10 = v6;
- if (v10 == 0)
- {
- return result;
- }
- v11 = result;
- v12 = v11;
- if (*(char *)0x1CCB134 != 0)
- {
- v12 = v4 ? 0x2005010 : 0;
- }
- v9 = (int32_t *)(v10 + 28);
- if (v12 == *v9)
- {
- *v9 = v11;
- }
- return result;
- }
- }
- if (sub_D38374(v6, v1, a2, a3, a4, a5) != 0)
- {
- if (sub_D29A80(v6, v3) != 0)
- {
- if (sub_D29818(0, v6) == 0)
- {
- v10 = v6;
- if (v10 != 0)
- {
- v11 = result;
- v12 = v11;
- if (*(char *)0x1CCB134 != 0)
- {
- v12 = v4 ? 0x2005010 : 0;
- }
- v9 = (int32_t *)(v10 + 28);
- if (v12 == *v9)
- {
- *v9 = v11;
- }
- }
- }
- else
- {
- result = true;
- }
- return result;
- }
- }
- if (v3 == 0)
- {
- v10 = v6;
- }
- else
- {
- if (*(int32_t *)(v6 + 3164) != 2)
- {
- sub_1524308(v3, 1, 0);
- sub_1524308(v3, 2, -1);
- v10 = v6;
- }
- else
- {
- v10 = v6;
- }
- }
- if (v10 != 0)
- {
- v11 = result;
- v12 = v11;
- if (*(char *)0x1CCB134 != 0)
- {
- v12 = v4 ? 0x2005010 : 0;
- }
- v9 = (int32_t *)(v10 + 28);
- if (v12 == *v9)
- {
- *v9 = v11;
- }
- }
- return result;
- }
- int32_t sub_D6CBC4(int32_t a1, int32_t a2, int32_t * a3)
- {
- int32_t v1 = (int32_t)a3;
- int32_t v2 = loc_150AA78(a1, a2, v1);
- uint28_t v3 = 0;
- int28_t v4 = v2 > 0 ? 0x4000000 : 0;
- int28_t v5 = v2 == 0 ? 0x2000000 : 0;
- int28_t v6 = 0x8000000 * (int28_t)(v2 < 0) | v3 % 0x1000000 | v4 | v5;
- if (a3 == NULL || (v3 & 128) == 0 || v6 < 0)
- {
- return 0;
- }
- bool v7 = true;
- int32_t v8 = *(int32_t *)0x2005010;
- int32_t v9 = v8;
- if (v8 == 0)
- {
- return 0;
- }
- sub_D320D8(v8, 0, 0);
- *(int32_t *)v9 = 0x1908950;
- *(int32_t *)(v9 + 1592) = -1;
- sub_D32030(v9 + 1600, 0x1908950, -1);
- *(int32_t *)(v9 + 3160) = 0;
- *(int32_t *)(v9 + 28) = 0x2005010;
- *(int32_t *)v9 = 0x190B510;
- if (v9 == 0)
- {
- return 0;
- }
- int32_t * v10;
- int32_t v11;
- int32_t v12;
- int32_t v13;
- int32_t v14;
- if (*(int32_t *)v1 != 1)
- {
- if (sub_D37970(v9, v2, a2) != 0)
- {
- if (sub_D29A80(v9, v1) != 0)
- {
- int32_t result = 1;
- if (sub_D29818(0, v9) == 0)
- {
- v11 = v9;
- if (v11 != 0)
- {
- v14 = *(int32_t *)(v11 + 12);
- if (((int32_t)(v14 < 2) ^ 1 || (int32_t)(v14 < 0)) != 0)
- {
- *(int32_t *)(v1 + 4) = -1;
- }
- v13 = 0;
- if (*(char *)0x1CCB134 != 0)
- {
- v13 = v7 ? 0x2005010 : 0;
- }
- v12 = v9;
- if (v12 != 0)
- {
- v10 = (int32_t *)(v12 + 28);
- if (v13 == *v10)
- {
- *v10 = 0;
- result = 0;
- }
- else
- {
- result = 0;
- }
- }
- else
- {
- result = 0;
- }
- }
- else
- {
- result = 0;
- }
- }
- return result;
- }
- }
- if (*(int32_t *)v1 != 2)
- {
- sub_1524308(v1, 1, 0);
- sub_1524308(v1, 2, -1);
- }
- }
- v11 = v9;
- if (v11 == 0)
- {
- return 0;
- }
- v14 = *(int32_t *)(v11 + 12);
- if (((int32_t)(v14 < 2) ^ 1 || (int32_t)(v14 < 0)) != 0)
- {
- *(int32_t *)(v1 + 4) = -1;
- }
- v13 = 0;
- if (*(char *)0x1CCB134 != 0)
- {
- v13 = v7 ? 0x2005010 : 0;
- }
- v12 = v9;
- if (v12 != 0)
- {
- v10 = (int32_t *)(v12 + 28);
- if (v13 == *v10)
- {
- *v10 = 0;
- }
- }
- return 0;
- }
- 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)
- {
- int32_t v1 = (int32_t)a7;
- int32_t v2 = sub_150AA68(a1, a2, a3, a4, a5, a6, v1);
- bool result = false;
- int32_t v3 = 0x2005010;
- int32_t v4 = *(int32_t *)0x2005010;
- int32_t v5 = v4;
- if (v4 == 0)
- {
- return false;
- }
- sub_D320D8(v4, 0, 0);
- *(int32_t *)(v5 + 1592) = -1;
- *(int32_t *)v5 = 0x1908950;
- sub_D32030(v5 + 1600, -1, 0x1908950);
- *(int32_t *)(v5 + 3160) = (int32_t)result;
- *(int32_t *)(v5 + 28) = 0x2005010;
- *(int32_t *)v5 = 0x190A540;
- if (v5 == 0)
- {
- return result;
- }
- int32_t * v6;
- int32_t v7;
- int32_t v8;
- bool result3;
- int32_t v9;
- int32_t v10;
- bool result2;
- int32_t v11;
- if (v1 != 0)
- {
- if (*(int32_t *)v1 == 1)
- {
- v7 = v5;
- if (v7 == 0)
- {
- result2 = result;
- }
- else
- {
- v11 = *(int32_t *)(v7 + 12);
- if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0)
- {
- *(int32_t *)(v1 + 4) = -1;
- }
- result3 = result;
- v8 = result3;
- v10 = v8;
- if (*(char *)0x1CCB134 != 0)
- {
- v10 = v3;
- }
- v9 = v5;
- if (v9 != 0)
- {
- v6 = (int32_t *)(v9 + 28);
- if (v10 == *v6)
- {
- *v6 = v8;
- result2 = result3;
- }
- else
- {
- result2 = result3;
- }
- }
- else
- {
- result2 = result3;
- }
- }
- return result2;
- }
- }
- int32_t v12;
- if (sub_D3310C(v5, v2, a2, a3, a4, a5, a6) == 0)
- {
- v12 = v1;
- if (v12 == 0)
- {
- v7 = v5;
- if (v7 == 0)
- {
- return result;
- }
- v11 = *(int32_t *)(v7 + 12);
- if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0)
- {
- *(int32_t *)(v1 + 4) = -1;
- }
- result3 = result;
- v8 = result3;
- v10 = v8;
- if (*(char *)0x1CCB134 != 0)
- {
- v10 = v3;
- }
- v9 = v5;
- if (v9 != 0)
- {
- v6 = (int32_t *)(v9 + 28);
- if (v10 == *v6)
- {
- *v6 = v8;
- }
- }
- return result3;
- }
- if (*(int32_t *)v12 != 2)
- {
- sub_1524308(v12, 1, 0);
- sub_1524308(v1, 2, -1);
- }
- v7 = v5;
- if (v7 == 0)
- {
- result2 = result;
- }
- else
- {
- v11 = *(int32_t *)(v7 + 12);
- if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0)
- {
- *(int32_t *)(v1 + 4) = -1;
- }
- result3 = result;
- v8 = result3;
- v10 = v8;
- if (*(char *)0x1CCB134 != 0)
- {
- v10 = v3;
- }
- v9 = v5;
- if (v9 != 0)
- {
- v6 = (int32_t *)(v9 + 28);
- if (v10 == *v6)
- {
- *v6 = v8;
- result2 = result3;
- }
- else
- {
- result2 = result3;
- }
- }
- else
- {
- result2 = result3;
- }
- }
- return result2;
- }
- if (sub_D29A80(v5, v1) != 0)
- {
- if (sub_D29818(0, v5) != 0)
- {
- return true;
- }
- v7 = v5;
- if (v7 == 0)
- {
- result2 = result;
- }
- else
- {
- v11 = *(int32_t *)(v7 + 12);
- if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0)
- {
- *(int32_t *)(v1 + 4) = -1;
- }
- result3 = result;
- v8 = result3;
- v10 = v8;
- if (*(char *)0x1CCB134 != 0)
- {
- v10 = v3;
- }
- v9 = v5;
- if (v9 != 0)
- {
- v6 = (int32_t *)(v9 + 28);
- if (v10 == *v6)
- {
- *v6 = v8;
- result2 = result3;
- }
- else
- {
- result2 = result3;
- }
- }
- else
- {
- result2 = result3;
- }
- }
- return result2;
- }
- v12 = v1;
- if (v12 != 0)
- {
- if (*(int32_t *)v12 != 2)
- {
- sub_1524308(v12, 1, 0);
- sub_1524308(v1, 2, -1);
- }
- }
- v7 = v5;
- if (v7 == 0)
- {
- result2 = result;
- }
- else
- {
- v11 = *(int32_t *)(v7 + 12);
- if (((int32_t)(v11 < 2) ^ 1 || (int32_t)(v11 < 0)) != 0)
- {
- *(int32_t *)(v1 + 4) = -1;
- }
- result3 = result;
- v8 = result3;
- v10 = v8;
- if (*(char *)0x1CCB134 != 0)
- {
- v10 = v3;
- }
- v9 = v5;
- if (v9 != 0)
- {
- v6 = (int32_t *)(v9 + 28);
- if (v10 == *v6)
- {
- *v6 = v8;
- result2 = result3;
- }
- else
- {
- result2 = result3;
- }
- }
- else
- {
- result2 = result3;
- }
- }
- return result2;
- }
- /*
- trying to block the blacklist for when youre kicked
- A8BF68
- D232DC
- A8C3F4
- A8B5FC
- A8BBBC
- A8B978
- D11D0C
- D04048 138E5C0 = 4B975A89
- D26100 138E600 = 4B997B01
- 9F8FD8 138E644 = 4B66A995
- //blr = 0x4E800020
- 0xA8BBBC = 0x60850000 //this stops you from joining a new session. not protecting
- 0xA8B978 = 0x80630010 //freeze
- 0x970F28 = 0x7C0802A6 // not protecting
- 0x1358AAC = 0x7C0802A6 //this one protects against it but makes everyone leave
- //nopped
- 0x1358E50 = 4B732D6D
- 0x1358E84 = 4B732AF5
- 0x1358D08 = 4B618221
- 0x1358C08 = 4BFFFEA5
- 0x138F9F0 = 4BFFE6D9 nop //this one protects against it but makes everyone leave
- 0x138F9DC = F821FF91 blr //this one protects against it but makes everyone leave
- 0x138E5BC = 30611AE4 branch 48001418 // //this one protects against it but makes everyone leave
- 0x138E600 = 4B997B01
- 0x138E614 = 483C6B4D //not tried but didnt protect
- 0x138E624 = 4B5E0AF1 //this one protects against it but makes everyone leave
- 0x138E638 = 4BF63621
- 0x138E644 = 4B66A995 //not protecting
- 0x138E670 = 4BFCA43D //this one protects against it but makes everyone leave the curret best
- */
- void func_51()
- {
- int iVar0 = _GET_TOTAL_SC_INBOX_IDS();
- int iVar1 = 0;
- while (iVar1 < iVar0)
- {
- if (!_IS_SC_INBOX_VALID(iVar1))
- {
- Hash iVar2 = _SC_INBOX_MESSAGE_INIT(iVar1);
- printf("SC MESSAGE TYPE: 0x%X\n", iVar2);
- switch (iVar2)
- {
- case 0xCBB12972: // crew_message
- {
- //requires, crewId and crewTag
- printf("crew_message: 0x%X\n", iVar2);
- break;
- }
- case 0xEDF54CE2: // statupdate
- {
- printf("statupdate: 0x%X\n", iVar2);
- break;
- }
- case 0x8C571656: // mission_verified
- {
- printf("mission_verified: 0x%X\n", iVar2);
- break;
- }
- case 0x70E4D0E1: // rockstar_message
- {
- printf("rockstar_message: 0x%X\n", iVar2);
- break;
- }
- case 0x2190F9E1: // ugcstatupdate
- {
- printf("ugcstatupdate: 0x%X\n", iVar2);
- break;
- }
- case 0xD36120CE: // game_award
- {
- //type-> cash or xp
- //amt-> 999999
- //from-> Rockstar
- printf("game_award: 0x%X\n", iVar2);
- break;
- }
- case 0x134AB8CF: // bounty
- {
- printf("bounty: 0x%X\n", iVar2);
- break;
- }
- }
- }
- iVar1++;
- }
- }
- 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)
- {
- int32_t v1 = sub_150AA74(a1, a2, a3, a4, a5, a6, a7, a8);
- int32_t v2 = a7 % 256;
- int32_t v3 = a6 % 256;
- if (*(char *)0x223F0C0 == 0)
- {
- return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
- }
- int32_t v4;
- int32_t v5;
- int32_t v6;
- int32_t v7;
- int32_t v8;
- int32_t v9;
- int32_t v10;
- if (*(int32_t *)0x2183F14 == v1)
- {
- v9 = sub_D25F10((int32_t)&v7, 0);
- v10 = sub_9F858C(v9);
- if (v10 == 0)
- {
- v6 = sub_12EF35C();
- sub_131BC34(v10, v6, a4, v1);
- return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
- }
- rand();
- v4 = v8;
- if (*(int32_t *)(sub_9F8604(0x2FB220, 0x300000) + 0x300000) != 0)
- {
- v5 = sub_1545344();
- reportCashSpawnfn(v4, a4, v1, v5);
- return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
- }
- v6 = sub_12EF35C();
- sub_131BC34(v4, v6, a4, v1);
- return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
- }
- if (*(int32_t *)0x2183F18 == v1 || *(int32_t *)0x2183F1C == v1 || *(int32_t *)0x2183F20 == v1 || *(int32_t *)0x2183F24 == v1 || *(int32_t *)0x2183F28 == v1)
- {
- v9 = sub_D25F10((int32_t)&v7, 0);
- v10 = sub_9F858C(v9);
- v4 = v10;
- if (v10 != 0)
- {
- rand();
- v4 = v8;
- if (*(int32_t *)(sub_9F8604(0x2FB220, 0x300000) + 0x300000) != 0)
- {
- v5 = sub_1545344();
- reportCashSpawnfn(v4, a4, v1, v5);
- return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
- }
- }
- v6 = sub_12EF35C();
- sub_131BC34(v4, v6, a4, v1);
- return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
- }
- if (*(int32_t *)0x2183F2C != v1)
- {
- return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
- }
- v9 = sub_D25F10((int32_t)&v7, 0);
- v10 = sub_9F858C(v9);
- v4 = v10;
- if (v10 != 0)
- {
- rand();
- v4 = v8;
- if (*(int32_t *)(sub_9F8604(0x2FB220, 0x300000) + 0x300000) != 0)
- {
- v5 = sub_1545344();
- reportCashSpawnfn(v4, a4, v1, v5);
- return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
- }
- }
- v6 = sub_12EF35C();
- sub_131BC34(v4, v6, a4, v1);
- return sub_3FA198(v1, a2, a3, a4, a5, v3, v2);
- }
- /*
- r0=000000000019660D r8=00000000100000A0 r16=0000000000000000 r24=0000000000000000
- r1=00000000D003F610 r9=00000000100001C4 r17=00000000D0040430 r25=0000000000000001
- r2=0000000001C85330 r10=00000000100001B0 r18=0000000035F680D8 r26=DEF76158880A67D9
- r3=DEF76158880A67D9 r11=0007213E023A5975 r19=0000000001CC2FA8 r27=FFFFFFFFCE6FDD6B
- r4=0000000000009C40 r12=0000000002290308 r20=0000000032293664 r28=0000000010069664
- r5=FFFFFFFFCE6FDD6B r13=0000000010007060 r21=0000000035F68000 r29=0000000000000000
- r6=0000000000000005 r14=0000000000000000 r22=0000000001E70370 r30=0000000000009C40
- r7=00000000100001AC r15=0000000000000000 r23=00000000320A8DC0 r31=00000000113FD533
- xer=0000000000000000 ctr=000000000227512C lr=00000000003FA628 fpscr=BF324500
- cr=48000044 cr0=GT cr1=LT cr2= cr3= cr4= cr5= cr6=GT cr7=GT
- pc=00000000012D73D8
- */
- //model hash is in r31
- GAME_EXPORT int32_t reportCashSpawnfn(int32_t a1, int32_t amount, int32_t pickup_hash_0xFFFFFFFFCE6FDD6B, int32_t ret_sub_1545344);
- GAME_EXPORT int32_t sub_1545344(int32_t cNetGamePlayer);
- void report_player_test()
- {
- int32_t _rand = rand();
- printf("rand: 0x%X\n", _rand);
- int32_t v5 = sub_1545344(CNetGamePlayerFn(iSelectedPlayer, 1));
- reportCashSpawnfn(_rand, 40000, 0xFFFFFFFFCE6FDD6B, v5);
- }
- GAME_EXPORT char* GetLabelTextByGXTFunc(address, gxt_label); // 0xD914CC
- char backup_GetLabelTextByGXT[4 * 4];
- char *_MY_GetLabelTextByGXT(int32_t unk_20668B0, char *label_name)
- {
- printf("unk_20668B0: 0x%X\n", unk_20668B0);
- printf("label_name: %s\n", label_name);
- //backup hook, revert, call, hook
- char backup_hook[4 * 4];
- WriteProcessMemory(backup_hook, (const void *)0xD914CC, 4 * 4);
- WriteProcessMemory((void *)0xD914CC, backup_GetLabelTextByGXT, 4 * 4);
- char *ret = GetLabelTextByGXTFunc(unk_20668B0, label_name);
- WriteProcessMemory((void *)0xD914CC, backup_hook, 4 * 4);
- return ret;
- }
- WriteProcessMemory(backup_GetLabelTextByGXT, (const void *)0xD914CC, 4 * 4);
- PatchInJump(0xD914CC, (int)_MY_GetLabelTextByGXT, false);
- //nop all if you freeze
- 00A51B60;
- 0A51B6C;
- 0A51B74;
- 00A51B74;
- 000A51B78;
- 0A51B84;
- 00A51B88;
- 00A51B8C;
- 0A51B94;
- 0A51B98;
- 0A51BA4;
- 00A51BB0;
- 0A51BB4;
- 00A51BBC;
- 0A51BC0;
- 0A51BC4;
- 0A51BC8;
- 0A51BD0;
- 00A51BD4;
- 0A51BEC;
- 00A51BF8;
- //texture freeze protection
- //0x12D30D8 = 0x60000000;
- //0x12D3118 = 0x60000000;
- /*
- Rage::Import
- 0xD095A365
- platform:/levels/gta5/scenario/Alamo_Sea.cmt
- 1
- 0
- 1
- 0
- 0xD09A5563
- platform:/levels/gta5/streaming/ah_1_int_srl.cmt
- 1
- ah_1_int_srl.cmt
- 0
- 1
- 0xD09EA573
- dlcMPHeist:/ps3/levels/gta5/streaming/heist_int_srl.cmt
- 1
- heist_int_srl.cmt
- 0
- 1
- */
- //using sc features with out being in game
- //make a post respones
- // https://socialclub.rockstargames.com/crew/crew_message
- // {"crewId":39499191,"message":"hello world","nickname":""}
- my crew details
- dob: 5/5/1999
- name: crew_message
- email: crew_message@yopmail.com
- pass: Crew_message1
- static size_t _wcslen(const wchar_t *s)
- {
- const wchar_t *p;
- p = s;
- while (*p)
- p++;
- return p - s;
- }
- static int _wcslen(char *str)
- {
- int nullCount = 0;
- int i = 0;
- for (i = 0; i < 64; i++)
- {
- if (nullCount == 2)
- {
- break;
- }
- if (*(str + i) == 0x00)
- {
- nullCount++;
- }
- else
- {
- nullCount = 0;
- }
- }
- return i;
- }
- static size_t StringToWideCharacter(wchar_t *dest, const char *scr, size_t len)
- {
- int count = 0;
- if (len)
- {
- do
- {
- if ((*dest++ = (wchar_t)*scr++) == 0)
- break;
- count++;
- } while (--len);
- }
- return count;
- }
- static size_t WideCharacterToString(char *dest, const wchar_t *scr, size_t len)
- {
- int count = 0;
- if (len)
- {
- do
- {
- if ((*dest++ = (char)*scr++) == 0)
- break;
- count++;
- } while (--len);
- }
- return count;
- }
- //#define InitializeCriticalSection(lpCriticalSection) pthread_mutex_init(lpCriticalSection, NULL)
- //#define DeleteCriticalSection(lpCriticalSection) pthread_mutex_destroy(lpCriticalSection)
- //#define EnterCriticalSection(lpCriticalSection) pthread_mutex_lock(lpCriticalSection)
- //#define LeaveCriticalSection(lpCriticalSection) pthread_mutex_unlock(lpCriticalSection)
- //pthread_mutex_t DetourAsmSection;
- //#define InitializeCriticalSection(lpCriticalSection) sys_lwmutex_create(lpCriticalSection, NULL)
- //#define DeleteCriticalSection(lpCriticalSection) sys_lwmutex_destroy(lpCriticalSection)
- //#define EnterCriticalSection(lpCriticalSection) sys_lwmutex_lock(lpCriticalSection, 0)
- //#define LeaveCriticalSection(lpCriticalSection) sys_lwmutex_unlock(lpCriticalSection)
- //sys_lwmutex_t DetourAsmSection;
- int32_t sub_A5660C(int32_t a1)
- {
- int32_t v1 = __savegprlr_26(); // 0x150AA7C
- int32_t v2 = v1;
- int32_t * v3 = (int32_t *)(v1 + 140);
- uint32_t v4 = *v3;
- if (v4 >= 1)
- {
- int32_t v5 = v4 - *(int32_t *)0x1EC673C;
- *v3 = v5 < 0 ? 0 : v5;
- v1 = v2;
- }
- int32_t v6 = *(int32_t *)(v1 + 52);
- int32_t v7;
- int32_t v8;
- int32_t v9;
- int32_t v10;
- int32_t v11;
- int32_t v12;
- int32_t v13;
- int32_t v14;
- int32_t result2;
- int32_t result;
- int32_t result3;
- int32_t v15;
- int32_t v16;
- int32_t v17;
- int32_t v18;
- int32_t v19;
- int32_t v20;
- int32_t v21;
- if (v6 == 0)
- {
- result = __asm_rlwinm((int32_t)*(char *)(v1 + 173), 30, 31, 31);
- if (result == 0)
- {
- return 0;
- }
- v11 = v2;
- v17 = *(int32_t *)(v11 + 28);
- if (v17 == 0)
- {
- return result;
- }
- v18 = *(int32_t *)(v17 + 8);
- if (v18 == 0)
- {
- v13 = v11;
- if (*(int32_t *)(v17 + 8) != 0)
- {
- v20 = *(int32_t *)(v13 + 140);
- if (v20 == 0)
- {
- int32_t l_var = sub_15BA0E4(v20);
- v21 = *(int32_t *)(v13 + 28);
- v7 = 0;
- if (v21 != 0)
- {
- v7 = *(int32_t *)(v21 + 8);
- }
- v15 = &v8;
- sub_A8B814(v15);
- v16 = &v9;
- sub_A8B908(v15, v16, 982);
- if (aub_1626844(*(int32_t *)0x1EC69C8, v15) == 0)
- {
- sub_46E30C(l_var, unk);
- }
- else
- {
- sub_A8B978(v15);
- v14 = sub_9F8E10();
- sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0);
- }
- *(int32_t *)(v2 + 140) = 250;
- result2 = 250;
- }
- else
- {
- result2 = v20;
- }
- }
- else
- {
- result2 = 0;
- }
- return result2;
- }
- result3 = aub_9F8FD8(v18);
- v12 = v2;
- v19 = *(int32_t *)(v12 + 28);
- if (result3 != 0 || v19 == 0)
- {
- return result3;
- }
- v13 = v12;
- if (*(int32_t *)(v19 + 8) != 0)
- {
- v20 = *(int32_t *)(v13 + 140);
- if (v20 == 0)
- {
- v21 = *(int32_t *)(v13 + 28);
- v7 = 0;
- if (v21 != 0)
- {
- v7 = *(int32_t *)(v21 + 8);
- }
- v15 = &v8;
- sub_A8B814(v15);
- v16 = &v9;
- sub_A8B908(v15, v16, 982);
- if (sub_1626844(*(int32_t *)0x1EC69C8, v15) == 0)
- {
- }
- else
- {
- sub_A8B978(v15);
- v14 = sub_9F8E10();
- sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0);
- }
- *(int32_t *)(v2 + 140) = 250;
- result2 = 250;
- }
- else
- {
- result2 = v20;
- }
- }
- else
- {
- result2 = 0;
- }
- return result2;
- }
- if (sub_9D8FD8(v6) != 0)
- {
- int32_t result4 = *(int32_t *)(v2 + 12);
- if (result4 != 0)
- {
- return result4;
- }
- int32_t v22 = (int32_t)*(char *)(v2 + 173);
- if (__asm_rlwinm(v22, 31, 31, 31) == 0)
- {
- int32_t v23 = __asm_rlwinm(v22, 25, 31, 31);
- if (v23 == 0)
- {
- result2 = v2;
- }
- else
- {
- result2 = v23;
- }
- }
- else
- {
- int32_t v24 = *(int32_t *)(v2 + 140);
- if (v24 == 0)
- {
- if (*(int32_t *)(*(int32_t *)0x1CC57B8 + 36) != 0)
- {
- int32_t l_var = sub_15BA0E4(a1 + 4);
- sub_46E098(l_var);
- }
- *(int32_t *)(v2 + 52) = 0;
- result2 = sub_A563E4(v2, 0);
- }
- else
- {
- result2 = v24;
- }
- }
- return result2;
- }
- result = __asm_rlwinm((int32_t)*(char *)(v2 + 173), 30, 31, 31);
- if (result == 0)
- {
- return 0;
- }
- v11 = v2;
- v17 = *(int32_t *)(v11 + 28);
- if (v17 == 0)
- {
- //return sub_483F50(r3, r4, r5, r6, r7, r8);
- }
- v18 = *(int32_t *)(v17 + 8);
- if (v18 == 0)
- {
- v13 = v11;
- if (*(int32_t *)(v17 + 8) != 0)
- {
- v20 = *(int32_t *)(v13 + 140);
- if (v20 == 0)
- {
- v21 = *(int32_t *)(v13 + 28);
- v7 = 0;
- if (v21 != 0)
- {
- v7 = *(int32_t *)(v21 + 8);
- }
- v15 = &v8;
- sub_A8B814(v15);
- v16 = &v9;
- sub_A8B908(v15, v16, 982);
- if (sub_1626844(*(int32_t *)0x1EC69C8, v15) == 0)
- {
- }
- else
- {
- sub_A8B978(v15);
- v14 = sub_9F8E10();
- sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0);
- }
- *(int32_t *)(v2 + 140) = 250;
- result2 = 250;
- }
- else
- {
- result2 = v20;
- }
- }
- else
- {
- result2 = 0;
- }
- }
- else
- {
- result3 = sub_9F8FD8(v18);
- v12 = v2;
- v19 = *(int32_t *)(v12 + 28);
- if (result3 == 0 && v19 != 0)
- {
- v13 = v12;
- if (*(int32_t *)(v19 + 8) != 0)
- {
- v20 = *(int32_t *)(v13 + 140);
- if (v20 == 0)
- {
- v21 = *(int32_t *)(v13 + 28);
- v7 = 0;
- if (v21 != 0)
- {
- v7 = *(int32_t *)(v21 + 8);
- }
- v15 = &v8;
- sub_A8B814(v15);
- v16 = &v9;
- sub_A8B908(v15, v16, 982);
- if (sub_1626844(*(int32_t *)0x1ec69c8, v15) == 0)
- {
- }
- else
- {
- sub_A8B978(v15);
- v14 = sub_9F8E10();
- sub_9F8FF0(v14, v7, v16, 1, (int32_t)&v10, 0);
- }
- *(int32_t *)(v2 + 140) = 250;
- result2 = 250;
- }
- else
- {
- result2 = v20;
- }
- }
- else
- {
- result2 = 0;
- }
- }
- else
- {
- result2 = result3;
- }
- }
- return result2;
- }
- GlobalVariable::Set(1312638, 1);
- GlobalVariable::Set(2403258, 1);
- int Global_1312376 = GlobalVariable::Get(1312376);
- SET_BIT(&Global_1312376, 0);
- SET_BIT(&Global_1312376, 5);
- GlobalVariable::Set(1312376 + 2, 0); // leaves but gets stuck in sky
- GlobalVariable::Set(1312413, 1);
- GlobalVariable::Set(1315318, 0);
- GlobalVariable::Set(19940, 0);
- GlobalVariable::Set(1315298, 32);
- GlobalVariable::Set(1315299, 19); // leaves but gets stuck in sky
- GlobalVariable::Set(1312629, 1); //R* server are unavailable
- GlobalVariable::Set(1312623, 1);//servers are in maintenance
- GlobalVariable::Set(1312631, 1); //has player been kicked by others
- GlobalVariable::Set(2404047, 1); //is player cheater
- // block mission circles
- 0x159A64C = 0x4E800020; // on
- 0x159A64C = 0x7C0802A6; // off
- // sobiet threads and times called
- // TODO: find correct names for these hashes
- enum Threads
- {
- THREAD_pausemenu_map = 0x2CA4F81B, //6
- THREAD_pausemenu_sp_repeat = 0x5B2DB305, //17
- THREAD_chop = 0xFA543B0A, //82
- THREAD_startup_positioning = 0x6D3E6ACB, //82
- THREAD_email_controller = 0xFE612F1E, // //226
- THREAD_controller_taxi = 0xFDE8F81F, // 226
- THREAD_randomchar_controller = 0xFBD2C1A5, // 226
- THREAD_friends_controller = 0xF989DB20, // 226
- THREAD_bootycallhandler = 0xF92CFEBD, // 226
- THREAD_clothes_shop_sp = 0xF8A3166B, // 226
- THREAD_cellphone_controller = 0xF292D030, // 226
- THREAD_ob_tv = 0xF0DE819B, // 226
- THREAD_achievement_controller = 0xDF034893, // 226
- THREAD_player_controller = 0xDAB812BA, // 226
- THREAD_comms_controller = 0xD96D699D, // 226
- THREAD_restrictedareas = 0xD8DD2E81, // 226
- THREAD_pickup_controller = 0xD21EB4B0, // 226
- THREAD_COMMON14 = 0xD1F9D9C5, // 226
- THREAD_COMMON15 = 0xC9910456, // 226
- THREAD_stock_controller = 0xC9833B07, // 226
- THREAD_ingamehud = 0xC45650F0, // 226
- THREAD_controller_ambientarea = 0xB7250D07, // 226
- THREAD_player_controller_b = 0xB6B491B8, // 226
- THREAD_family_scene_f0 = 0xB3F41E6B, // 226
- THREAD_cheat_controller = 0xAFD9916D, // 226
- THREAD_flow_help = 0xADE8F290, // 226
- THREAD_flow_controller = 0x9CD55718, // 226
- THREAD_stats_controller = 0x94A1CA9D, // 226
- THREAD_dialogue_handler = 0x90EFDCAD, // 226
- THREAD_launcher_carwash = 0x8A6A7147, // 226
- THREAD_event_controller = 0x8668B4C2, // 226
- THREAD_savegame_bed = 0x84CA83CD, // 226
- THREAD_completionpercentage_controller = 0x81378091, // 226
- THREAD_blip_controller = 0x80CFE974, // 226
- THREAD_wardrobe_sp = 0x80925960, //226
- THREAD_pi_menu = 0x79120DE3, // 226
- THREAD_selector = 0x76F8DF52, // 226
- THREAD_context_controller = 0x75B7261C, // 226
- THREAD_candidate_controller = 0x678B6D24, // 226
- THREAD_main_persistent = 0x5700179C, // 226
- THREAD_COMMON37 = 0x561C3D14, // 226
- THREAD_code_controller = 0x43F6C374, // 226
- THREAD_emergencycalllauncher = 0x3E74E99B, // 226
- THREAD_taxilauncher = 0x3C621FC5, // 226
- THREAD_shop_controller = 0x39DA738B, // 226
- THREAD_mission_triggerer_a = 0x2B1D6274, // 226
- THREAD_main = 0x27EB33D7, // 226
- THREAD_building_controller = 0x2495FCB6, // 226
- THREAD_shoprobberies = 0x21A8101D, // 226
- THREAD_pb_prostitute = 0x6A96798A // 503
- };
- typedef struct {
- double r; // a fraction between 0 and 1
- double g; // a fraction between 0 and 1
- double b; // a fraction between 0 and 1
- } rgb;
- typedef struct {
- double h; // angle in degrees
- double s; // a fraction between 0 and 1
- double v; // a fraction between 0 and 1
- } hsv;
- hsv rgb2hsv(rgb in);
- rgb hsv2rgb(hsv in);
- hsv UIManager::rgb2hsv(rgb in)
- {
- hsv out{};
- double min, max, delta;
- min = in.r < in.g ? in.r : in.g;
- min = min < in.b ? min : in.b;
- max = in.r > in.g ? in.r : in.g;
- max = max > in.b ? max : in.b;
- out.v = max; // v
- delta = max - min;
- if (delta < 0.00001)
- {
- out.s = 0;
- out.h = 0; // undefined, maybe nan?
- return out;
- }
- if (max > 0.0) { // NOTE: if Max is == 0, this divide would cause a crash
- out.s = (delta / max); // s
- }
- else {
- // if max is 0, then r = g = b = 0
- // s = 0, h is undefined
- out.s = 0.0;
- out.h = NAN; // its now undefined
- return out;
- }
- if (in.r >= max) // > is bogus, just keeps compilor happy
- out.h = (in.g - in.b) / delta; // between yellow & magenta
- else
- if (in.g >= max)
- out.h = 2.0 + (in.b - in.r) / delta; // between cyan & yellow
- else
- out.h = 4.0 + (in.r - in.g) / delta; // between magenta & cyan
- out.h *= 60.0; // degrees
- if (out.h < 0.0)
- out.h += 360.0;
- return out;
- }
- rgb UIManager::hsv2rgb(hsv in)
- {
- double hh, p, q, t, ff;
- long i;
- rgb out{};
- if (in.s <= 0.0) { // < is bogus, just shuts up warnings
- out.r = in.v;
- out.g = in.v;
- out.b = in.v;
- return out;
- }
- hh = in.h;
- if (hh >= 360.0) hh = 0.0;
- hh /= 60.0;
- i = (long)hh;
- ff = hh - i;
- p = in.v * (1.0 - in.s);
- q = in.v * (1.0 - (in.s * ff));
- t = in.v * (1.0 - (in.s * (1.0 - ff)));
- switch (i) {
- case 0:
- out.r = in.v;
- out.g = t;
- out.b = p;
- break;
- case 1:
- out.r = q;
- out.g = in.v;
- out.b = p;
- break;
- case 2:
- out.r = p;
- out.g = in.v;
- out.b = t;
- break;
- case 3:
- out.r = p;
- out.g = q;
- out.b = in.v;
- break;
- case 4:
- out.r = t;
- out.g = p;
- out.b = in.v;
- break;
- case 5:
- default:
- out.r = in.v;
- out.g = p;
- out.b = q;
- break;
- }
- return out;
- }
- for (double i = 0; i <= 360; i++)
- {
- hsv h{ i, 1, 1 };
- rgb col = hsv2rgb(h);
- m_HeaderBackgroundColor.r = (uint8_t)(int32_t)(col.r * 255.0f);
- m_HeaderBackgroundColor.g = (uint8_t)(int32_t)(col.g * 255.0f);
- m_HeaderBackgroundColor.b = (uint8_t)(int32_t)(col.b * 255.0f);
- m_SubmenuBarBackgroundColor.r = (uint8_t)(int32_t)(col.r * 255.0f);
- m_SubmenuBarBackgroundColor.g = (uint8_t)(int32_t)(col.g * 255.0f);
- m_SubmenuBarBackgroundColor.b = (uint8_t)(int32_t)(col.b * 255.0f);
- m_FooterBackgroundColor.r = (uint8_t)(int32_t)(col.r * 255.0f);
- m_FooterBackgroundColor.g = (uint8_t)(int32_t)(col.g * 255.0f);
- m_FooterBackgroundColor.b = (uint8_t)(int32_t)(col.b * 255.0f);
- m_DescriptionBackgroundColor.r = (uint8_t)(int32_t)(col.r * 255.0f);
- m_DescriptionBackgroundColor.g = (uint8_t)(int32_t)(col.g * 255.0f);
- m_DescriptionBackgroundColor.b = (uint8_t)(int32_t)(col.b * 255.0f);
- m_InfoPaneHeaderColor.r = (uint8_t)(int32_t)(col.r * 255.0f);
- m_InfoPaneHeaderColor.g = (uint8_t)(int32_t)(col.g * 255.0f);
- m_InfoPaneHeaderColor.b = (uint8_t)(int32_t)(col.b * 255.0f);
- }
- void AskHostToKickPlayer()
- {
- if (IsSessionHost() == 0) // make sure we are not the host
- {
- uintptr_t netGamePlayerHost = GetNetGamePlayerOfHost();
- if (netGamePlayerHost)
- {
- PrepareReply(&local_90);
- uVar3 = 0x3D6;
- PrepareExtraData(&local_90, auStack1152, 0x3D6);
- l_hash = WriteSerializeMessageId(DAT_02258b90, &local_90);
- bVar2 = false;
- if (l_hash != 0)
- {
- uVar3 = 0;
- if ((-1 < (char)local_78) && (uVar3 = 0, local_84 + 8 <= local_88))
- {
- if ((local_78 >> 6 & 1) == 0)
- {
- WriteSerializeData((ulonglong)local_90, 4, 8, (longlong)(local_84 + local_8c));
- }
- WriteSerializeDataOfSize(&local_90, 8);
- uVar3 = 1;
- }
- bVar2 = false;
- if ((int)uVar3 != 0)
- {
- bVar2 = true;
- }
- }
- if (((int)register0x00000008 != 0xa8) && (uVar3 = 0, bVar2))
- {
- uVar3 = GetSerialization_CurrentBitFlag(&local_90);
- }
- if (bVar2)
- {
- SendReliableCommand_3(netGamePlayerHost, auStack1152, uVar3, 0, 0, 0);
- }
- }
- }
- }
- struct PeerIdentification
- {
- uint32_t part1;
- uint32_t part2;
- uint16_t part3;
- uint16_t part4;
- uint32_t part5;
- uint32_t remoteIp;
- uint16_t remotePort;
- uint16_t part8;
- };
- GAME_EXPORT uintptr_t GetNetGamePlayerOfHost(); // 0x12F6D7C
- GAME_EXPORT void PrepareReply(uintptr_t* netMsg); // 0xA8B814
- GAME_EXPORT void PrepareExtraData(uintptr_t* netMsg, uintptr_t* buffer, size_t size); // 0xA8B908
- GAME_EXPORT uint32_t WriteSerializeMessageId(uint32_t msgId, uintptr_t buffer_0xC); // 0x1626844
- GAME_EXPORT uint32_t WriteSerializeData(uintptr_t* bitBuffer, uint32_t bits, uint32_t size, uint32_t a4); // 0xA8B5FC
- GAME_EXPORT uint32_t WriteSerializeDataOfSize(uintptr_t* bitBuffer, uint32_t size); // 0xA8BBBC
- GAME_EXPORT uint32_t GetSerialization_CurrentBitFlag(uintptr_t* bitBuffer); // 0xA8B978
- 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
- // receive function can be found here 0x13E0C38. only the host can receive it for obvious reasons
- // clean it up a little
- void AskHostToKickPlayer(Player player)
- {
- if (!IsSessionHost()) // make sure we are not the host
- {
- uintptr_t netGamePlayerHost = GetNetGamePlayerOfHost();
- if (netGamePlayerHost)
- {
- rage::BitBuffer bitBuf;
- PrepareReply(&bitBuf);
- uint8_t rawReply[50];
- PrepareExtraData(&bitBuf, rawReply, 0x3D6);
- uintptr_t msgRequestKickFromHostPtr = 0x2258B88;
- uint32_t msgIdRequestKickFromHost = *(uint32_t*)(msgRequestKickFromHostPtr + 0x8);
- uint32_t result = WriteSerializeMessageId(msgIdRequestKickFromHost, &bitBuf);
- if (result)
- {
- uint32_t kick_type = 4; // admin kick
- uint32_t ret = rage::CSyncDataWriter->WriteByte(&bitBuf, &kick_type, 8);
- if (ret != 0)
- {
- uint32_t ret = GetSerialization_CurrentBitFlag(&bitBuf);
- SendReliableCommand_3(netGamePlayerHost, bitBuf.m_data, ret, 0, 0, 0);
- }
- }
- }
- }
- }
- class EmptyClass
- {
- public:
- uint32_t m_1;
- uint32_t m_2;
- uint32_t m_3;
- uint32_t m_4;
- uint32_t m_5;
- uint32_t m_6;
- uint32_t m_7;
- uint32_t m_8;
- uint32_t m_9;
- uint32_t m_10;
- uint32_t m_11;
- uint32_t m_12;
- };
- class BitBuffer
- {
- public:
- EmptyClass* m_data; // 0x0000
- uint32_t m_f8; // 0x0004
- uint32_t m_maxBit; // 0x0008
- uint32_t m_unkBit; // 0x000C
- uint32_t m_curBit; // 0x0010
- uint32_t m_unk2Bit; // 0x0014
- uint8_t m_flagBits; // 0x0018
- }; // Size=0x0018
- bool SyncDataWriter_WriteByte(BitBuffer* data, uint8_t* value, size_t size)
- {
- bool result = false;
- if (((data->m_flagBits >> 7) & 1) == 0)
- {
- if (data->m_unkBit + 8 <= data->m_maxBit)
- {
- if (((data->m_flagBits >> 6) & 1) == 0)
- WriteSerializeData(data->m_data, *value, size, data->m_unkBit + data->m_f8);
- WriteSerializeDataOfSize(data, size);
- result = true;
- }
- }
- return result;
- }
- GAME_EXPORT uint32_t WriteNetMessage_RemoveGamersFromSessionCmd(uintptr_t* a1, uintptr_t* netMsg); // 0x1626A4C
- GAME_EXPORT void SendUnreliableCommand(uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uint32_t a5, uint32_t a6); // 0xD122B4
- GAME_EXPORT void SendReliableCommand_5(uintptr_t a1, uintptr_t a2, uintptr_t a3, uintptr_t a4, uint32_t a5, uint32_t a6); // 0xD15F28
- void RemoveGamerCommandV1()
- {
- BitBuffer reply;
- PrepareReply(&reply);
- uint8_t rawReply[50];
- PrepareExtraData(&reply, rawReply, 0x3D6);
- uint8_t removeGamerReply[50]; // this is a structure and needs some function to generate the values
- if (WriteNetMessage_RemoveGamersFromSessionCmd(removeGamerReply, &reply))
- {
- uint32_t ret = GetSerialization_CurrentBitFlag(&reply);
- SendUnreliableCommand(rage::netConnectionManager*, peerIdentifier, someSize, bitBuf.m_data, ret, 0x1000000);
- }
- }
- void RemoveGamerCommandV2()
- {
- BitBuffer reply;
- PrepareReply(&reply);
- uint8_t rawReply[50];
- PrepareExtraData(&reply, rawReply, 0x3CF);
- uint8_t removeGamerReply[50]; // this is a structure and needs some function to generate the values
- if (WriteNetMessage_RemoveGamersFromSessionCmd(removeGamerReply, &reply))
- {
- uint32_t ret = GetSerialization_CurrentBitFlag(&reply);
- SendReliableCommand_5(v11 + 0x1EF8, v35, v66, ret, 0, 0);
- }
- }
- bool DoesPlayerHaveSuperJump(Player player)
- {
- // 22 jumps normal
- // 19 jumps normal
- // 20 jumps normal
- // 19 jumps normal
- // 19 jumps normal
- // 38 jumps of top of tall vehicle
- // 33 jumps of top of tall vehicle
- // 29 super jump
- // 39 super jump
- // 42 super jump
- // 96 super jump max
- // 89 super jump
- // 90 super jump
- // 91 super jump
- // 96 super jump
- // 95 super jump
- // 524 when player jumped off maze bank then died
- static int jumplength = 0;
- if (IS_PED_JUMPING(GET_PLAYER_PED(player)))
- jumplength++;
- printf("%d jump ticks on player %d\n", jumplength, player);
- if (jumplength > 40)
- {
- printf("player %d has super jump %d\n", player, jumplength);
- jumplength = 0;
- return true;
- }
- return false;
- }
Add Comment
Please, Sign In to add comment