Jump to content

11 posts in this topic

Recommended Posts

Posted (edited)

Hey guys just need some quick help.

 

 

I just need to know how you would hook multiple functions to one class for e.g. down below i wanna hook every funtion there (fp1,fp2,fp3,fp4 etc), i know how to hook one function but not multiple with seperate prefs links.

Any help is appreciated thanks!

-------------------------------------------------


%hook BlahBlah

-(void) hello:(bool)fp1 bye:(bool)fp2 thanks:(bool)fp3 smile:(bool)fp4 frown:(bool)fp5 {
if(GetPrefBool(@''hello'')) {
fp1=FALSE;
}
%orig(fp1,fp2,fp3,fp4,fp5,fp6);
}
%end


Updated by JustinPet26
Posted (edited)
%hook BlahBlah
    -(void) hello:(bool)fp1 bye:(bool)fp2 thanks:(bool)fp3 smile:(bool)fp4 frown:(bool)fp5 {
        if(GetPrefBool(@"hello")) {
            fp1 = false;
            fp2 = false;
            fp3 = true;
            etc.
        }
        %orig;
    }
%end

//edit: Aww, to late. :(

Updated by Bummibaer
Posted (edited)

fp1 =

fp2 =

fp3 =

...

 

Yeah but i need to link them each individually for settings buttons.

 

Each function needs a button.

Updated by JustinPet26
Posted (edited)

Yeah but i need to link them each individually for settings buttons.

%hook BlahBlah
    -(void) hello:(bool)fp1 bye:(bool)fp2 thanks:(bool)fp3 smile:(bool)fp4 frown:(bool)fp5 {
        if(GetPrefBool(@"A")) {
            fp1 = false;
        }
        if(GetPrefBool(@"B")) {
            fp2 = false;
        }
        %orig;
    }
%end

Like this?

Updated by Bummibaer
Posted (edited)

You need something different for getPrefBool

 

Yeah but i need to link them each individually for settings buttons.

 

Each function needs a button.

 

I think what Bummi said could work too

Updated by castix
Posted
%hook BlahBlah
    -(void) hello:(bool)fp1 bye:(bool)fp2 thanks:(bool)fp3 smile:(bool)fp4 frown:(bool)fp5 {
        if(GetPrefBool(@"A")) {
            fp1 = false;
        }
        if(GetPrefBool(@"B")) {
            fp2 = false;
        }
        %orig;
    }
%end

Like this?

 

 

I've done that and doesn't work :/ there's nothing wrong with the code, but it 's just unresponsive to any actions.

Posted (edited)

I've done that and doesn't work :/ there's nothing wrong with the code, but it 's just unresponsive to any actions.

The code I posted should work. Maybe show the preferences.

Updated by Bummibaer
Posted

The code I posted should work. Maybe show the preferences.

 

Yeah I know because that's exactly how I coded it in the first place, everything is right and linked properly to prefs. I was hoping I coded it wrong but guess not. Thanks for the help anyways guys, maybe it's just my device being crap.

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