SHARE
TWEET

Untitled

a guest Jan 18th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #define ADDR_WeaponMgrPointer 0x2294530
  2. #define M16 25
  3. #define M4A1_S_Predator 1508
  4.  
  5. void DoWeaponReplace(DWORD currentweaponid, DWORD newweaponid)
  6. {
  7. DWORD CShell = (DWORD)GetModuleHandleA("CShell.dll");
  8. DWORD pWeaponMgr = *(DWORD*)(CShell + ADDR_WeaponMgrPointer);
  9. if(pWeaponMgr)
  10. {
  11.     DWORD currentweapon = pWeaponMgr + 4 * currentweaponid;
  12.     DWORD newweapon = pWeaponMgr + 4 * newweaponid;
  13.     if(currentweapon)
  14.     {
  15.         if(newweapon)
  16.         {
  17.             *(DWORD*)currentweapon = *(DWORD*)newweapon;
  18.         }
  19.     }
  20. }
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top