I followed this article to get started on the Teleport hackHow To Make A Teleport Hack - Platinmods.com - Android & iOS MODs, Mobile Games & Apps
But I started it after entering the game and got a crash.I checked over and over again and the offset was correct. The crash should not be caused by the hook offset. Ask for help
#import "Macros.h"
#import "button.h"
struct Vector3{
float x;
float y;
float z;
Vector3();
Vector3(float x, float y, float z);
~Vector3();
};
Vector3::Vector3() {}
Vector3::Vector3(float x, float y, float z) : x(x), y(y), z(z) {}
Vector3::~Vector3() {}
void *(*get_transform)(void *_instance) = (void*(*)(void *))getRealOffset(0x2F23737);
void (*set_position_Injected)(void *_instance, Vector3 _vectorInstance) = (void (*)(void *, Vector3 ))getRealOffset(0x2F2F337);
void setPosition(void *component, Vector3 position) {
void* transform = get_transform(component);
set_position_Injected(transform, position);
}
void(*old_UpdatePlaye)(void *instance);
void UpdatePlaye(void *instance){
bool isMine = *(bool*)((uint64_t)instance + 0xE4);
float userValue2 = [[switches getValueFromSwitch:@"Teleport"] floatValue];
if([switches isSwitchOn:@"Teleport"]) {
if(isMine == true){
setPosition(instance, Vector3(100.0f,0.0f,100.f));
}
}
return old_UpdatePlaye(instance);
}
void setup() {
HOOK(0x184AF3C, UpdatePlaye, old_UpdatePlaye);
But I started it after entering the game and got a crash.I checked over and over again and the offset was correct. The crash should not be caused by the hook offset. Ask for help
#import "Macros.h"
#import "button.h"
struct Vector3{
float x;
float y;
float z;
Vector3();
Vector3(float x, float y, float z);
~Vector3();
};
Vector3::Vector3() {}
Vector3::Vector3(float x, float y, float z) : x(x), y(y), z(z) {}
Vector3::~Vector3() {}
void *(*get_transform)(void *_instance) = (void*(*)(void *))getRealOffset(0x2F23737);
void (*set_position_Injected)(void *_instance, Vector3 _vectorInstance) = (void (*)(void *, Vector3 ))getRealOffset(0x2F2F337);
void setPosition(void *component, Vector3 position) {
void* transform = get_transform(component);
set_position_Injected(transform, position);
}
void(*old_UpdatePlaye)(void *instance);
void UpdatePlaye(void *instance){
bool isMine = *(bool*)((uint64_t)instance + 0xE4);
float userValue2 = [[switches getValueFromSwitch:@"Teleport"] floatValue];
if([switches isSwitchOn:@"Teleport"]) {
if(isMine == true){
setPosition(instance, Vector3(100.0f,0.0f,100.f));
}
}
return old_UpdatePlaye(instance);
}
void setup() {
HOOK(0x184AF3C, UpdatePlaye, old_UpdatePlaye);