Jump to content

can we make a tweak with thesame Class & Same Methods?


Go to solution Solved by Guest,

11 posts in this topic

Recommended Posts

Posted

Hey,

 

Didn't know how I had to call the title, lol..

 

what I want is this:

%hook Car

-(int) equip {
if(getPrefBool(@"key1")) {
return 40;
}
return %orig
}

-(int) equip {
if(getPrefBool(@"key2")) {
return 18;
}
return %orig
}

is this possible?

 

  • Solution
Posted (edited)

Do it like this:

Hmm, but then I compile it gives me errors. even with the %end

Refresh the page look at my first post i misread it

Do it like this:

 

%hook Car

- (int)equip {
if(GetPrefBool(@"key1")){
return 40;
}
else if(GetPrefBool(@"key2")){
return 18;
}
else{
return %orig;
}
}
%end
Updated by Guest
Posted

Do it like this:

Refresh the page look at my first post i misread it

Do it like this:

 

%hook Car

- (int)equip {
if(GetPrefBool(@"key1")){
return 40;
}
else if(GetPrefBool(@"key2")){
return 18;
}
else{
return %orig;
}
}
%end

I think you mena "Why would you want that"?

 

Well then it will mix it together bcs those numbers '40 & 18' are the products what I want to mix together

Posted

I think you mena "Why would you want that"?

 

Well then it will mix it together bcs those numbers '40 & 18' are the products what I want to mix together

yeah thats what I meant

 

And it won't mix. Once an evaluation in that if else ladder is true, it will return, only then

Posted

yeah thats what I meant

 

And it won't mix. Once an evaluation in that if else ladder is true, it will return, only then

oh well, is that 100% sure? bcs I got errors again but if it sure not gonna waste my time more lol

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