cengine_client
An instance of this type provides a way to interface with Source 2's Engine-to-Client service.
get_last_timestamp
Method
Returns last timestamp, in seconds.
Arguments
None.
Returns
float
Timestamp, in seconds.
Example
get_last_server_tick
Method
Returns last server tick number.
Arguments
None.
Returns
int
Server tick number.
Example
in_game
Method
Returns whether the client is currently in game.
Arguments
None.
Returns
bool
In-game status.
Example
is_connected
Method
Returns whether the client is currently connected to a game server.
Arguments
None.
Returns
bool
true
if connected.
Example
get_netchan
Method
Returns the Network Channel used for network communication.
Arguments
None.
Returns
Network channel, or nil
if does not exist.
Example
client_cmd
Method
Executes a client-sided console command.
Arguments
cmd
string
Command to execute.
bool
unrestricted
Whether should the execution preserve any restrictions. Defaults to false
.
Returns
Nothing.
Example
get_screen_size
Method
Returns client window screen size.
Arguments
None.
Returns
int
Width.
int
Height.
Example
Last updated