CS2 Extended API

This API is available in both the Uni API and the CS2 product.

In the CS2 product, all standard Proc API functions are supported except:

  • Process referencing by PID/name

  • Engine-specific helpers

  • Virtual memory allocation (alloc_vm / free_vm)

On CS2 Product, ref_process() always returns the CS2 process only, so it is used like:

local cs2 = ref_process()  -- for CS2 Product only

There is no memory allocation API exposed in the CS2 product.


🔗 process:cs2_get_interface(module_base, name)

Resolves a CreateInterface-style interface exported by a CS2 module.

addr = process:cs2_get_interface(module_base, name)

Parameters

  • module_base Base address of the module that exports CreateInterface, e.g.:

    • "tier0.dll"

    Typically obtained via:

    local base, size = process:get_module("tier0.dll")
  • name Interface name string, e.g.:

    • "VEngineCvar007"

Returns

  • Absolute pointer to the resolved interface (Lua integer).

  • 0 if the interface cannot be found or the arguments are invalid.


🧬 process:cs2_get_schema_dump()

Dumps all Schema System fields for client.dll via schemasystem.dll.

Return value

A Lua array-style table (1..N) where each element is a table:

Fields

  • name"ClassName::fieldName", UTF-8 string e.g. "CPulse_CallInfo::m_nEditorNodeID", "C_BaseEntity::m_iHealth"

  • offset — field offset from the base of that class.

If no schema data can be read, returns an empty table.


🧪 Example – Interface Lookup + Schema Dump (Lua)

Last updated