cs2_player_controller

This type represents a CCSPlayerController class.

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

is_enemy

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:is_enemy() then
    -- ...
end

get_name

Method

Returns the sanitized player name.

Arguments

None.

Returns

Type

Description

string

Player's name.

Example


get_pawn

Method

Returns the pawn attached to this controller.

Arguments

None.

Returns

Type

Description

Pawn instance.

Example


get_active_weapon

Method

Returns the active weapon.

Arguments

None.

Returns

Type

Description

Weapon instance.

Example


get_observer_pawn

Method

Returns the observer pawn used for this controller.

Arguments

None.

Returns

Type

Description

Example


get_observer_target

Method

Returns the pawn this controller is currently observing.

Arguments

None.

Returns

Type

Description

Example


get_observer_mode

Method

Returns the current observer mode.

Arguments

None.

Returns

Type

Description

Observer mode.

Example

Last updated