daily pastebin goal
46%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 78 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. bool FilterObjs(cObject *object, void *user)
  2. {
  3.     for (int i = 0; i < 16; i++)
  4.     {
  5.         DWORD pLTClientShell = *(DWORD*)(Engine->GetCShell() + aLTClientShell);
  6.         if (pLTClientShell !=NULL)
  7.         {
  8.             CPlayer* Player = GetPlayerByIndex(pLTClientShell, i);
  9.             if (object == Player->Object)
  10.                 return true;
  11.         }
  12.     }
  13.     return false;
  14. }
  15.  
  16. bool IsRemotekill = true;
  17.  
  18. bool hkIntersectSegment(RemoteQuery* rQuery, RemoteInfo* rInfo)
  19. {
  20.     oRemoteKill = (tRemoteKill)(pIntersectSegment);
  21.     DWORD pLTClientShell = *(DWORD*)(Engine->GetCShell() + 0x11E27CC);
  22.     CPlayer* Me = GetPlayerByIndex(pLTClientShell, Engine->GetMyIndex(pLTClientShell));
  23.     if (IsRemotekill)
  24.     {
  25.         for (int i = 0; i < 16; i++)
  26.         {
  27.             CPlayer* pPlayer = GetPlayerByIndex(pLTClientShell, i);
  28.             if (Engine->IsVisible(Engine->GetBonePosition(Me->Object, 6), Engine->GetBonePosition(pPlayer->Object, 6)) && Engine->isValidClient(pPlayer) && Me != pPlayer && Me->Team != pPlayer->Team)
  29.             {
  30.                 D3DXVECTOR3 Pos = Engine->GetBonePosition(pPlayer->Object, 6);
  31.                 rQuery->rFrom = Pos + D3DXVECTOR3(0.0f, 50.0f, 0.0f);
  32.                 rQuery->rTo = Pos - D3DXVECTOR3(0.0f, 50.0f, 0.0f);
  33.                 rQuery->rFlags = ::INTERSECT_OBJECTS | ::IGNORE_NONSOLID | ::INTERSECT_HPOLY;
  34.                 rQuery->rFilterFn = FilterObjs;
  35.  
  36.                 bool Result = oRemoteKill(*rQuery, rInfo);
  37.                 if (Result)
  38.                 {
  39.                     rInfo->hObjImpact = pPlayer->Object;
  40.                     rInfo->vImpactPos = Pos;
  41.                 }
  42.                 return oRemoteKill(*rQuery, rInfo);
  43.             }
  44.         }
  45.     }
  46.     return oRemoteKill(*rQuery, rInfo);
  47. }
  48.  
  49. void StartRemote()
  50. {
  51.     if (!Engine->IsGameReadyForHook()) return;
  52.     DWORD crossfire = (DWORD)GetModuleHandleA(eCF);
  53.     if (crossfire == NULL) return;
  54.     if (Engine->GetCShell() !=NULL)
  55.     {
  56.         uint32_t LTClient = *reinterpret_cast<uint32_t*>(Engine->GetCShell() + aILTClient);
  57.         oRemoteKill = (tRemoteKill)*reinterpret_cast<uint32_t*>(LTClient + 0x7C);
  58.         *reinterpret_cast<uint32_t*>(LTClient + 0x7C) = (uint32_t)hkIntersectSegment;
  59.     }
  60. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top