private IEnumerator UnBanPlayer (string playerToKick)
//the void *instance is a self-created variable.
Void (*old_UnbanPlayer_MoveNext)(void *instance);
Void UnbanPlayer_MoveNext(void *instance) {
//Check if instance is NULL to prevent CRASH
if (instance != NULL)
{
*(int *) ((uint64_t)instance + 0x4C) = 18372819; //Return how many value
}
old_UnbanPlayer_MoveNext(instance);
}
MSHookFunction((void*)getAbsoluteAddress(OFFSETS), (void*)UnbanPlayer_MoveNext, (void**)&UnbanPlayer_MoveNext;
yes you put them straight in your hookwhat if the offset of the methods just like this " 0x6C " the offset are shorter than usual offset? should i just put it straight into the hook?
No, just use it in your main.cppAnd also do we need to include a specific header or library or some other code to use the MoveNext(); function
@Tiuu I just need help with what do we hook?
Do we hook this part of an IEnumerable:
Or this part:C#:private IEnumerator UnBanPlayer (string playerToKick)
<UnbanPlayer>d__507>
if i have an invoke method like this [Address(RVA = "0x1B5AA2C", Offset = "0x1B5AA2C", VA = "0x1B5AA2C", Slot = "12")]You're looking for an IEnumerator or Enumeral method, so yeah you will need to use and hook <UnbanPlayer>d__507>
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