Field access
pawn.m_iHealth and pawn["m_iHealth"] both work. Assignment writes straight to game memory: pawn.m_flVelocityModifier = 1.0.
Unknown fields, unsupported types, and protected memory access raise errors.
Writable: booleans, numbers,
Vector/QAngle (assign a typed object or the {x=,y=,z=} / {pitch=,yaw=,roll=} table). Everything else is read-only.
int64 and uint64 use Lua numbers and are exact only through 2^53.
Object properties
GetLocalPlayer
nil when not spawned.
GetLocalPlayerOrSpec
GetLocalController
nil.
players / controllers
GetEyePosition
Vector (origin + view offset), or nil for non-player entities.
IsAlive
true if the entity has health > 0.
IsEnemy
true if the entity is an enemy of the local player. Respects mp_teammates_are_enemies. Returns false when there is no local pawn or the entity isn’t a player pawn.
GetWeaponData
CCSWeaponBaseVData as an entity object, or nil. Pass a player pawn for its active weapon, or a weapon entity directly.
Weapon stats such as damage, penetration, range, armor ratio, and max speed live on this object.
GetWeaponType
GetWeaponData. Returns a number, or nil.
Use this helper because schema enum fields are not supported by direct field access.
Cast
cheat.FindPattern) or re-types an existing object. Errors on unknown class names. Returns nil for a null address.
Handles and entity-list results use the runtime class. Pointer fields use their declared class. Use
:Cast for derived fields. Unknown pointer classes return plain addresses.