Jump to content

Help with multiple arguments on MSHooking


Go to solution Solved by AnotherLurker,

33 posts in this topic

Recommended Posts

  • Replies 32
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Posted

What if I wanted to make an argument pass-through? Do I just ignore it in the code?

Depends, I would recommend doing this:

 

%orig(arg1, MODIFIED, arg3);

 

Here, only arg2 (MODIFIED) is modified, arg1 and arg3 are "pass-through" values. 

  • Solution
Posted

What if I only wanted to edit the (bool) in this?

 

 

image.jpg

 

%hook DynamicWorld
- (BOOL)doorCanBeUsedByPathUser:(id)pathUser atPos:(id)pos {
   if (GetPrefBool(@"kHack")) {
       return YES;
   }

   return %orig();
}
%end
:)
Posted

What if I only wanted to edit the (bool) in this?

 

image.jpg

 

write return TRUE;

or make it FALSE

 

%hook DynamicWorld
- (BOOL)doorCanBeUsedByPathUser:(id)pathUser atPos:(id)pos {
   if (GetPrefBool(@"kHack")) {
       return YES;
   }

   return %orig();
}
%end
:)
where did you get this (id)pathUser atPos

:rofl:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines