engine#
get_view_angles#
Returns current player's client view angles
Example
execute_cmd#
Executes a provided command
| Fields | Description |
|---|---|
command_namestring |
console command name |
Example
get_choked_commands#
Returns the number of choked commands
Example
get_last_acknowledged_command#
Returns the last acknowledged command
Example
get_last_outgoing_command#
Returns the last outgoing command
Example
get_latency#
Returns latency
| Fields | Description |
|---|---|
latency_typee_latency_flows |
[optional] latency type (outgoing by default) |
Example
get_level_name#
Returns the level name as a string
Example
get_level_name_short#
Returns a short version of the level name as a string
Example
is_app_active#
Returns if the application is active or not (e.g. whether you're tabbed in or not)
Example
get_local_player_index#
Returns the local player's entity index
Example
get_player_index_from_user_id#
Returns player entity index from their user id
| Fields | Description |
|---|---|
user_idint |
player's user id |
Example
local function event_callback(event_info)
local user_id = engine.get_player_index_from_user_id(event_info.userid)
print(user_id)
end
is_connected#
Returns if the user is connected to a server
Example
is_in_game#
Returns if the user is in game
Example
play_sound#
Plays a sound on the client
| Fields | Description |
|---|---|
namestring |
sound name |
volumefloat |
[optional] sound's volume |
pitchint |
[optional] sound's pitch |
Example
get_view_angles#
returns camera angles
set_view_angles#
sets camera angles
get_bomb_radius#
returns bomb radius dependent on map and game mode
get_bsp_entity#
returns bsp entity info for the specified classname
get_bsp_entities#
returns all bsp entity infos