C_CSPlayerController

This type represents a CCSPlayerController class.

circle-info

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

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

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

GetName

Method

Returns the sanitized player name.

Arguments

None.

Returns

Type

Description

string

Player's name.

Example


GetPawn

Method

Returns the pawn attached to this controller.

Arguments

None.

Returns

Type

Description

Pawn instance.

Example


GetActiveWeapon

Method

Returns the active weapon.

Arguments

None.

Returns

Type

Description

Weapon instance.

Example


GetObserverPawn

Method

Returns the observer pawn used for this controller.

Arguments

None.

Returns

Type

Description

Example


GetObserverTarget

Method

Returns the pawn this controller is currently observing.

Arguments

None.

Returns

Type

Description

Entity.

Example


GetObserverMode

Method

Returns the current observer mode.

Arguments

None.

Returns

Type

Description

Observer mode.

Example


GetSteamID

Method

Returns this player's Steam ID64.

Arguments

None.

Returns

Type

Description

table<number>

The 64 bits of this player's steam ID, separated in two 32 bit values: low and high.

Example


GetStringSteamID

Method

Returns this player's Steam ID64, as a string.

Arguments

None.

Returns

Type

Description

string

The steam ID in string format

Example

Last updated