players package

Module contents

Provides player based functionality.

class players.BaseClient(*args, *, wrap=False, auto_dealloc=True)

Bases: memory.manager.CustomType

fire_game_event

Fires the given game event to this client.

Parameters:game_event (GameEvent) – The game event instance to fire.
set_name

Return the virtual function.

class players.Client

Bases: _net_channel.NetChannelHandler

__init__()

Raises an exception This class cannot be instantiated from Python

disconnect((Client)arg1, (str)arg2) → None
is_active((Client)arg1) → bool :

Return True if client active is ingame, receiving snapshots.

is_connected((Client)arg1) → bool :

Return True if client has established network channels.

is_fake_client((Client)arg1) → bool :

Return True if client is not a real player.

is_hearing_client((Client)arg1, (Client)sender) → bool :

Return True if client hears this player.

is_hltv((Client)arg1) → bool :

Return True if client is a HLTV proxy.

is_human_player((Client)arg1) → bool :

Return True if client is not a fake client and is not a HLTV proxy.

is_proximity_hearing_client((Client)arg1, (Client)sender) → bool :

Return True if client hears this player by proximity.

is_spawned((Client)arg1) → bool :

Return True if client is downloading signon data.

name

Return the client’s name.

net_channel
slot

Return the client’s slot.(usually entity number-1)

steamid
userid

Return the client’s userid.

class players.PlayerGenerator

Bases: Boost.Python.instance

__init__((object)arg1) → None
class players.PlayerInfo

Bases: Boost.Python.instance

__init__()

Raises an exception This class cannot be instantiated from Python

is_connected((PlayerInfo)arg1) → bool :

Returns whether the player is connected.

is_dead((PlayerInfo)arg1) → bool :

Returns whether the player is dead.

is_fake_client((PlayerInfo)arg1) → bool :

Returns whether the player is a fake client.

is_hltv((PlayerInfo)arg1) → bool :

Returns whether the player is HLTV.

is_in_a_vehicle((PlayerInfo)arg1) → bool :

Returns whether the player is in a vehicle.

is_observer((PlayerInfo)arg1) → bool :

Returns whether the player is an observer.

is_player((PlayerInfo)arg1) → bool :

Returns whether the player is a client.

angles

Returns the player’s angle QAngle instance.

armor

Returns the player’s armor value.

deaths

Returns the player’s death count.

health

Returns the player’s health.

kills

Returns the player’s frag count.

last_user_command
max_health

Returns the player’s maximum health.

maxs

Returns the player’s max Vector instance.

mins

Returns the player’s min Vector instance.

model_name

Returns the name of the player’s model.

name

Returns the player’s name

origin

Returns the player’s origin Vector instance.

steamid

Returns the player’s SteamID.

team

Returns the player’s team number.

userid

Returns the player’s userid.

weapon_name

Returns the name of the weapon the player is carrying.

class players.UserCmd

Bases: Boost.Python.instance

__init__((object)arg1) → None
reset((UserCmd)arg1) → None
aim_direction

Not implemented on this engine.

buttons

Button states.

checksum
command_number

For matching server and client commands for debugging.

forward_move

Forward velocity.

has_been_predicted

Client only, tracks whether we’ve predicted this command at least once.

head_angles

Not implemented on this engine.

head_offset

Not implemented on this engine.

impulse

Impulse command.

mousedx

Mouse accum in x from create move.

mousedy

Mouse accum in y from create move.

random_seed

For shared random functions.

side_move

Sideways velocity.

tick_count

The tick the client created this command.

up_move

Upward velocity.

view_angles

Player instantaneous view angles.

weaponselect

Current weapon ID.

weaponsubtype

Current weapon ID.