Jump to content

36 posts in this topic

Recommended Posts

Posted (edited)

@ @@CosnotraLF

#import <substrate.h>
 
#define plistPath @"/var/mobile/Library/Preferences/minecraftpehack.plist"
 
inline BOOL GetPrefBool(NSString *key)
{
    return [[[NSDictionary dictionaryWithContentsOfFile:plistPath] valueForKey:key] boolValue];
}
 
void (*Originals_Entity_setPos)(void *self, float x, float y, float z)
 
void Entity_setPos(void *self, float x, float b, float z)
{
     if(GetPrefBool(@"kPosHack"))
       {
             x = 1.0f;
             y = 2.0f;
             z = 3.0f;
       }
    else
       {
          return Originals_Entity_setPos(self, x, y, z);
       }
}
 
%ctor
{
      MSHookFunction((MSFindSymbol(NULL, "_ZN6Entity6setPosEfff")),(void *)Entity_setPos,(void **)&Originals_Entity_setPos);
}

 
the Entity * hidden this is a pointer to the entity class... u can ignore it

Updated by HATER
Posted (edited)

I use this  try it lol.. I think hater told me this 

%ctor {
if(GetPrefBool(@"kMax"))
{
writeData(0x1AB4C8, 0x007080E5);
} else {
writeData(0x1AB4C8, 0x001080E5);
}
}

wait, so how do i do this? :confused:

@ @@CosnotraLF

#import <substrate.h>
 
#define plistPath @"/var/mobile/Library/Preferences/minecraftpehack.plist"
 
inline BOOL GetPrefBool(NSString *key)
{
    return [[[NSDictionary dictionaryWithContentsOfFile:plistPath] valueForKey:key] boolValue];
}
 
void (*Originals_Entity_setPos)(void *self, float x, float y, float z)
 
void Entity_setPos(void *self, float x, float b, float z)
{
     if(GetPrefBool(@"kPosHack"))
       {
             x = 1.0f;
             y = 2.0f;
             z = 3.0f;
       }
    else
       {
          return Originals_Entity_setPos(self, x, y, z);
       }
}
 
%ctor
{
      MSHookFunction((MSFindSymbol(NULL, "_ZN6Entity6setPosEfff")),(void *)Entity_setPos,(void **)&Originals_Entity_setPos);
}

 

the Entity * hidden this is a pointer to the entity class... u can ignore it

Thanks!! :).

One more problem solved!

This is my favorite forum for a bunch of reasons.

One of them is : THERE IS AWESOME PEOPLE like you all guys :)

Updated by CosnotraLF
Posted

wait, so how do i do this? :confused:

 

Thanks!! :).

One more problem solved!

This is my favorite forum for a bunch of reasons.

One of them is : THERE IS AWESOME PEOPLE like you all guys :)

:)
Posted (edited)

I found an easier way.

What if you just make a new function that calls original function.

You just got to call new function with your parameters, and that function is going to pass the parameters to the original function :).

Finally I discovered something by myself :)(not relly discovered, cause I think some people knew this before me, but you know what I mean)

Updated by CosnotraLF
Posted

I found an easier way.

What if you just make a new function that calls original function.

You just got to call new function with your parameters, and that function is going to pass the parameters to the original function :).

Finally I discovered something by myself :)(not relly discovered, cause I think some people knew this before me, but you know what I mean)

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