players package

Subpackages

Submodules

Module contents

Provides player based functionality.

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

Bases: CustomType

fire_game_event

Fires the given game event to this client.

Parameters:

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

property set_name

Return the virtual function.

class players.Client

Bases: 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.

property name

Return the client’s name.

property net_channel

None( (_players.Client)arg1) -> _net_channel.NetChannel

property slot

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

property steamid

None( (_players.Client)arg1) -> str

property userid

Return the client’s userid.

class players.PlayerGenerator

Bases: instance

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

Bases: 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.

property angles

Returns the player’s angle QAngle instance.

property armor

Returns the player’s armor value.

property deaths

Returns the player’s death count.

property health

Returns the player’s health.

property kills

Returns the player’s frag count.

property last_user_command

None( (_players.PlayerInfo)arg1) -> _players._bots.BotCmd

property max_health

Returns the player’s maximum health.

property maxs

Returns the player’s max Vector instance.

property mins

Returns the player’s min Vector instance.

property model_name

Returns the name of the player’s model.

property name

Returns the player’s name

property origin

Returns the player’s origin Vector instance.

property steamid

Returns the player’s SteamID.

property team

Returns the player’s team number.

property userid

Returns the player’s userid.

property weapon_name

Returns the name of the weapon the player is carrying.

class players.UserCmd

Bases: instance

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

Not implemented on this engine.

property buttons

Button states.

property checksum

None( (_players.UserCmd)arg1) -> int

property command_number

For matching server and client commands for debugging.

property forward_move

Forward velocity.

property has_been_predicted

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

property head_angles

Not implemented on this engine.

property head_offset

Not implemented on this engine.

property impulse

Impulse command.

property mousedx

Mouse accum in x from create move.

property mousedy

Mouse accum in y from create move.

property random_seed

For shared random functions.

property side_move

Sideways velocity.

property tick_count

The tick the client created this command.

property up_move

Upward velocity.

property view_angles

Player instantaneous view angles.

property weaponselect

Current weapon ID.

property weaponsubtype

Current weapon ID.