SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         auto fire_rate( std::uint32_t value, bool toggle ) -> void {
  2.             const auto weapon_components = uid::core->read_vmem<std::uint64_t>( offset::globals::game_manager + 0x1f8 );
  3.      
  4.             if ( !weapon_components )
  5.                 return;
  6.      
  7.             const auto weapon_list = uid::core->read_vmem<std::uint64_t>( weapon_components + 0xd8 );
  8.      
  9.             if ( !weapon_list )
  10.                 return;
  11.      
  12.             const auto weapon_operator = uid::core->read_vmem<std::uint64_t>( weapon_list + 0x28 );
  13.      
  14.             if ( !weapon_operator )
  15.                 return;
  16.      
  17.             const auto weapon_entity = uid::core->read_vmem<std::uint64_t>( weapon_operator + 0x138 );
  18.      
  19.             if ( !weapon_entity )
  20.                 return;
  21.      
  22.             auto weapon_info = uid::core->read_vmem<std::uint64_t>( weapon_entity + 0x120 );
  23.      
  24.             if ( !weapon_info )
  25.                 return;
  26.            
  27.             weapon_info = uid::core->read_vmem<std::uint64_t>( weapon_info ); // + 0x0
  28.      
  29.             if ( !weapon_info )
  30.                 return;
  31.                
  32.             // values from 0x30 up to 0x3c contain the weapon's fire rate, the one that has an effect in game is 0x34.
  33.      
  34.             static const auto og_value = uid::core->read_vmem<std::uint32_t>( weapon_info + offset::weapon_rate );
  35.      
  36.             uid::core->write_vmem<std::uint32_t>( weapon_info + 0x34, toggle ? value : og_value );
  37.         }
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