Skip to main content
Combat and game-state helpers.

Hitboxes

GetHitboxPosition

Returns the world-space center Vector of a hitbox, or nil for a non-player entity or one with no valid skeleton. hitbox_id is a hitbox constant or a raw index 0 to 18.

GetHitboxData

Same arguments as GetHitboxPosition, but returns the whole shape.

Visibility

Build it from Trace: trace.Shape from GetLocalEyePos() to GetHitboxPosition(), plus trace.Smoke if you care about smokes. Loop hitboxes yourself for multipoint.

Damage

GetDamage

Returns estimated integer damage after penetration, range falloff, hitgroup scaling, and armor. Returns 0 when the shot cannot be simulated or hit the target.

FireBullet

Simulates a shot from start to end. target_pawn limits the target when provided. Returns nil if the local player or weapon data is unavailable.

Weapon

Read weapon state from pawn.m_pWeaponServices.m_hActiveWeapon. Read weapon stats with entity.GetWeaponData.

CanShoot

Returns true if the local player can fire right now: holding a gun, has ammo, not reloading, attack cooldown elapsed.

Spread

GetInaccuracy

Predicted weapon inaccuracy for the current tick, or nil if prediction hasn’t run. This is the value the server will evaluate, sampled mid-prediction (not the stale post-restore value).

GetSpread

Predicted weapon base spread, or nil.

Recoil

GetAimPunch

Returns the current aim punch as a QAngle, or nil when no local player is available.

Local state

Values you can’t read off the pawn directly. Everything else (origin, velocity, tickbase) is a plain schema field, read off entity.GetLocalPlayer(). These track the controlled player and freeze while you’re spectating. For observer-camera visuals use entity.GetLocalPlayerOrSpec() instead.

GetLocalEyePos

GetLocalViewAngles

The view angles the cheat’s own features solve against, sampled once per command.

GetViewAngles / SetViewAngles

Gets or sets the live camera angles. Both SetViewAngles and changes to cmd.viewangles visibly move the camera.

Console

ExecuteCommand

Executes a console command. + and - input-bind commands are rejected; use the button API instead. Calls made off the game thread are queued.

Player name

SetName

Changes the local player name. Returns whether it succeeded. Passing nil restores the real name.

ResetName

Restores the local player’s real name. Returns whether it succeeded.

Subticks

ClearSubtickMovement

Drops movement deltas from the current command’s subtick steps. Steps containing only movement are removed; button and angle steps are kept. Pass true to remove angle deltas too. Available only in movement and createmove.
Writing cmd.buttons afterwards puts steps back: the diff goes through the engine’s button path, which emits a subtick step per changed bit.

GetSubticks

Returns the current command’s subtick steps in order. Available only in movement and createmove.

AddSubtick

Appends a step to the current command. Available only in movement and createmove. Returns false at the step limit. Fields are optional: when, button, pressed, forward_delta, left_delta, pitch_delta, and yaw_delta. Unset fields default to 0 or false. Movement values are deltas from the movement service’s last command. For example:

Buttons

AddButton / RemoveButton

Press or release a button directly. movement and createmove only. These functions change the command directly. Set subtick to emit a timed subtick edge.

Prediction

GetMaxSpeed

Predicted max movement speed from the last prediction run.

GetPostState

The local player’s state after the prediction run for this command, which is where the player ends the tick and what the server evaluates. nil when prediction hasn’t run.

Network

GetPing

Network latency in milliseconds. Every other time value in the API is in seconds.

GetServerTick

GetClientTick

GetServerAddress

Server IP/hostname string, or nil.

GetTimeConnected

Hitbox constants

Only the common aim targets are bound. Valid indices run 0 to 18; pass the raw number for limb hitboxes.