CyberM.inspector

Runs inside the game process. Reads and presentation are local; anything that changes shared state has to go through the server.

client runtime3 functionsMarkdown

enable

GAME

CyberM.inspector.enable([enabled])

Turns the permanent aim ray on or off.

Turning it off also clears the outline: the outline belongs to the session that asked for it and must not outlive it.

Parameters

  • enabledbooleanoptionaldefault true

Returns

  • true
  • reason, when the first is nil

Registered in ResourceHost.cpp as LuaInspectorEnable (line 6641).

CyberM.inspector.outline([enabled])

Outlines the aimed object, independently of the ray.

Lets a caller read the target without painting the world. The outline uses entRenderHighlightEvent, the same event focus mode and scanning already use.

Parameters

  • enabledbooleanoptionaldefault true

Returns

  • true
  • reason, when the first is nil

Registered in ResourceHost.cpp as LuaInspectorOutline (line 6642).

target

GAME

CyberM.inspector.target()

What the aim ray is currently pointing at.

Reads a snapshot, never a probe. The ray has to be cast on the game thread, and the plugin refreshes it at 10 Hz, so calling this costs nothing and cannot land a raycast on the wrong thread. Always returns a table when a game is present. valid separates "nothing in view" from "no game" — the latter returns nil, reason.

Returns

  • table { valid, engineId, class, name, kind, position, distance }
  • reason, when the first is nil

Example

local t = CyberM.inspector.target()
if t and t.valid then
    print(t.kind, t.name, t.distance)   --> door  Door  1.38
end

Registered in ResourceHost.cpp as LuaInspectorTarget (line 6640).

For agents and LLMs: this page as Markdown · llms.txt · llms-full.txt