//public void set_timeScale(float value) { } // class to hook
//the void *instance is a self-created variable.
void (*set_timeScale)(void *instance, float value);
float (*old_get_timeScale)(void *instance);
float get_timeScale(void *instance) {
//Check if instance is NULL to prevent CRASH
if (instance != NULL)
{
set_timeScale(instance, 9999); //Function Pointer mod
}
//return the original value (this code isn't really needed if you have a toggle/switch)
return old_get_timeScale(instance);
}
MSHookFunction((void *) getAbsoluteAddress(targetLibName,
string2Offset(OBFUSCATE_KEY("0x60e024", '?'))),
(void *)get_timeScale, (void **) &old_get_timeScale);
// Function pointer because we want to avoid crash when the il2cpp lib isn't loaded.
set_timeScale = (void (*)(void *, float)) getAbsoluteAddress(targetLibName, 0x60e02c);
First, since its a void Offset (non-returnable), it wont work with return in the hook, and specifying the ".0f", at the end of the value, i don't think it helps too much, only if the game confuses the offset as a double one, its good to be safe, but it might not help with anything.Try this
void (*old_get_timeScale)(void *instance);
void get_timeScale(void *instance) {
if (instance != NULL) {
if (TimeScale) {
set_timeScale(instance, 9999.0f);
}
}
return old_get_timeScale(instance);
}
how can includ this timescale on the lgl patch mod method? any advice? i already know how create the lgl mod floatingTry this
void (*old_get_timeScale)(void *instance);
void get_timeScale(void *instance) {
if (instance != NULL) {
if (TimeScale) {
set_timeScale(instance, 9999.0f);
}
}
return old_get_timeScale(instance);
}
Into your hack threads of main cpp... Don't forget to make the case toohow can includ this timescale on the lgl patch mod method? any advice? i already know how create the lgl mod floating
Is ios okay?I tried it on ios, but it crashed#include "Includes/Vector3.hpp"
float isLocalPlayerSize;
void *(*get_transform)(void *component);
void (*Transform_set_localScale)(void *transform, Vector3);
void SetPlayerSize(void *transform, Vector3 scale) {
return Transform_set_localScale(get_transform(transform), scale);
}
void (*old_playersizeUpdate)(void *instance);
void playersizeUpdate(void *instance) {
if (instance != NULL) {
if(isLocalPlayerSize){
SetPlayerSize(instance, Vector3(isLocalPlayerSize, isLocalPlayerSize, isLocalPlayerSize));
}
}
old_playersizeUpdate(instance);
}
MSHookFunction((void *)getAbsoluteAddress("libil2cpp.so", Your Player Update Offset), (void *) playersizeUpdate, (void **) &old_playersizeUpdate);
get_transform = (void *(*)(void *))getAbsoluteAddress(targetLibName, 0x1D955EC);
Transform_set_localScale = (void (*)(void*, Vector3))getAbsoluteAddress(targetLibName, 0x2B4D720);
OBFUSCATE("SeekBar_Player Size_1_50"), //0 Case
case 0:
if (value >= 1) {
isLocalPlayerSize = value;
}
break;
I'm guessing you're trying to make speed hack with this. If you're modding an il2cpp unity game then there is a universally used function called timeScale that controls the game speed. It's static which means it doesn't have an instance. If it doesn't work then, in the same class, try deltaTime and FixedDeltaTime.
If you're not modding a unity game and your code didn't work then it could be that this isn't the method that controls the game speed or there are protections put in place or many other reasons, including: not the correct addresses, error with the function calling method, try an update method. Or an error with the inputted targetLibName.
yes get_deltaTime from Time Unity class can make some sort of speedhack, called time hack, but i wanted to make it with timescale but couldn't, anyway i find another way to make speedhack and this is fast way
thanks for the help
What's the other way you found pls i need it tooyes get_deltaTime from Time Unity class can make some sort of speedhack, called time hack, but i wanted to make it with timescale but couldn't, anyway i find another way to make speedhack and this is fast way
thanks for the help
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