Advertisement
Guest User

Untitled

a guest
Oct 10th, 2015
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.53 KB | None | 0 0
  1. IClientEntity* GetCurrentWeapon(int nEntityIndex)
  2. {
  3.     int hCurrentWeapon = *MakePtr(int*, Game::EntityList->GetClientEntity(nEntityIndex), Offsets.NetVars.m_hActiveWeapon);
  4.     return Game::EntityList->GetClientEntityFromHandle(hCurrentWeapon);
  5. }
  6.  
  7. int GetWeaponID(int nEntityIndex)
  8. {
  9.     IClientEntity* m_pWeaponEntity = GetCurrentWeapon(nEntityIndex);
  10.  
  11.     if (!m_pWeaponEntity)
  12.         return 0;
  13.  
  14.     return *MakePtr(int*, m_pWeaponEntity, Offsets.NetVars.m_AttributeManager + Offsets.NetVars.m_Item + Offsets.NetVars.m_iItemDefinitionIndex);
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement