cs2_player_pawn
This type represents a C_CSPlayerPawn class.
should_draw
Method
Returns true if the game will draw this player on screen.
Arguments
None.
Returns
Type
Description
bool
true if will.
Example
if player:should_draw() then
-- ...
endis_left_handed
Method
Returns true if left-hand mode is enabled.
Arguments
None.
Returns
Type
Description
bool
true if left-handed.
Example
if player:is_left_handed() then
-- ...
endget_abs_origin
Method
Returns the absolute origin (the one that is used for rendering).
Arguments
None.
Returns
Type
Description
Origin.
Example
local org = player:get_abs_origin();get_abs_angles
Method
Returns the absolute angles (the one that is used for rendering).
Arguments
None.
Returns
Type
Description
Angles.
Example
local ang = player:get_abs_angles();get_abs_velocity
Method
Returns the absolute velocity.
Arguments
None.
Returns
Type
Description
Velocity.
Example
local vel = player:get_abs_velocity();set_abs_origin
Method
Sets the new absolute origin.
Arguments
Name
Type
Description
Returns
Nothing.
Example
player:set_abs_origin(my_vec);set_abs_angles
Method
Sets new absolute angles.
Arguments
Name
Type
Description
Returns
Nothing.
Example
player:set_abs_angles(my_ang);set_abs_velocity
Method
Sets new absolute velocity.
Arguments
Name
Type
Description
Returns
Nothing.
Example
player:set_abs_velocity(my_vel);is_alive
Method
Returns true if the player is alive.
Arguments
None.
Returns
Type
Description
bool
true if alive.
Example
if player:is_alive() then
-- ...
endis_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
-- ...
endis_enemy_to
Method
Returns whether this player is an enemy to another entity.
Arguments
Name
Type
Description
Returns
Type
Description
bool
true if an enemy.
Example
if player:is_enemy_to(other_player) then
-- ...
endget_active_weapon
Method
Returns the active weapon.
Arguments
None.
Returns
Type
Description
Weapon instance.
Example
local wep = player:get_active_weapon();get_name
Method
Returns the sanitized player name.
Arguments
None.
Returns
Type
Description
string
Player's name.
Example
local name = player:get_name();get_view_offset
Method
Returns the player's view offset (eye location relative to the player's origin).
Arguments
None.
Returns
Type
Description
View offset.
Example
local vo = player:get_view_offset();get_eye_pos
Method
Returns the player's eye position.
Arguments
None.
Returns
Type
Description
Eye position.
Example
local eyes = player:get_eye_pos();Last updated