interface
UserCmdViewA block-scoped view of the CURRENT tick's usercmd (valid only during a ctx.clients.onRunCmd
handler — a stashed UserCmdView used after the handler returns, or across an await,
reads/writes nothing). There is exactly ONE UserCmdView instance for the whole process; every
handler call operates on it.
import type { UserCmdView } from "@s2script/sdk/usercmd";
// examples/usercmd-demo/src/plugin.ts:21 — read this tick's input
ctx.clients.onRunCmd((cmd: UserCmdView, info: { slot: number }) => {
console.log(`slot=${info.slot} fwd=${cmd.forwardMove} btn=${cmd.buttons}`);
});forwardMove: numbersideMove: numberleftmove (which is +LEFT) — this field is
already sign-corrected, so sideMove > 0 always means "moving right".upMove: numberimpulse: numberbuttons: bigintIN_* bit values, mirrors pawn.buttons). 64-bit — always a real bigint.viewAngles: QAngleclearSubtickMoves(): voidforwardMove/sideMove/
upMove write already takes effect without this (live-verified) — call it only if you need to
make sure no residual subtick analog data survives your modify. No-op if there are none.