Jump to content

3 posts in this topic

Recommended Posts

Posted

Hi all I made Gravity hack but I want to make slider For Gravity

i know how to make basic switch but I want to make Slider to anyone wants to change it in Shmoo ModMenu

 

this is Gravity function 

__text:00000001008D9E28                 SUB             SP, SP, #0x20
__text:00000001008D9E2C                 STP             X29, X30, [SP,#0x10+var_s0]
__text:00000001008D9E30                 ADD             X29, SP, #0x10
__text:00000001008D9E34                 STR             WZR, [SP,#0x10+var_8]
__text:00000001008D9E38                 STR             XZR, [SP,#0x10+var_10]
__text:00000001008D9E3C                 MOV             X1, SP
__text:00000001008D9E40                 BL              Physics$$INTERNAL_get_gravity
__text:00000001008D9E44                 LDP             S0, S1, [SP,#0x10+var_10]
__text:00000001008D9E48                 LDR             S2, [SP,#0x10+var_8]
__text:00000001008D9E4C                 LDP             X29, X30, [SP,#0x10+var_s0]
__text:00000001008D9E50                 ADD             SP, SP, #0x20
__text:00000001008D9E54                 RET
__text:00000001008D9E54 ; End of function Physics$$get_gravity

 

 

 

 

 

 

How can I but them in : 

   Hide contents

To add a hook with a slider, use this function:

addSliderHook(@"Hook name", @"Description of the hook", font, lower bound for slider, upper bound for slider, function address, the name of the function you are using for the hook, the name of the function that you aren't using for the hook);

Use this line of code to retrieve the slider's value:

float val = [SliderHook getSliderValueForHook:@"hook name here"];

Let's say I wanted to make a hook with a slider that enabled the user to choose their FOV from 60 to 150. I would use this code:

	float (*getFovOrig)(void *_this);
	 
	float _getFovHooked(void *_this){
	return [SliderHook getSliderValueForHook:@"Field of view slider"];
	}
	 
	addSliderHook(@"Field of view slider", @"Use this slider to adjust your FOV from 60 to 150.", font, 60, 150, 0xc392da, (void *)_getFovHooked, (void *)getFovOrig);

 

 
  • Like 1
  • Winner 1

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