EngineClient
Fields
This class has no fields.
Functions
ExecuteClientCmd
Name | Type | Description |
---|---|---|
value | string | Command |
EngineClient.ExecuteClientCmd("r_cleardecals")
GetNetChannelInfo
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | INetChannelInfo* | INetChannelInfo pointer |
local net_chann = EngineClient.GetNetChannelInfo()
GetScreenSize
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | Vector2 | Size of game window |
local screen_size = EngineClient.GetScreenSize()
print(screen_size.x, screen_size.y)
GetViewAngles
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | QAngle | View angles |
local view_angles = EngineClient.GetViewAngles()
print(view_angles.pitch, view_angles.yaw, view_angles.roll)
SetViewAngles
Name | Type | Description |
---|---|---|
view_angles | QAngle | New view angles value |
EngineClient.SetViewAngles(QAngle.new(-90.0, 120.0, 0.0))
GetLocalPlayer
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | int | Local player index |
local local_player = EngineClient.GetLocalPlayer()
print(local_player)
IsConnected
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | bool | Is player connected to any server |
local is_connected = EngineClient.IsConnected()
IsInGame
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | bool | Is player in game |
local in_game = EngineClient.IsInGame()
GetPlayerForUserID
Name | Type | Description |
---|---|---|
user_id | int | Client user id |
Return value
Name | Type | Description |
---|---|---|
value | int | Player index on client |
local index = EngineClient.GetPlayerForUserID(event:GetInt("user_id", 0))
IsConsoleVisible
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | bool | Return true if the game console is visible |
local con_visible = EngineClient.IsConsoleVisible()
GetLevelName
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | string | Name of the current map |
local mapname = EngineClient.GetLevelName()
GetLevelNameShort
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | string | Short name of the current map |
local mapname_short = EngineClient.GetLevelNameShort()
GetMapGroupName
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | string | Map group name |
local mapgroup = EngineClient.GetMapGroupName()
IsVoiceRecording
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | bool | Return true if player talking in voice |
local is_talking = EngineClient.IsVoiceRecording()
IsHLTV
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | bool | - |
local is_hltv = EngineClient.IsHLTV()
IsPlayingDemo
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | bool | - |
local is_demoview = EngineClient.IsPlayingDemo()
IsRecordingDemo
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | bool | - |
local recording_demo = EngineClient.IsRecordingDemo()
IsPaused
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | bool | - |
local is_paused = EngineClient.IsPaused()
IsTakingScreenshot
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | bool | - |
local is_screenshoting = EngineClient.IsTakingScreenshot()
GetGameDirectory
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | string | Path to game directory |
local game_dir = EngineClient.GetGameDirectory()
GetMaxClients
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | int | Get the exact server timesstamp ( server time ) from the last message received from the server |
local max_players = EngineClient.GetMaxClients()
GetLastTimeStamp
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | float | Max amount of clients |
local last_server_tick_time = EngineClient.GetLastTimeStamp()
SendClanTag
Name | Type | Description |
---|---|---|
name | string | Group name |
tag | string | Tag name, not required |
EngineClient.SendClanTag("MemeSense")
ServerCmdKeyValues
Sends a key values server command, not allowed from scripts execution
Name | Type | Description |
---|---|---|
kv | KeyValues* | Key values to be serialized and sent to server |
local kv = KeyValues.new("ClanTagChanged")
kv:SetString("tag", "MemeSense")
kv:SetString("name", "MemeSense")
EngineClient.ServerCmdKeyValues(kv)
GetEngineBuildNumber
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | unsingned int | Engines build |
local engine_build = EngineClient.GetEngineBuildNumber()
print(engine_build)
GetProductVersionString
This function has no parameters.
Return value
Name | Type | Description |
---|---|---|
value | string | Mods version number (steam.inf) |
local product_version = EngineClient.GetProductVersionString()
print(product_version)