iengine

Functions

GetScreenSize

Returns:

Type

Description

width and height of game screen

Code:

local vecScreenSize = IEngine.GetScreenSize()

GetPlayerInfo

Parameters:

Name

Type

Description

nEntityIndex

int

index of entity to get player info for

Returns:

Type

Description

entity player info of given index

Code:

local playerInfo = IEngine.GetPlayerInfo(pLocal:GetIndex())

GetPlayerForUserID

Parameters:

Name

Type

Description

nUserID

int

user index to get player index for

Returns:

Type

Description

int

player index of given user index

Code:

local nPlayerID = IEngine.GetPlayerForUserID(1)

GetLocalPlayer

Returns:

Type

Description

int

entity index of local player

Code:

local nLocalPlayerIndex = IEngine.GetLocalPlayer()

GetViewAngles

Return value:

Type

Description

local player view angles

Code:

local angViewPoint = IEngine.GetViewAngles()

SetViewAngles

Parameters:

Name

Type

Description

angViewPoint

view angles to set for local player

Code:

IEngine.SetViewAngles(QAngle.new(-90.0, 180.0, 0.0))

GetMaxClients

Returns:

Type

Description

int

max client count for server

Code:

local nMaxClients = IEngine.GetMaxClients()

IsInGame

Returns:

Type

Description

bool

true if we're in-game

Code:

local bIsInGame = IEngine.IsInGame()

IsConnected

Returns:

Type

Description

bool

true if we're connected (connection message was shown)

Code:

local bIsConnected = IEngine.IsConnected()

GetLevelName

Returns:

Type

Description

string

current map full name

Code:

local szLevelName = IEngine.GetLevelName()

GetLevelNameShort

Returns:

Type

Description

string

current map short name

Code:

local szShortLevelName = IEngine.GetLevelNameShort()

GetMapGroupName

Returns:

Type

Description

string

current map group name

Code:

local szMapGroupName = IEngine.GetMapGroupName()

GetNetChannelInfo

Returns:

Type

Description

pointer of net channel info

Code:

local pNetChannelInfo = IEngine.GetNetChannelInfo()

IsPlayingDemo

Returns:

Type

Description

bool

true if demo is being played back

Code:

local bIsPlayingDemo = IEngine.IsPlayingDemo()

IsRecordingDemo

Returns:

Type

Description

bool

true if demo is being recorded

Code:

local bIsRecordingDemo = IEngine.IsRecordingDemo()

IsPaused

Returns:

Type

Description

bool

true if game is paused

Code:

local bIsPaused = IEngine.IsPaused()

IsHLTV

Returns:

Type

Description

bool

true if currently used HLTV (kill replay etc)

Code:

local bIsHLTV = IEngine.IsHLTV()

ExecuteClientCmd

Parameters:

Name

Type

Description

szCmdString

string

command to execute (without flag checks)

Code:

IEngine.ExecuteClientCmd("say console log")

Last updated

Was this helpful?