players._base module
Provides a class used to interact with a specific player.
-
class
_players.
PlayerMixin
Bases: _entities._entity.BaseEntity
-
__init__
((object)arg1, (int)entity_index) → object
-
get_view_angle
((PlayerMixin)arg1) → QAngle :
Returns the player’s view angle.
-
is_networked
((PlayerMixin)arg1) → bool :
Return True if the entity is networked.
-
is_player
((PlayerMixin)arg1) → bool :
Return True if the entity is a player.
-
is_weapon
((PlayerMixin)arg1) → bool :
Return True if the entity is a weapon.
-
set_view_angle
((PlayerMixin)arg1, (QAngle)arg2[, (Channel)fixangle=1]) → None :
Sets the player’s view angle.
-
snap_to_position
((PlayerMixin)arg1[, (Vector)origin=None[, (QAngle)angles=None]]) → None :
Teleports the player at the given position and angles.
Parameters: |
- origin (Vector) – The coordinates to teleport the player at.
- angles (QAngle) – The angles to set the player’s view to.
|
-
active_devices
Get/set the player’s active devices.
Note
Only available in HL2.
-
active_weapon_handle
Get/set the player’s active weapon_handle.
-
armor
Get/set the player’s armor.
Note
Only available in CS:GO and CS:S.
-
buttons
Get/set the player’s currently pressed buttons.
-
cash
Get/set the player’s cash.
Note
Only available in CS:GO and CS:S.
-
dead
Return whether the player is dead.
-
deaths
Get/set the player’s death count.
-
default_fov
Get/set the player’s default field of view (FOV).
-
desired_player_class
Get/set the player’s desired player class.
Note
Only available in TF2.
-
draw_view_model
Get/set the player’s draw view model.
-
eye_angle
Get/set the player’s eye angle.
-
fall_velocity
Get/set the player’s fall velocity.
-
flags
Get/set the player’s flags.
-
flash_alpha
Get/set the player’s flash alpha.
Note
Only available in CS:GO and CS:S.
-
flash_duration
Get/set the player’s flash duration.
Note
Only available in CS:GO and CS:S.
-
fov
Get/set the player’s field of view (FOV).
-
fov_rate
Get/set the player’s field of view (FOV) rate.
-
fov_start
Get/set the player’s field of view (FOV) start.
-
fov_time
Get/set the player’s field of view (FOV) time.
-
gun_offset
Get/set the player’s gun offset.
-
has_defuser
Get/set whether the player has a defuser.
Note
Only available in CS:GO and CS:S.
-
has_helmet
Get/set whether the player has a helmet.
Note
Only available in CS:GO and CS:S.
-
hidden_huds
Get/set the player’s hidden HUDs.
-
in_bomb_zone
Get/set whether the player is in a bomb zone.
Note
Only available in CS:GO and CS:S.
-
in_buy_zone
Get/set whether the player is in a buy zone.
Note
Only available in CS:GO and CS:S.
-
in_rescue_zone
Get/set whether the player is in a hostage rescue zone.
Note
Only available in CS:GO and CS:S.
-
is_defusing
Get/set whether the player is currently defusing the bomb.
Note
Only available in CS:GO and CS:S.
-
is_ducked
Return whether the player is ducked.
-
is_ducking
Return whether the player is duckeding.
-
kills
Get/set the player’s kill count.
-
last_hitgroup
Get/set the player’s last hitgroup.
-
last_weapon
Get/set the player’s last weapon.
-
life_state
Get/set the player’s life state.
-
nightvision_on
Get/set whether the player is currently using nightvision.
Note
Only available in CS:GO and CS:S.
-
observer_mode
Get/set the player’s observer mode.
-
observer_target
Get/set the player’s observer target.
-
phys_damage_scale
Get/set the player’s physical damage scale.
-
place
Get/set the player’s current place.
-
player_class
Get/set the player’s player class.
-
player_state
Get/set the player’s player state.
-
ragdoll
Get/set the player’s ragdoll.
-
relationship
Get/set the player’s relationship.
-
shots_fired
Get/set the the number of shots fired by the player.
Note
Only available in CS:GO and CS:S.
-
speed
Get/set the player’s speed.
-
stamina
Get/set the player’s stamina.
Note
Only available in CS:GO and CS:S.
-
suit_power_load
Get/set the player’s suit power load.
Note
Only available in HL2.
-
view_angle
Get/set the player’s view angle.
-
view_offset
Get/set the player’s view offset.
-
view_vector
Get/set the player’s view vector.