IlDivinoGlade

GTA V 1.27 – Random Stuff

Jul 16th, 2025 (edited)
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 7.34 KB | None | 0 0
  1. discord: @gladeildivino
  2.  
  3.  
  4. this cause freeze to other player, easy patch it. (changes the clouds)
  5. 0xED88FC61 void LOAD_CLOUD_HAT(char* name, float transitionTime)
  6. Example: LOAD_CLOUD_HAT("CONTRAILS", 0.0f);
  7.  
  8.  
  9. void ChangeIP()
  10. {
  11.     // Base pointer to PSN / Network Info structure
  12.     // 0x1CF7304 likely holds a pointer to the full network info block (psn_ptr)
  13.     unsigned char *networkDataPtr = (unsigned char *)(*(uint32_t *)0x1CF7304 );
  14.  
  15.     // Generate a fake local IP (bytes 0–3 in the structure)
  16.     unsigned char localIP[4];
  17.     localIP[0] = (rand() % 256);
  18.     localIP[1] = (rand() % 256);
  19.     localIP[2] = (rand() % 256);
  20.     localIP[3] = (rand() % 256);
  21.  
  22.     // Generate a fake public IP (bytes 4–7 in the structure)
  23.     unsigned char publicIP[4];
  24.     publicIP[0] = (rand() % 256);
  25.     publicIP[1] = (rand() % 256);
  26.     publicIP[2] = (rand() % 256);
  27.     publicIP[3] = (rand() % 256);
  28.  
  29.     // Write spoofed IPs into memory
  30.     networkDataPtr[0] = localIP[0];
  31.     networkDataPtr[1] = localIP[1];
  32.     networkDataPtr[2] = localIP[2];
  33.     networkDataPtr[3] = localIP[3];
  34.  
  35.     networkDataPtr[4] = publicIP[0];
  36.     networkDataPtr[5] = publicIP[1];
  37.     networkDataPtr[6] = publicIP[2];
  38.     networkDataPtr[7] = publicIP[3];
  39.  
  40.     // Output spoofed IPs to console
  41.     printf("Local IP spoofed to: %d.%d.%d.%d\n", localIP[0], localIP[1], localIP[2], localIP[3]);
  42.     printf("Public IP spoofed to: %d.%d.%d.%d\n", publicIP[0], publicIP[1], publicIP[2], publicIP[3]);
  43. }
  44.  
  45. The address 0x1CF7304 holds a large structure related to your network identity.
  46.  
  47. It includes:
  48.  
  49. Your local IP address
  50.  
  51. Your public IP address
  52.  
  53. Your PSN name
  54.  
  55. Possibly more sensitive or spoofable networking data.
  56.  
  57. You’ll likely face issues in story mode if you spoof the IP there — crashes or disconnects are possible.
  58.  
  59. Best tips:
  60.  
  61. Go online (pvt session) first, then spoof your IP.
  62.  
  63. After spoofing, switch sessions.
  64.  
  65. You may be looking for the real pointer to the actual IP struct.
  66.  
  67. Based on analysis:
  68.  
  69. uint32_t networkInfoPtr = *(uint32_t*)(0x1CF7304 + 0x54); // Could be the IP struct
  70. However, a more reliable guess might be:
  71.  
  72. uint32_t networkInfoPtr = *(uint32_t*)(0x1CF7304 + 0x88);
  73. Once found, the layout will likely follow this structure:
  74.  
  75. +0x00 → Local IP (4 bytes)
  76.  
  77. +0x04 → Public IP (4 bytes)
  78.  
  79. Additional fields (NAT type, PSN ID, etc.)
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92. 01CF72BC CNetworkPlayerMgr_ptr
  93.  
  94. Manages the migration of a player's physical index (e.g., changing slots or internal network positions). This may affect the host or resource management.
  95.  
  96. void MigratePhysicalIndex(int player) // this cause kick on player. Called "Disconnect Kick"
  97. {
  98.     if (player != PLAYER::PLAYER_ID())
  99.     {
  100.         uint32_t network_player_mgr = *(uint32_t*)0x1CF72BC;
  101.         if (network_player_mgr != NULL)
  102.         {
  103.             int player_ped = PLAYER::GET_PLAYER_PED(player);
  104.             if (ENTITY::DOES_ENTITY_EXIST(player_ped))
  105.             {
  106.                 uint32_t net_game_player = GetNetGamePlayer(player, 1);
  107.                 if (net_game_player != NULL)
  108.                 {
  109.                     call<void>(0x1340964)(network_player_mgr, net_game_player); // CNetworkPlayerMgr_MigratePhysicalIndex
  110.                 }
  111.             }
  112.         }
  113.     }
  114. }
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123. // my method used for block entities, can you use in 0x133D6EC (CNetworkObjectMgr::HandleCloneSync)
  124. if (BlockAllEntities) // psss: you can block every single entities (so, select from menu what entity you want block) by using multiple array and your brain
  125. {
  126.     switch (syncPool) // r6
  127.     {
  128.     case NET_OBJ_TYPE_AUTOMOBILE:
  129.     case NET_OBJ_TYPE_BIKE:
  130.     case NET_OBJ_TYPE_BOAT:
  131.     case NET_OBJ_TYPE_DOOR:
  132.     case NET_OBJ_TYPE_HELI:
  133.     case NET_OBJ_TYPE_OBJECT:
  134.     case NET_OBJ_TYPE_PED:
  135.     case NET_OBJ_TYPE_PICKUP:
  136.     case NET_OBJ_TYPE_PICKUP_PLACEMENT:
  137.     case NET_OBJ_TYPE_PLANE:
  138.     case NET_OBJ_TYPE_SUBMARINE:
  139.     case NET_OBJ_TYPE_TRAILER:
  140.     case NET_OBJ_TYPE_TRAIN:
  141.         /*printf("Blocked entity sync from player: %s (Type: %d, ID: %X, Flag: %X)\n", playerName, _object_type, _object_id, _object_flag);
  142.         return ACKCODE_FAIL; // Block sync note: everyone saw the trailers on 1.27 lol
  143.     }
  144. }
  145.  
  146.  
  147.  
  148.  
  149. // I don't remember what I used this hook for (0x12F9760)
  150. void hook::CNetworkWorldStateDataUpdate(uint32_t r3, uint32_t r4, uint32_t r5, uint32_t r6, uint32_t r7)
  151. {
  152.     printf("[HOOK] CNetworkWorldStateDataUpdate called:\n");
  153.     printf("        r3: 0x%08X | r4: 0x%08X | r5: 0x%08X | r6: 0x%08X | r7: 0x%08X\n", r3, r4, r5, r6, r7);
  154.  
  155.     if (*(uint32_t*)(r3 + 0x4) == 0)
  156.     {
  157.         printf("[WARNING] r3 is null or unreadable — skipping execution.\n");
  158.         return;
  159.     }
  160.  
  161.     uint32_t dataCheck = *(uint32_t*)(r3 + 0x4);
  162.     if (dataCheck == 0 || dataCheck < 0)
  163.     {
  164.         printf("[DETECTED] Potential freeze trigger — invalid value at [r3 + 0x4]: 0x%08X\n", dataCheck);
  165.         return;
  166.     }
  167.  
  168.     // Log info extra, not tested
  169.     uint32_t nodeType = *(uint32_t*)r3;
  170.     printf("        Node type (r3 + 0x0): 0x%08X | Data (r3 + 0x4): 0x%08X\n", nodeType, dataCheck);
  171.  
  172.     // TODO: Insert the original call logic
  173. }
  174.  
  175.  
  176. void SendGameInvite(char* PSN) {
  177.     char buffer[70] = {};  
  178.  
  179.     WriteBytes((int)0x1004004C, buffer, 0x100);
  180.  
  181.     WriteString(0x1004004C + 8, PSN);
  182.  
  183.     call<void>(0x139DE90)(0x40022280, 0x1004004C, 1, 0, 0, 0, 0x1CF72C4);
  184. }
  185.  
  186.  
  187. #define scrThread_array_ptr 0x1E70580
  188.  
  189. void ForceHostOfCurrentScript(int m_lPlayerId)
  190. {
  191.     uint32_t m_List = *(uint32_t*)(scrThread_array_ptr);
  192.     if (m_List)
  193.     {
  194.         for (uint16_t i = 0; i < *(uint16_t*)(scrThread_array_ptr + 0x4); i++)
  195.         {
  196.             uint32_t m_lScrThread = *(uint32_t*)(m_List + (i << 2));
  197.             if (m_lScrThread)
  198.             {
  199.                 if (!strcmp((char*)(m_lScrThread + 0x68), "freemode"))
  200.                 {
  201.                     if (*(uint32_t*)(m_lScrThread + 0xC) == 1)
  202.                     {
  203.                         uint32_t m_GameScriptHandlerNetComponent = *(uint32_t*)(m_lScrThread + 0xAC);
  204.  
  205.                         uint32_t m_NetGamePlayer = CNetGamePlayerfn(m_lPlayerId, 1);
  206.                         if (caseType == 1)
  207.                         {
  208.                             call<char>(0x483F50)(m_GameScriptHandlerNetComponent, m_NetGamePlayer, 0xFFFFFFFF, 1);
  209.                         }
  210.                     }
  211.                 }
  212.             }
  213.         }
  214.     }
  215. }
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222. uint32_t hook::HandleIncomingEvent(uint32_t r3, uint32_t r4, uint32_t r5, uint32_t syncType, uint32_t r7, uint32_t r8, uint32_t r9, uint32_t r10)
  223. {
  224.  
  225.     // add more checks
  226.  
  227.     char* pName = (char*)(*(uint32_t*)(r4 + 0x78) + 0x10);
  228.    
  229.     if (syncType <= 0) // invalid sync
  230.     {
  231.         printf("[BLOCKED] %s attempted to send invalid SyncType: 0x%X (possible crash attempt)\n", pName, syncType);
  232.         return 0; // check original return value of hook, then compare when sync is invalid
  233.     }
  234.  
  235.     // Log optional
  236.     // printf("[HOOK] Event from %s, SyncType: 0x%X\n", pName, syncType);
  237.  
  238.     // Call
  239.     return call<uint32_t>(0xA033F4)(r3, r4, r5, syncType, r7, r8, r9, r10);
  240. }
  241.  
  242.  
  243.  
  244. // do you think can send invalid "info" to players? I'll not release function address. Find self
  245. bool hook::WriteToBitBuffer(void* thisPtr, void* bitBuffer, uint32_t flags)
  246. {
  247.     uint8_t* buf = (uint8_t*)bitBuffer;
  248.  
  249.     uint32_t modelHash = *(uint32_t*)(buf + 0x20);
  250.     if (modelHash == Any Valid Model Hash)
  251.     {
  252.         *(uint32_t*)(buf + 0x20) = Model Hash you want Spoof;
  253.     }
  254.  
  255.     // spoof handling ?
  256.     uint32_t handling = *(uint32_t*)(buf + 0x474);
  257.     if (handling == Any valid handling)
  258.     {
  259.         *(uint32_t*)(buf + 0x474) = Any valid handling you want set;
  260.     }
  261.  
  262.     // return Write To Bit Buffer Original
  263. }
  264.  
Add Comment
Please, Sign In to add comment