Gaztoof / GMod-SDK

A SDK with a built-in cheat for Garry's Mod.
MIT License
123 stars 44 forks source link

vmthook index question #59

Open ANrmlHuman opened 1 year ago

ANrmlHuman commented 1 year ago

https://github.com/Gaztoof/GMod-SDK/blob/df506e7e7bc0ddb31973bdb8f6f00c76497ae65a/GMod-SDK/dllmain.cpp#L81 How did you get 111 as the index?

Gaztoof commented 1 year ago

By analysing. For instance you could look inside the CLuaInterface::FindAndRunScript which has a lot of easily recognizable strings, and see how it works. You'll end up finding a reference to what should be RunString given the arguments that are passed to it and it's location in CLuaInterface image But that will lead to the RunString function, and i'm hooking RunStringEx because it gets called by RunString anyway so it's preferable.