client
Functions
client.connect | Connects client to the specified server. |
client.disconnect | Disconnects the client from the server. |
client.getAll | |
client.getLocal | |
client.isConnected | Checks if the client is connected to the server. |
client.isConnecting | Checks if the client has connected to the server (looks at the loading screen). |
client.retry | Retry connection to last server. |
client.screenshot | Take a screenshot. |
#client.connect
function client.connect(address?: string)
Connects client to the specified server.
Parameters
| Name | Type | Description |
|---|---|---|
addressoptional | string | The address of the server. ( IP:Port like 127.0.0.1:27015 ) |
#client.disconnect
function client.disconnect()
Disconnects the client from the server.
#client.getAll
function client.getAll()
#client.getLocal
function client.getLocal()
#client.isConnected
function client.isConnected(): boolean
Checks if the client is connected to the server.
NOTE: It always returns true on the client.
Returns
| Type | Name | Description |
|---|---|---|
boolean | bool | The true if connected, false if not. |
#client.isConnecting
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
| Type | Name | Description |
|---|---|---|
boolean | bool | The true if connecting, false if not. |
#client.retry
function client.retry()
Retry connection to last server.
#client.screenshot
function client.screenshot(quality: integer, file_name: string)
Take a screenshot.
Parameters
| Name | Type | Description |
|---|---|---|
quality | integer | The quality of the screenshot (0-100), only used if useTGA is false. |
file_name | string | The name of the screenshot. |