Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. void CMisc::KnifeChanger()
  2. {
  3. if (!cvars->skinchanger || local_entity->getHealth() <= 0)
  4. return;
  5.  
  6. DWORD LocalPlayer = mem->ReadMem<DWORD>(ClientDLL + LocPlayer);
  7.  
  8. for (int i = 0; i < 128; i++)
  9. {
  10. DWORD CurrentWeaponIndex = mem->ReadMem<DWORD>(LocalPlayer + m_hViewModel + ((i - 1) * 0x4)) & 0xFFF;
  11. DWORD CurrentWeaponEntity = mem->ReadMem<DWORD>(ClientDLL + EntList + (CurrentWeaponIndex - 1) * 0x10);
  12.  
  13. if (local_entity->getWeaponId() == 59 || local_entity->getWeaponId() == 42 || local_entity->getWeaponId() == 505)
  14. {
  15. if (mem->Readmemory<int>(CurrentWeaponEntity + m_nModelIndex) == 347 || mem->Readmemory<int>(CurrentWeaponEntity + m_nModelIndex) == 346)
  16. mem->Writememory<int>(CurrentWeaponEntity + m_nModelIndex, 387);
  17. mem->Writememory<int>(CurrentWeaponEntity + m_iViewModelIndex, 388);
  18. mem->Writememory<int>(CurrentWeaponEntity + m_iWorldModelIndex, 389);
  19. }
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement