Load When Injected (C++)
I've been fooling around with VS lately and I'm just wondering how do I load (run, without require) all my shit when it gets injected (shInject, Extreme Injector, etc.) into Garry's Mod. Thanks. I'm still new to o C++.
If your talking about how to run your C++ code when injected, put your code in DllMain. If you mean loading your lua then you gotta get gmods lua vtables, by either dumping them urself from luashared or just using the ones HerpDerpenstine posted (if your ok with fixing the errors), then you gotta dllimport GetLuaInterface and do a whole bunch of shit (you can paste it from Herp's post) to get down to CLuaShared(i think thats the one with RunString) then load your files and cLuaShared->RunString them, although this will mean you will have to uninject and inject every time u want to run your code |: