engine table
Functions
get_screen_size(): vec2_t
Returns the screen size
| local screen_size = engine.get_screen_size()
|
is_connected(): bool
Returns true if connected to server
| local is_connected = engine.is_connected()
|
is_in_game(): bool
Returns true if in game
| local is_in_game = engine.is_in_game()
|
get_local_player(): number
Returns the local player index
| local lp_index = engine.get_local_player()
|
Type |
Name |
Description |
number |
index |
Entity index |
Returns the player_info_t object
| local local_info = engine.get_player_info(engine.get_local_player())
|
get_level_name_short(): string
Returns current level name (example: de_mirage)
| local current_map = engine.get_level_name_short()
|
get_player_for_user_id(userid): number
Type |
Name |
Description |
number |
userid |
User ID |
Returns the player index from user id
| local ent_idx = engine.get_player_for_user_id(userid)
|
set_view_angles(viewangles)
Type |
Name |
Description |
angle_t |
viewangles |
Viewangles |
Setting the viewangles
| engine.set_view_angles(angle_t.new(0, 0, 0))
|
get_view_angles(): angle_t
Returns the camera angles
| local view_ang = engine.get_view_angles()
|
execute_client_cmd(cmd)
Type |
Name |
Description |
string |
cmd |
Console command |
Executes command in console
| engine.execute_client_cmd("clear")
|