Help! Questions about Teleport Hack

sukiop

Solid & Active Platinian
Original poster
Jul 2, 2020
84
18
53
19
iphone
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);
 

·҉ dollaz·҉. .

Approved iModder
Approved iModder
Mar 26, 2021
159
1,819
193
Somewhere
Ima assume it’s a unity framework game cause of the short offset and cause its crashing on launch. For pointers you gotta split it
C++:
#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 (*set_position_Injected)(void *_instance, Vector3 _vectorInstance);

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.0f));

}
}
return old_UpdatePlaye(instance);
}



void setup() {
HOOK(0x184AF3C, UpdatePlaye, old_UpdatePlaye);
get_transform = (void*(*)(void *))getRealOffset(0x2F23737);
set_position_Injected = (void (*)(void *, Vector3 ))getRealOffset(0x2F2F337);
this should work
 
Last edited:

sukiop

Solid & Active Platinian
Original poster
Jul 2, 2020
84
18
53
19
iphone
我认为这是一个统一框架游戏导致的短偏移并导致其在启动时崩溃。对于指针,你必须将其拆分
[代码=cpp]#import“Macros.h”
#导入“按钮.h”

结构向量3{
浮动x;
浮动y;
浮点z;

向量3();
Vector3(浮点x,浮点y,浮点z);
〜矢量3();
};


Vector3::Vector3() {}
Vector3::Vector3(浮点 x, 浮点 y, 浮点 z) : x(x), y(y), z(z) {}
Vector3::~Vector3() {}

无效*(*get_transform)(无效*_instance);
void (*set_position_Injected)(void *_instance, Vector3 _vectorInstance);

void setPosition(void *component, Vector3 位置) {
无效*变换= get_transform(组件);
set_position_Injected(变换,位置);
}


void(*old_UpdatePlaye)(void *实例);

void UpdatePlaye(void *实例){

bool isMine = *(bool*)((uint64_t)instance + 0xE4);

float userValue2 = [[开关 getValueFromSwitch:@"Teleport"] floatValue];


if([开关 isSwitchOn:@"Teleport"]) {

if(isMine == true){

setPosition(实例, Vector3(100.0f,0.0f,100.0f));

}
}
返回old_UpdatePlaye(实例);
}



无效设置(){
HOOK(0x184AF3C,UpdatePlaye,old_UpdatePlaye);
get_transform = (void*(*)(void *))getRealOffset(0x2F23737);
set_position_Injected = (void (*)(void *, Vector3 ))getRealOffset(0x2F2F337);[/CODE]

这应该有效
[/引用]
Ima assume it’s a unity framework game cause of the short offset and cause its crashing on launch. For pointers you gotta split it
C++:
#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 (*set_position_Injected)(void *_instance, Vector3 _vectorInstance);

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.0f));

}
}
return old_UpdatePlaye(instance);
}



void setup() {
HOOK(0x184AF3C, UpdatePlaye, old_UpdatePlaye);
get_transform = (void*(*)(void *))getRealOffset(0x2F23737);
set_position_Injected = (void (*)(void *, Vector3 ))getRealOffset(0x2F2F337);
this should work
Thank you very much for your help, I will try later
 

sukiop

Solid & Active Platinian
Original poster
Jul 2, 2020
84
18
53
19
iphone
Ima assume it’s a unity framework game cause of the short offset and cause its crashing on launch. For pointers you gotta split it
C++:
#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 (*set_position_Injected)(void *_instance, Vector3 _vectorInstance);

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.0f));

}
}
return old_UpdatePlaye(instance);
}



void setup() {
HOOK(0x184AF3C, UpdatePlaye, old_UpdatePlaye);
get_transform = (void*(*)(void *))getRealOffset(0x2F23737);
set_position_Injected = (void (*)(void *, Vector3 ))getRealOffset(0x2F2F337);
this should work
I still got the game crashing
 

sukiop

Solid & Active Platinian
Original poster
Jul 2, 2020
84
18
53
19
iphone
Using Mshook, I will not be able to see the interface of the game, and using your method, I will crash when I enter the game and start the game
 

sukiop

Solid & Active Platinian
Original poster
Jul 2, 2020
84
18
53
19
iphone
If I were to modify the set_localscale function, what would my Vector3.h look like
Ima assume it’s a unity framework game cause of the short offset and cause its crashing on launch. For pointers you gotta split it
C++:
#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 (*set_position_Injected)(void *_instance, Vector3 _vectorInstance);

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.0f));

}
}
return old_UpdatePlaye(instance);
}



void setup() {
HOOK(0x184AF3C, UpdatePlaye, old_UpdatePlaye);
get_transform = (void*(*)(void *))getRealOffset(0x2F23737);
set_position_Injected = (void (*)(void *, Vector3 ))getRealOffset(0x2F2F337);
this should work
 

sukiop

Solid & Active Platinian
Original poster
Jul 2, 2020
84
18
53
19
iphone
Ima assume it’s a unity framework game cause of the short offset and cause its crashing on launch. For pointers you gotta split it
C++:
#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 (*set_position_Injected)(void *_instance, Vector3 _vectorInstance);

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.0f));

}
}
return old_UpdatePlaye(instance);
}



void setup() {
HOOK(0x184AF3C, UpdatePlaye, old_UpdatePlaye);
get_transform = (void*(*)(void *))getRealOffset(0x2F23737);
set_position_Injected = (void (*)(void *, Vector3 ))getRealOffset(0x2F2F337);
this should work
I want to know how a hit box works