IMKYZABITCHES

setPerk Reversed | MW2 TU8

Mar 21st, 2014
674
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.47 KB | None | 0 0
  1. //Needs testing, ASM released by CraigChrist, reversed by Bitwise
  2. inline void setPerk(int clientIndex, char*perkName)
  3. {
  4.     int player = *(int*)(getEntity(clientIndex) + 0x158), perk = BG_GetPerkIndexForName(perkName);
  5.     *(int*)(player + 0x428 + ((perk >> 3) & 0x1FFFFFFC)) |= (1 << (perk & 0x1F));
  6.     *(int*)(player + 0x32BC + ((perk >> 3) & 0x1FFFFFFC)) |= (1 << (perk & 0x1F));
  7. }
  8.  
  9. /*
  10.  
  11. Just call it like you would normally;
  12. setPerk(0, "specialty_explosivebullets");
  13.  
  14. */
Add Comment
Please, Sign In to add comment