Hello I'm a beginner to modding and I've been trying to make a cheat to teleport other play in another location. I've found the Offsets needed but my code doesnt seem to work any help would be greatly appriciated. The app is crashing when I execute update.
My Imgui Mod Menu Code :
C#:
[Token(Token = "0x60073ED")]
[Address(RVA = "0x12C4718", Offset = "0x12C4718", VA = "0x12C4718")]
public void ChangeField(int fieldId, byte roomType, byte roomId, float[] basePos, float angle, float cameraRot, EmergencyPositionData emergency)
{
}
C#:
[Token(Token = "0x60073B5")]
[Address(RVA = "0x12BFDFC", Offset = "0x12BFDFC", VA = "0x12BFDFC")]
private void Update()
{
}
My Imgui Mod Menu Code :
Code:
void (*ChangeField) (void *instance, int fieldId, char roomType, char roomId, float basePos, float angle, float cameraRot);
void Pointers() {
ChangeField = (void(*) (void*, int, char, char, float, float, float)) (g_il2cppBaseMap.startAddress + string2Offset("0x12C4718"));
}
void (*old_Update) (void *instance);
void Update(void *instance) {
if(instance != NULL && isUpdate) {
ChangeField(6000, 0, 0, 0, 0, 0);
isUpdate = false;
}
old_Update(instance);
}
HOOK("0x12BFDFC", Update, old_Update);