cs2_player_controller
This type represents a CCSPlayerController
class.
is_enemy
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
Returns the sanitized player name.
Arguments
None.
Returns
Type
Description
string
Player's name.
Example
local name = player:get_name();
get_pawn
Returns the pawn attached to this controller.
Arguments
None.
Returns
Type
Description
Pawn instance.
Example
local pawn = ctrl:get_pawn();
get_active_weapon
Returns the active weapon.
Arguments
None.
Returns
Type
Description
Weapon instance.
Example
local wep = player:get_active_weapon();
get_observer_pawn
Returns the observer pawn used for this controller.
Arguments
None.
Returns
Type
Description
Entity.
Example
local obs_pawn = ctrl:get_observer_pawn();
get_observer_target
Returns the pawn this controller is currently observing.
Arguments
None.
Returns
Type
Description
Entity.
Example
local obs = ctrl:get_observer_target();
get_observer_mode
Returns the current observer mode.
Arguments
None.
Returns
Type
Description
Observer mode.
Example
local mode = ctrl:get_observer_mode();
Last updated