Page 1 of 1

Calling Hookcore Functions

Posted: Sun Jul 16, 2017 3:51 pm
by Silica
Hope someone is still reading here :p

I'm having trouble using the HookCore functions in a lua script, I can't seem to figure out how to call Interfaces outside of the core.

e.g. I would like to execute the Clear comnand from the IConsole interface.

Clear(); -> error (Why do recv- and Sendpacket work tho)
Console:Clear(); -> nil value
IConsole:Clear; -> non static

after HookCore;GetConsole(); or Hookcore.GetConsole.Clear(); gave no results either I gave up :/

Re: Calling Hookcore Functions

Posted: Sun Jul 16, 2017 11:11 pm
by atom0s
You should be obtaining the console via:

Code: Select all

local con = HookCore:GetConsole();
Or to directly call Clear you can do:

Code: Select all

HookCore:GetConsole():Clear();

Re: Calling Hookcore Functions

Posted: Mon Jul 17, 2017 2:38 am
by Silica
Thanks! :)

Pretty sure I've tried using "HookCore:GetConsole();" before, trying to print it for any result wasnt such a good Idea though~