dreamworkAPI
Ctrl K
GitHub
libraryDocs / client

client

librarysharedmenusource

Functions

client.connectConnects client to the specified server.
client.disconnectDisconnects the client from the server.
client.getAll
client.getLocal
client.isConnectedChecks if the client is connected to the server.
client.isConnectingChecks if the client has connected to the server (looks at the loading screen).
client.retryRetry connection to last server.
client.screenshotTake a screenshot.

#client.connect

clientmenusource
function client.connect(address?: string)

Connects client to the specified server.

Parameters
NameTypeDescription
addressoptionalstringThe address of the server. ( IP:Port like 127.0.0.1:27015 )

#client.disconnect

clientmenusource
function client.disconnect()

Disconnects the client from the server.

#client.getAll

function client.getAll()

#client.getLocal

function client.getLocal()

#client.isConnected

clientmenunodiscardsource
function client.isConnected(): boolean

Checks if the client is connected to the server.

NOTE: It always returns true on the client.

Returns
TypeNameDescription
booleanboolThe true if connected, false if not.

#client.isConnecting

clientmenunodiscardsource
function client.isConnecting(): boolean

Checks if the client has connected to the server (looks at the loading screen).

NOTE: It always returns false on the client.

Returns
TypeNameDescription
booleanboolThe true if connecting, false if not.

#client.retry

clientmenusource
function client.retry()

Retry connection to last server.

#client.screenshot

clientmenusource
function client.screenshot(quality: integer, file_name: string)

Take a screenshot.

Parameters
NameTypeDescription
qualityintegerThe quality of the screenshot (0-100), only used if useTGA is false.
file_namestringThe name of the screenshot.
Generated from the dreamwork meta branch.