Tutorial Vector3 Player Scale (Source Code) Il2cpp

Numark

Awesome Active Platinian
Original poster
May 23, 2017
116
929
193
Slice Cast here, with another tutorial. I will give out a source code of a Player Scale Mod that could work for many games. I don't mind showing you it, but its a simple code.

C++:
void PlayerScaleUp(void* myplayer) {
    Vector3 mysize = get_localScale(GetTransform(myplayer));
    Vector3 mysize2 = mysize + Vector3(0.5,0.5,0.5);
    set_localScale(GetTransform(myplayer), mysize2);
}
Get the transform from a players class or Unity's.

Edit: Since many people get errors and don't know what they're doing... You need to put your PlayerScaleUp code by putting it in your Update Hooks so the mod works.
 
Last edited:

sukiop

Solid & Active Platinian
Jul 2, 2020
84
18
53
19
iphone
void *(*GetTransform)(void *component) = (void *(*)(void *)) getRealOffset(0x2F22760);

void (*get_localScale)(void *transform, Vector3 newlocal) = (void (*)(void*, Vector3))getRealOffset(0x2F2F9A4);

void (*set_localScale)(void *transfor, Vector3) = (void (*)(void*, Vector3))getRealOffset(0x2F2F975);


void (*old_updat)(void *myplayer);
void UpdatePlaye(void *myplayer) {

if([switches isSwitchOn:@"1"]){

Vector3 mysize = get_localScale(GetTransform(myplayer));

Vector3 mysize2 = mysize +
Vector3(0.5,0.5,0.5);

set_localScale(GetTransform(myplayer), mysize2);
}


old_updat(myplayer);
}



void setup() {
HOOK(0x2A62100, UpdatePlaye, old_updat);
 

Attachments