[Token(Token = "0x40052CA")]
[FieldOffset(Offset = "0x20")]
[Attribute(Name = "CompilerGeneratedAttribute", RVA = "0x5EE0E4", Offset = "0x5EE0E4")]
private int <MovesLeft>k__BackingField;
void (*orig_Update)(void *instance);
void Update(void *instance)
{
if(instance != NULL)
{
*(int*)((uint64_t)instance + 0x20) = 99; // Declare a variable to isEnemy to access it
}
orig_Update(instance);
}
Pare de fazer perguntas tão fáceis e embaraçosas, como você quer fazer e aprender algo se espera ser ensinado algo que nem quer aprender? Acho que não te respondem só porque o erro é logo visível, tem exemplos, tem treinamentos. Antes de fazer uma pergunta, saiba o que é MSHookFunction e como usá-lo.
Quem não aprende sempre fica parado.
[/CITAR]
Stop asking such embarrassing easy questions, how do you want to do and learn something if you expect to be taught something you don't even want to learn? I think they don’t answer you just because the error is immediately visible, there are examples, there are trainings. Before asking a question, learn what MSHookFunction is and how to use it.
Those who do not learn will always stand still.
Can this type of offset field be used?Stop asking such embarrassing easy questions, how do you want to do and learn something if you expect to be taught something you don't even want to learn? I think they don’t answer you just because the error is immediately visible, there are examples, there are trainings. Before asking a question, learn what MSHookFunction is and how to use it.
Those who do not learn will always stand still.
Stop asking such embarrassing easy questions, how do you want to do and learn something if you expect to be taught something you don't even want to learn? I think they don’t answer you just because the error is immediately visible, there are examples, there are trainings. Before asking a question, learn what MSHookFunction is and how to use it.
Those who do not learn will always stand still.
struct {
bool Update = false;
} MyMod;
void (*old_NameOfYourChoice)(void *instance);
void NameOfYourChoice(void *instance) {
if (instance != NULL) {
if (MyMod.Update) {
*(int *) ((uint64_t) instance + 0x20) = 99;
}
}
return old_NameOfYourChoice(instance);
}
HOOK_LIB("libil2cpp.so", "0x764500", NameOfYourChoice, old_NameOfYourChoice);
OBFUSCATE("Toggle_Whatever Your Hook Does"),
case 0: // use your case number
MyMod.Update = boolean;
break;
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