IToolkitApi
IToolkitAPI
Methods
Log(plugin, msg, )
Logs a formatted message with plugin context.
- plugin IToolkitPlugin* — Plugin instance
- msg const char* — Format string
- ...
ConPrint(msg)
Prints message to console.
- msg const char*
ConPrintf(fmt, )
Prints formatted message to console.
- fmt const char*
- ...
AddListener(plugin, pListener)
Registers a toolkit listener.
- plugin IToolkitPlugin* — Owner plugin
- pListener IToolkitListener* — Listener instance
void* QueryInterface(fn, iface, min)
Queries interface from factory.
- fn CreateInterfaceFn — Factory function
- iface const char* — Interface name
- min int — Minimum version (optional)
void* InterfaceSearch(fn, iface, max, ret)
Searches for interface by iterating versions.
- fn CreateInterfaceFn
- iface const char*
- max int
- ret int*
int FormatIface(, maxlength)
Formats interface name with version.
- char iface[]
- maxlength size_t
CreateInterfaceFn GetEngineFactory(syn)
- syn bool
CreateInterfaceFn GetPhysicsFactory(syn)
- syn bool
CreateInterfaceFn GetFileSystemFactory(syn)
- syn bool
CreateInterfaceFn GetServerFactory(syn)
- syn bool
void* ToolkitFactory(iface, ret, id)
Toolkit interface factory.
- iface const char*
- ret int*
- id PluginId*
void* MetaFactory(iface, ret, id)
Metamod interface factory.
- iface const char*
- ret int*
- id PluginId*
IToolkitAddresses* Addresses()
Access address/pattern system.
IToolkitCommands* Commands()
Access command system.
IToolkitConVars* ConVars()
Access ConVar system.
IToolkitEntities* Entities()
Access entities and Entity I/O system.
IToolkitEvents* Events()
Access event system.
IToolkitGameConfig* GameConfig()
Access game configuration system.
IToolkitMenus* Menus()
Access menu system.
IToolkitMySQL* MySQL()
Access mysql system.
IToolkitScheduler* Scheduler()
Access scheduler system.
IToolkitTrace* Trace()
Access tracing system.
IToolkitModule* LoadModule(name)
Creates and initialises a module wrapper by name.
- name const char* — Module name without extension (e.g. "server").
IToolkitModule* LoadModuleFromMemory(ptr)
Creates and initialises a module wrapper from an address inside it.
- ptr uintptr_t — Any address that belongs to the target module.
FreeModule(module)
Releases a module previously obtained from LoadModule() / LoadModuleFromMemory().
- module IToolkitModule*
IGameEventManager2* GetGameEventManager()
CGlobalVars* GetGlobalVars()
ICvar* GetCVar()
ISource2Server* GetSource2Server()
IVEngineServer* GetEngineServer()
IGameEventSystem* GetGameEventSystem()
INetworkMessages* GetNetworkMessages()
INetworkServerService* GetNetworkServerService()
CGameEntitySystem* GetEntitySystem()
CSchemaSystem* GetSchemaSystem()
const char* GetBaseDir()
Returns base directory of the server.
size_t Format(buffer, maxlength, format, )
Formats string into buffer.
- buffer char*
- maxlength size_t
- format const char*
- ...
size_t FormatArgs(buffer, maxlength, format, ap)
Formats string using va_list.
- buffer char*
- maxlength size_t
- format const char*
- ap va_list