Jump to content

How to add hook to menu


420budz

4 posts in this topic

Recommended Posts

Posted

Bro can you help me please , where it is empty switch I want to know how to add a hook to it.. can you please show me . Want to add hook to empty switch/masskill.  This is my code

 

// Empty switch - usefull with hooking
[switches addSwitch:@"Masskill"
description:@"Teleport all enemies to you without them knowing"];

// Offset Switch with one patch
[switches addOffsetSwitch:@"God Mode"
description:@"You can't die"
offsets:{0x1005AB148}
bytes:{"0x00E0BF12C0035FD6"}];

Posted

What are you talking about? These switches are examples only, you can’t hook randomly and expect it will work, you need to check some tutorials .

Posted
7 hours ago, Red16 said:

Read this tutorial it will help you with hooks a bit: 

 

Thanks you! , can you help me add this button to this code by Please (My switch)

if([switches isSwitchOn:@"Notis Off"]) {
return 1;
}
return %orig;
}

(Code to add switch to)

%hook NCNotificationShortLookViewController

-(id)_initWithNotificationRequest:(id)arg1 revealingAdditionalContentOnPresentation:(BOOL)arg2 {
BBBulletin *bulletin = ((NCNotificationRequest *)arg1).bulletin;
NCNotificationShortLookViewController *temp = %orig;

if ([NotiBlockChecker blockTypeForBulletin: bulletin] != 0) {
self.view.hidden = YES;
[self.view setUserInteractionEnabled:NO];
}
return temp;
}
- (void)viewWillAppear:(BOOL)animated {
%orig;
if(self.view.hidden) {
HBLogDebug(@"NOTIBLOCK - NCNotificationShortLookViewController will appear - dismissing banner");
[self dismissViewControllerAnimated:NO completion:nil];
}
}

%end

Archived

This topic is now archived and is closed to further replies.

×
  • 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