Hitboxes
GetHitboxPosition
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
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
0 when the shot cannot be simulated or hit the target.
FireBullet
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 frompawn.m_pWeaponServices.m_hActiveWeapon. Read weapon stats with entity.GetWeaponData.
CanShoot
true if the local player can fire right now: holding a gun, has ammo, not reloading, attack cooldown elapsed.
Spread
GetInaccuracy
nil if prediction hasn’t run. This is the value the server will evaluate, sampled mid-prediction (not the stale post-restore value).
GetSpread
nil.
Recoil
GetAimPunch
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 offentity.GetLocalPlayer().
These track the controlled player and freeze while you’re spectating. For observer-camera visuals use entity.GetLocalPlayerOrSpec() instead.
GetLocalEyePos
GetLocalViewAngles
GetViewAngles / SetViewAngles
SetViewAngles and changes to cmd.viewangles visibly move the camera.
Console
ExecuteCommand
+ and - input-bind commands are rejected; use the button API instead. Calls made off the game thread are queued.
Player name
SetName
nil restores the real name.
ResetName
Subticks
ClearSubtickMovement
true to remove angle deltas too. Available only in movement and createmove.
GetSubticks
movement and createmove.
AddSubtick
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
movement and createmove only.
These functions change the command directly. Set
subtick to emit a timed subtick edge.
Prediction
GetMaxSpeed
GetPostState
nil when prediction hasn’t run.
Network
GetPing
GetServerTick
GetClientTick
GetServerAddress
nil.
GetTimeConnected
Hitbox constants
Only the common aim targets are bound. Valid indices run
0 to 18; pass the raw number for limb hitboxes.