Interface Helper Library, loaded by requiring "gamesense/interface"



interface(module_name: string, interface_name: string): cdata (interface object pointer)

Creates an interface and returns an interface object pointer pointing to it


interface(ptr: cdata / userdata): cdata (interface object pointer)

Converts the given pointer to an interface object pointer and returns it


In order to bind functions to an interface object, you have to index it with any desirable name and set it to a table that contains 2 or more elements. The first being either an index or a pattern of the needed function, and the other ones being the type definition.

local surface = interface("vguimatsurface.dll", "VGUI_Surface031")

surface.draw_colored_text = {
	"void(__thiscall*)(void*, unsigned int, int, int, int, int, int, int, const char*, va_list)"

client.set_event_callback("paint_ui", function()
	surface.draw_colored_text(0x0000003f, 8, 5, 255, 255, 255, 255, "halflifefan said hi", nil)

Last updated