//Fields
public Transform newoldShotgun; // 0x198
//Method
// RVA: 0x5EB5CC Offset: 0x5EB5CC VA: 0x5EB5CC
private void Update() { }
bool newgun;
void (*old_Update)(void *instance);
void update(void *instance){
if(instance != NULL){
if (newgun) {
void newoldShotgun = *(void *)((uint64_t)instance + 0x198);
}
}
return old_Update(instance);
}
Yeah that’s how you get the transform. Now you gotta use it for something. Idk what that’s supposed to be for but you can like change position or scale or stuff like that@·҉ dollaz·҉. . Like this:-
Code:bool newgun; void (*old_Update)(void *instance); void update(void *instance){ if(instance != NULL){ if (newgun) { void newoldShotgun = *(void *)((uint64_t)instance + 0x198); } } return old_Update(instance); }
public Transform myTransform
{
get{}
private set{}
}
Function pointerWhat if Transform is a return type of a function we want to hook.
C#:public Transform myTransform { get{} private set{} }
I am a beginner, can you please show an example?Function pointer
It’s the same thing depending on what you’re trying to use it for.What if you want to hook the Transform for both the FL and FR wheels, that I know thier position is stored at Vector3 oldWheelFLPos; // 0x98 and Vector3 oldWheelFRPos; // 0xA4 respectively? Both of them are directly referenced from the transform.
Help!
// Namespace:
public class CutsceneVehicleRig : MonoBehaviour // TypeDefIndex: 13
{
// Fields
public Transform wheelFL; // 0x18
public Transform wheelRL; // 0x20
public Transform wheelFR; // 0x28
public Transform wheelRR; // 0x30
public Transform carBody; // 0x38
[Range(0,002, 0,03)]
public float weight; // 0x40
public float groundHeight; // 0x44
public bool AnimateWheelRotation; // 0x48
public CutsceneVehicleRig.pivotPlacement PivotPos; // 0x4C
private Quaternion oldDirection; // 0x50
private Vector3 oldPosition; // 0x60
private float wheelSpin; // 0x6C
private float rotates; // 0x70
private float speed; // 0x84
private bool stopped; // 0x88
private Vector3 oldBodyPos; // 0x8C
private Vector3 oldWheelFLPos; // 0x98
private Vector3 oldWheelFRPos; // 0xA4
private Vector3 oldWheelRLPos; // 0xB0
private Vector3 oldWheelRRPos; // 0xBC
// Methods
// RVA: 0x14900D0 Offset: 0x14900D0 VA: 0x14900D0
private void Start() { }
// RVA: 0x14901FC Offset: 0x14901FC VA: 0x14901FC
public void InitWheelsAndBody() { }
// RVA: 0x1490198 Offset: 0x1490198 VA: 0x1490198
private void ResetAll() { }
// RVA: 0x1490498 Offset: 0x1490498 VA: 0x1490498
private void ResetWheels() { }
// RVA: 0x14905A4 Offset: 0x14905A4 VA: 0x14905A4
private void RotateToPivot(Transform g, Vector3 oldPos) { }
// RVA: 0x1490744 Offset: 0x1490744 VA: 0x1490744
private void Update() { }
// RVA: 0x14911A4 Offset: 0x14911A4 VA: 0x14911A4
public void .ctor() { }
}
#include <iostream> // for debuggingIt’s the same thing depending on what you’re trying to use it for.
void flWheelTransform = *(void *)((uint64_t)instance + 0x18);
And use 0x1490744 (the update you have)
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies
We use cookies to personalize content and ads, to provide social media features and to analyse our traffic. We also share necessary information with our advertising and analytics partners to optimize your experience on our site.
Learn more about cookies