Jump to content

how to i hook somthing with 12 arguments


Go to solution Solved by MrDemoManHax,

21 posts in this topic

Recommended Posts

Posted

how would i write all these args in the tweak.xm after the

%hook ADVBusinessData

-(id) initWithName:(char*) img:(char*) business_id:(char*) tier:(int) baseThreat:(float) baseEarning:(double) baseCapacity:(double) baseBuildTime:(double) basePrice:(double) baseSellPrice;(double) unlockType:(int) {

       WHAT DO I PUT HERE?????

}

IMG_0145_zpsjvauu1g4.jpg

 

 

  • Replies 20
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Posted (edited)

Check the mshook topic

 

Give name for each and type return to few that you need to work

Updated by Amuyea
Posted (edited)

Check the mshook topic

 

Give name for each and type return to few that you need to work

i duno how you mean can you give an example?

Updated by MrDemoManHax
Posted (edited)

would it look like this???????

 

%hook ADVBusinessData
-(id) initWithName:(char*) img:(char*) business_id:(char*) tier:(int) baseThreat:(float) baseEarning:(double) baseCapacity:(double) baseBuildTime:(double) basePrice:(double) baseSellPrice:(double) unlockType:(int) {
   arg5 = 0;
   arg6 = 1e+53;
   arg7 = 1e+69;
   arg8 = 0;

%orig(arg5, arg6, arg7, arg8);
}
%end

Updated by MrDemoManHax
Posted

would it look like this???????

 

%hook ADVBusinessData

-(id) initWithName:(char*) img:(char*) business_id:(char*) tier:(int) baseThreat:(float) baseEarning:(double) baseCapacity:(double) baseBuildTime:(double) basePrice:(double) baseSellPrice:(double) unlockType:(int) {

   arg5 = 0;

   arg6 = 1e+53;

   arg7 = 1e+69;

   arg8 = 0;

%orig(arg5, arg6, arg7, arg8);

}

%end

dont work :wallbash: :wallbash: :wallbash: :wallbash:

Posted (edited)

ok it like this and i get one error now it says: error: expected function body after function declarator   initWithName:(char*)arg1

                                                                                                                                                                   ^

%hook ADVBusinessData
-(id)arg0 initWithName:(char*)arg1 img:(char*)arg2 business_id:(char*)arg3 tier:(int)arg4 baseThreat:(float)arg5 baseEarning:(double)arg6 baseCapacity:(double)arg7 baseBuildTime:(double)arg8 basePrice:(double)arg9 baseSellPrice:(double)arg10 unlockType:(int)arg11 {
   arg0 = %orig;
   arg5 = 0;
   arg6 = 1e+53;
   arg7 = 1e+69;
   arg8 = 0;
%orig( arg5, arg6, arg7, arg8 );
}
%end

Updated by MrDemoManHax

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