Advertisement
Wolfrost

CSGO Netvar proxy function hooker

Jan 2nd, 2017
361
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for (ClientClass* pClass = g_BaseClient->GetAllClasses(); pClass; pClass = pClass->m_pNext) {
  2.     if (!strcmp(pClass->m_pNetworkName, "CBaseEntity")) {
  3.         // Search for the 'm_vecOrigin' property.
  4.         RecvTable* pClassTable = pClass->m_pRecvTable;
  5.  
  6.         for (int nIndex = 0; nIndex < pClassTable->m_nProps; nIndex++) {
  7.             RecvProp* pProp = &pClassTable->m_pProps[nIndex];
  8.  
  9.             if (!pProp || strcmp(pProp->m_pVarName, "m_vecOrigin"))
  10.                 continue;
  11.  
  12.             // Store the original proxy function.
  13.             oVecOrigin = pProp->m_ProxyFn; // original vecOrigin pointer
  14.  
  15.             // Replace the proxy function with our sequence changer.
  16.             pProp->m_ProxyFn = (RecvVarProxyFn)YourPerfectFunction; // ok_hand
  17.  
  18.             break;
  19.         }
  20.  
  21.         break;
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement