Estou com uma duvida nesse exemplo abaixo, minha offset isBot é 0x8DA1AC, teria como fazer um exemplo com esse tipo de offset.
int(*old_get_ammoInClip)(void *instance);
int get_ammoInClip(void *instance)
{
if(instance != NULL)
{
void *AccessCharacterController = *(void**)((uint64_t)instance + 0x32); // Use the field and make a pointer to get access to CharacterController
if(AccessCharacterController != NULL) // Since we use a pointer for the field 0x32 to get access to the CharacterController class, we have to check if it isn't null
{
bool IsBot = *(bool*)((uint64_t)AccessCharacterController + 0x24); // use it to access the field isBot in the class CharacterController
if(!IsBot) // Check if it's not a bot
{
return 99999; // Now only you get 99999 ammo
}
}
}
return old_get_ammoInClip(instance); // Return original value for bots
}
MsHookFunction((void*)getAbsoluteAddress(0x34287), (void*)get_ammoInClip, (void**)&old_get_ammoInClip);