Help! Method with object[] array

frc7400

Platinian
Original poster
Jul 11, 2023
8
0
3
Us
Is there a way to hook methods with object[] argument?
I tried using monoArray but I'm unsure about how to use it as an argument
Code:
    // RVA: 0xA61170 Offset: 0xA61170 VA: 0xA61170
    public void InfoRequest(_Player Player, object[] Data) { }
C++:
void (*InfoRequest)(void* instance, monoArray<void**>* Data);
void (*old_Player)(void *instance);
void get_Player(void *instance) {
    float value = 0.1f;
    monoArray<void**>* Data = new monoArray<void**>; 
    Data->max_length = 2;
    Data->vector[0] =  (void *)&value;
    Data->vector[1] = (void *)1;
    if (instance!=NULL){
        InfoRequest(instance, Data);
      }
   old_Player(instance);
}
Thanks
 
I tried it like how you have and it's just crashing my game, I'm not very familiar with arrays though so I'm probably doing something wrong
Absolutely, a simple copy-paste won't make it work
And I'm not inclined to explain anything so don't ask anymore
You already have your own thread