Advertisement
Guest User

Untitled

a guest
Dec 17th, 2017
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. int IClientEntity::GetSequenceActivity(int sequence)
  2. {
  3. auto hdr = Interfaces::ModelInfo->GetStudiomodel(this->GetModel());
  4.  
  5. if (!hdr)
  6. return -1;
  7.  
  8. // c_csplayer vfunc 242, follow calls to find the function.
  9.  
  10. static auto client2 = GetModuleHandleW(L"client.dll");
  11. static auto getSequenceActivity = (DWORD)(PatternScan(client2, "55 8B EC 83 7D 08 FF 56 8B F1 74"));
  12. static auto GetSequenceActivity = reinterpret_cast<int(__fastcall*)(void*, studiohdr_t*, int)>(getSequenceActivity);
  13.  
  14. return GetSequenceActivity(this, hdr, sequence);
  15. }
  16.  
  17. bool isPartOf(char *a, char *b) {
  18. if (std::strstr(b, a) != NULL) { //Strstr says does b contain a
  19. return true;
  20. }
  21. return false;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement