View previous topic :: View next topic |
Author |
Message |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Sat Sep 03, 2022 10:16 am Post subject: index vtable and call |
|
|
so i want to do like this:
Code: | return player:GetVTable()[2](...) --Note: custom function in player class, passed through GetVTable function but having a little modified version, still calls function |
and i have a little code here:
Code: | function GetVTable(obj, size)
if obj == nil or size == nil then
return nil
end
local vtbl = {}
for i = 0, size / 4 do
vtbl[i] = readPointer(readPointer(obj) + i * 0x4)
end
return vtbl
end |
function returns vtable functions values and i wanted to pass the address through my Call functon
|
|
Back to top |
|
 |
Dark Byte Site Admin
Reputation: 470
Joined: 09 May 2003 Posts: 25791 Location: The netherlands
|
Posted: Sun Sep 04, 2022 12:10 am Post subject: |
|
|
instead of
Code: |
for i = 0, size / 4 do
vtbl[i] = readPointer(readPointer(obj) + i * 0x4)
end
|
do something like
Code: |
for i = 0, size / 4 do
local address=readPointer(readPointer(obj) + i * 0x4)
vtbl[i] = function(...)
return executeMethod(0, nil, address, obj, <parse parameters here>)
end
end
|
you just need to parse the ... parameters and it should behave the way you intended in the first part
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
 |
Frouk Grandmaster Cheater
Reputation: 5
Joined: 22 Jun 2021 Posts: 510
|
Posted: Sun Sep 04, 2022 12:37 am Post subject: |
|
|
Its exactly what i wanted. Thank you
|
|
Back to top |
|
 |
|