Jump to content

do need any other code before i add a function


Go to solution Solved by CmakLove,

3 posts in this topic

Recommended Posts

Posted

heres part of it i didnt past the whole thing just need to know if theres anything else i need to add before i add another function 

 

#import <CoreFoundation/CoreFoundation.h>
#import <substrate.h>
#import <Foundation/Foundation.h>
int $__ZN6Player4hurtEP6Entityi()
{ 
   return 99999999;
}

 

  • Solution
Posted

Try:

int (*old__ZN6Player4hurtEP6Entityi)();

int $__ZN6Player4hurtEP6Entityi() { 
 return 999; 
 }

%ctor {
 
MSHookFunction(((int*)MSFindSymbol(NULL, "__ZN6Player4hurtEP6Entityi")),(int*)$__ZN6Player4hurtEP6Entityi,(int**)&old__ZN6Player4hurtEP6Entityi);

}
Posted

Try:

int (*old__ZN6Player4hurtEP6Entityi)();

int $__ZN6Player4hurtEP6Entityi() { 
 return 999; 
 }

%ctor {
 
MSHookFunction(((int*)MSFindSymbol(NULL, "__ZN6Player4hurtEP6Entityi")),(int*)$__ZN6Player4hurtEP6Entityi,(int**)&old__ZN6Player4hurtEP6Entityi);

}

thanks i well try this before i make another topic.

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