I have a movespeed function and an update in my player's class, and I have a speed function in the enemy's class, if I put the enemy's pointer in my player's update it doesn't work, I have to use the update that is in the class of the enemy.
how can i use 2 or more update in mod menu or access enemy folder and pointer using my player update?
tried the way it is in the tutorial but it didn't work
how can i use 2 or more update in mod menu or access enemy folder and pointer using my player update?
C++:
// MovePlayer
// Token: 0x04001176 RID: 4470
[Token(Token = "0x4000E48")]
[FieldOffset(Offset = "0xBC")]
private float fixedspeed;
// RedWorker
// Token: 0x04001A92 RID: 6802
[Token(Token = "0x4001554")]
[FieldOffset(Offset = "0x34")]
private float fixedspeed;
// RedWorker
// Token: 0x06001856 RID: 6230 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000F14")]
[Address(RVA = "0x73A6C8", Offset = "0x73A6C8", VA = "0x73A6C8")]
private void Update()
{
}
// MovePlayer
// Token: 0x06001024 RID: 4132 RVA: 0x00002050 File Offset: 0x00000250
[Token(Token = "0x6000ABE")]
[Address(RVA = "0x556A90", Offset = "0x556A90", VA = "0x556A90")]
private void Update()
{
}
tried the way it is in the tutorial but it didn't work
C++:
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
}
}
return old_get_ammoInClip(instance);
}