C_CSPlayerPawn

This type represents a C_CSPlayerPawn class.

circle-info

This type inherits C_BaseEntity type. All of its base methods and fields are also available in this type.

ShouldDraw

Method

Returns true if the game will draw this player on screen.

Arguments

None.

Returns

Type

Description

bool

true if will.

Example

if player:ShouldDraw() then
    -- ...
end

IsLeftHanded

Method

Returns true if left-hand mode is enabled.

Arguments

None.

Returns

Type

Description

bool

true if left-handed.

Example


GetAbsOrigin

Method

Returns the absolute origin (the one that is used for rendering).

Arguments

None.

Returns

Type

Description

Origin.

Example


GetAbsAngles

Method

Returns the absolute angles (the one that is used for rendering).

Arguments

None.

Returns

Type

Description

Angles.

Example


GetAbsVelocity

Method

Returns the absolute velocity.

Arguments

None.

Returns

Type

Description

Velocity.

Example


SetAbsOrigin

Method

Sets the new absolute origin.

Arguments

Name

Type

Description

vec

New origin.

Returns

Nothing.

Example


SetAbsAngles

Method

Sets new absolute angles.

Arguments

Name

Type

Description

ang

New angles.

Returns

Nothing.

Example


SetAbsVelocity

Method

Sets new absolute velocity.

Arguments

Name

Type

Description

vel

New velocity.

Returns

Nothing.

Example


IsAlive

Method

Returns true if the player is alive.

Arguments

None.

Returns

Type

Description

bool

true if alive.

Example


IsEnemy

Method

Returns true if this player is an enemy to the local player.

Arguments

None.

Returns

Type

Description

bool

true if an enemy.

Example


IsEnemyTo

Method

Returns whether this player is an enemy to another entity.

Arguments

Name

Type

Description

ent

Other entity.

Returns

Type

Description

bool

true if an enemy.

Example


GetActiveWeapon

Method

Returns the active weapon.

Arguments

None.

Returns

Type

Description

Weapon instance.

Example


GetWeapons

Method

Returns all weapons in this player's inventory.

Arguments

None.

Returns

Type

Description

Weapon list

Example


GetName

Method

Returns the sanitized player name.

Arguments

None.

Returns

Type

Description

string

Player's name.

Example


GetViewOffset

Method

Returns the player's view offset (eye location relative to the player's origin).

Arguments

None.

Returns

Type

Description

View offset.

Example


GetEyePos

Method

Returns the player's eye position.

Arguments

None.

Returns

Type

Description

Eye position.

Example


GetHitbox

Method

Returns hitbox information for a specific hitbox. Not to be confused with GetHitboxCenter.

Arguments

Name

Type

Description

index

The hitbox ID

Returns

Type

Description

Hitbox info

Example


GetHitboxCenter

Method

Returns hitbox position for a specific hitbox.

Arguments

Name

Type

Description

index

The hitbox ID

Returns

Type

Description

The position

Example


GetBoundingBox

Method

Returns the bounding box rectangle for this player. Returns nil if the player is not on screen.

circle-info

If you wish to add new items to the built-in visuals, look at the playerInfo callback.

Arguments

None.

Returns

Type

Description

Player's bounding box, nil if invalid.

Example

Last updated