Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void CMisc::KnifeChanger()
- {
- if (!cvars->skinchanger || local_entity->getHealth() <= 0)
- return;
- DWORD LocalPlayer = mem->ReadMem<DWORD>(ClientDLL + LocPlayer);
- for (int i = 0; i < 128; i++)
- {
- DWORD CurrentWeaponIndex = mem->ReadMem<DWORD>(LocalPlayer + m_hViewModel + ((i - 1) * 0x4)) & 0xFFF;
- DWORD CurrentWeaponEntity = mem->ReadMem<DWORD>(ClientDLL + EntList + (CurrentWeaponIndex - 1) * 0x10);
- if (local_entity->getWeaponId() == 59 || local_entity->getWeaponId() == 42 || local_entity->getWeaponId() == 505)
- {
- if (mem->Readmemory<int>(CurrentWeaponEntity + m_nModelIndex) == 347 || mem->Readmemory<int>(CurrentWeaponEntity + m_nModelIndex) == 346)
- mem->Writememory<int>(CurrentWeaponEntity + m_nModelIndex, 387);
- mem->Writememory<int>(CurrentWeaponEntity + m_iViewModelIndex, 388);
- mem->Writememory<int>(CurrentWeaponEntity + m_iWorldModelIndex, 389);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement