show me an example please i'm a beginnerYou can make a reset button i guess. You would have to pass a pointer to the slider value in the button case and set the value back to original
int *valueptr;
int slidervalue = 1;
// Rest of Code
case 0: //Your slider Case
if(valueptr == NULL){
valueptr = &value;
}
slidervalue = value;
break;
case 1: //Your reset button case
if(valueptr != NULL){
*valueptr = 1;
}
break;
Did not work :(Code:int *valueptr; int slidervalue = 1; // Rest of Code case 0: //Your slider Case if(valueptr == NULL){ valueptr = &value; } slidervalue = value; break; case 1: //Your reset button case if(valueptr != NULL){ *valueptr = 1; } break;
Try this
I fixed it but it still doesn't work, and the original value is not 1
Not quite how to explain it but... But there is a way when the slide is between 1 and 5 it goes back to the original value (I don't know what the original value is in libil2cpp so I can put it in the mod)
If you want the original code restored, you can disable your hook and use RESTORE_LIB() (The examples are there in the menu template). Not sure if i am still getting your question properlyNot quite how to explain it but... But there is a way when the slide is between 1 and 5 it goes back to the original value (I don't know what the original value is in libil2cpp so I can put it in the mod)
Im gonna put u on simple way to understandNot quite how to explain it but... But there is a way when the slide is between 1 and 5 it goes back to the original value (I don't know what the original value is in libil2cpp so I can put it in the mod)
float(*old_Speed)(void *instance);
float Speed(void *instance) {
if (instance != NULL && speed > 1) {
return old_Speed(instance) * (float)speed; //original value * (your value)
}
return old_Speed(instance);
}
not quite that, for example when the slide is between 0~5 it will be the original value, but when it is in the other number it will increase according to the number, but thanks anyway.If you want the original code restored, you can disable your hook and use RESTORE_LIB() (The examples are there in the menu template). Not sure if i am still getting your question properly
Guess what I want is not possible, thanks and sorry for taking your timeIf you want the original code restored, you can disable your hook and use RESTORE_LIB() (The examples are there in the menu template). Not sure if i am still getting your question properly
It worked, but I don't know the original code value in the lib.Im gonna put u on simple way to understand
C++:float(*old_Speed)(void *instance); float Speed(void *instance) { if (instance != NULL && speed > 1) { return old_Speed(instance) * (float)speed; //original value * (your value) } return old_Speed(instance); }
I've already done that, but it's not the same valueWell some class do show original value in field, not always. The other option is do debug logs whatever value pass in that func
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies