local function dump_schema(proc)
local entries = proc:cs2_get_schema_dump()
if not entries or #entries == 0 then
log("[LUA] schema dump empty")
return
end
log("[LUA] Dumping " .. #entries .. " schema fields...")
for i = 1, #entries do
local e = entries[i]
if e then
-- format: CPulse_CallInfo::m_nEditorNodeID @ 0x00000010
log(string.format(
"%s @ 0x%08X",
e.name,
e.offset
))
end
end
log("[LUA] Schema dump complete.")
end
function main()
-- Uni API build:
local cs2 = ref_process("cs2.exe")
-- On the CS2 Product build, just use:
-- local cs2 = ref_process()
if not cs2 or not cs2:alive() then
log("[LUA] cs2.exe not found")
return 0
end
local tierBase, tierSize = cs2:get_module("tier0.dll")
if not tierBase then
log("[LUA] tier0.dll not found")
return 0
end
local iface = cs2:cs2_get_interface(tierBase, "VEngineCvar007")
if iface == 0 then
log("[LUA] interface not found!")
return 0
end
log(string.format(
"VEngineCvar007 interface at 0x%016X",
iface
))
dump_schema(cs2)
return 1
end