⌨️ Client
Static Class present on Client side.
🗿Static Class
This is a Static Class. Access it's methods directly with
.. It's not possible to spawn new instances.💂Authority
This static class can be accessed only on 🟧 Client side.
🧑💻API Source
This page is auto-generated! The Functions, Properties and Events described here are defined in our GitHub's API Repository! Feel free to commit suggestions and changes to the source .json API files!
🗿 Static Functions
| Returns | Name | Description | |
|---|---|---|---|
CopyToClipboard | Copies a text to Clipboard | ||
Disconnect | Disconnects from the server | ||
| table of Base Actor | GetActorsInRadius | Returns the actors within the specified radius | |
| table of string | GetAllValuesKeys | Gets a list of all values keys | |
| string | GetConnectedServerIP | Gets the current connected server IP:Port | |
| Base Entity or nil | GetEntityByID | Returns the entity with the specified ID | |
| float | GetFrameTime | Gets the current Frame Time | |
| string | GetLanguage | Gets the current language of the Client | |
| Player | GetLocalPlayer | Gets the local Player | |
| integer | GetLogLevel | Returns the current log level | |
| string | GetMap | Returns the current Map | |
| float | GetNearClipPlane | Gets the Near Clip Plane value | |
| table of table | GetPackages | Returns a list of Packages running | |
| integer | GetTime | Gets the Unix Epoch Time in milliseconds | |
| any | GetValue | Gets a value given a key | |
| boolean | IsPackageLoaded | Returns if a Package is currently loaded | |
OpenEscapeMenu | Opens the escape menu | ||
SetDebugEnabled | Enables/Disables Debug settings and Client Console to be used | ||
SetEscapeMenuText | Sets the Escape Menu text | ||
SetHighlightColor | Changes the Highlight Color for highlighted actors at a specific Index | ||
SetNearClipPlane | Sets the Near Clip Plane | ||
SetOutlineColor | Changes the Outline Color for outlined actors at a specific Index | ||
SetSettingGammaOverride | Overrides the gamma setting and prevents the client from changing it | ||
SetValue | Sets a global value in the Client, which can be accessed from anywhere (client side) | ||
ShowNotification | Shows a notification using the built-in notification system. | ||
| function | Subscribe | Subscribes for an Event | |
Unsubscribe | Unsubscribes from all subscribed Events in this Class and in this Package, optionally passing the function to unsubscribe only that callback |

CopyToClipboard
Copies a text to Clipboard
Client.CopyToClipboard(text)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | text | Required parameter | No description provided |

Disconnect
Disconnects from the server
Client.Disconnect()

GetActorsInRadius
Returns the actors within the specified radius
local ret = Client.GetActorsInRadius(location, radius, only_classes?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Vector | location | Required parameter | The center location of the search |
| number | radius | Required parameter | The search radius |
| table of string | only_classes? | [] | Only actors of these classes will be returned (pass empty for all classes) |
Returns
| Type | Description |
|---|---|
| table of Base Actor | The actors found in radius |

GetAllValuesKeys
Gets a list of all values keys
local ret = Client.GetAllValuesKeys()

GetConnectedServerIP
Gets the current connected server IP:Port
local ret = Client.GetConnectedServerIP()
Returns
| Type | Description |
|---|---|
| string | No description provided |

GetEntityByID
Returns the entity with the specified ID
local ret = Client.GetEntityByID(entity_id)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| integer | entity_id | Required parameter | No description provided |
Returns
| Type | Description |
|---|---|
| Base Entity or nil | the entity |

GetFrameTime
Gets the current Frame Time
local ret = Client.GetFrameTime()
Returns
| Type | Description |
|---|---|
| float | the Frame Time |

GetLanguage
Gets the current language of the Client
local ret = Client.GetLanguage()
Returns
| Type | Description |
|---|---|
| string | the language code |

GetLocalPlayer
Gets the local Player
local ret = Client.GetLocalPlayer()
Returns
| Type | Description |
|---|---|
| Player | the local Player |

GetLogLevel
Returns the current log level
local ret = Client.GetLogLevel()
Returns
| Type | Description |
|---|---|
| integer | the log level |

GetMap
Returns the current Map
local ret = Client.GetMap()
Returns
| Type | Description |
|---|---|
| string | the current Map |

GetNearClipPlane
Gets the Near Clip Plane value
local ret = Client.GetNearClipPlane()
Returns
| Type | Description |
|---|---|
| float | No description provided |
See also SetNearClipPlane.

GetPackages
Returns a list of Packages running
local ret = Client.GetPackages(package_type_filter?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| PackageType | package_type_filter? | PackageType.All | Which Package type to return. Leave it default to return all types. |

GetTime
Gets the Unix Epoch Time in milliseconds
local ret = Client.GetTime()
Returns
| Type | Description |
|---|---|
| integer | the unix timestamp |

GetValue
Gets a value given a key
local ret = Client.GetValue(key, fallback)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | key | Required parameter | No description provided |
| any | fallback | Required parameter | No description provided |
Returns
| Type | Description |
|---|---|
| any | Value at key or fallback if key doesn't exist |
See also GetAllValuesKeys, SetValue.

IsPackageLoaded
Returns if a Package is currently loaded
local ret = Client.IsPackageLoaded(package_name)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | package_name | Required parameter | No description provided |
Returns
| Type | Description |
|---|---|
| boolean | if the package is loaded |

OpenEscapeMenu
Opens the escape menu
Client.OpenEscapeMenu(open_settings?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | open_settings? | false | If true, opens the Settings tab directly |

SetDebugEnabled
Enables/Disables Debug settings and Client Console to be used
Client.SetDebugEnabled(enable_debug)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | enable_debug | Required parameter | No description provided |

SetEscapeMenuText
Sets the Escape Menu text
Client.SetEscapeMenuText(text)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | text | Required parameter | Supports using <h1>, <h2>, <h3> and <strong> tags in the text. |
Client.SetEscapeMenuText Examples
Adding customized texts
Client.SetEscapeMenuText([[
<h1>Header 1</>
<h2>Header 2</>
<h3>Header 3</>
<strong>Strong</>
Normal Text
]])

SetHighlightColor
Changes the Highlight Color for highlighted actors at a specific Index. Multiply it by 5 (or more) for having a glowing effect.HighlightMode.Alwayswill always be visible, even behind wallsHighlightMode.OnlyHiddenwill only be visible if behind a wallHighlightMode.OnlyVisiblewill only be visible if not behind a wall
Note: You can only have 3 different indexes (0, 1 or 2).
Client.SetHighlightColor(highlight_color, index, mode?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Color | highlight_color | Required parameter | No description provided |
| integer | index | Required parameter | No description provided |
| HighlightMode | mode? | HighlightMode.Always | No description provided |

SetNearClipPlane
Sets the Near Clip Plane
Client.SetNearClipPlane(near_clip_plane)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| float | near_clip_plane | Required parameter | No description provided |
See also GetNearClipPlane.

SetOutlineColor
Changes the Outline Color for outlined actors at a specific Index. Multiply it by 5 (or more) for having a glowing effect.
Note: You can only have 3 different indexes (0, 1 or 2), and the default Outline color index used by the game is0(when interacting with stuff).
Client.SetOutlineColor(outline_color, index?, thickness?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| Color | outline_color | Required parameter | No description provided |
| integer | index? | 0 | No description provided |
| float | thickness? | 2 | No description provided |

SetSettingGammaOverride
Overrides the gamma setting and prevents the client from changing it
Client.SetSettingGammaOverride(override, new_gamma?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| boolean | override | Required parameter | Whether to override the gamma setting |
| float or nil | new_gamma? | 1.0 | The new gamma value if overriding |

SetValue
Sets a global value in the Client, which can be accessed from anywhere (client side)
Please refer to Entity Values for more information
Client.SetValue(key, value)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | key | Required parameter | Key |
| any | value | Required parameter | Valeur |
See also GetAllValuesKeys, GetValue, ValueChange.

ShowNotification
Shows a notification using the built-in notification system.
Client.ShowNotification(text, notification_type?, add_to_notification_list?, duration?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | text | Required parameter | No description provided |
| NotificationType | notification_type? | NotificationType.Info | No description provided |
| boolean | add_to_notification_list? | true | Whether to add this notification to the notification list (accessible from the bell icon on the top-right corner) |
| float | duration? | 10 | Duration in seconds to display the notification |

Subscribe
Subscribes for an Event
local ret = Client.Subscribe(event_name, callback)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | event_name | Required parameter | No description provided |
| function | callback | Required parameter | No description provided |
Returns
| Type | Description |
|---|---|
| function | the function callback itself |

Unsubscribe
Unsubscribes from all subscribed Events in this Class and in this Package, optionally passing the function to unsubscribe only that callback
Client.Unsubscribe(event_name, callback?)
Parameters
| Type | Parameter | Default | Description |
|---|---|---|---|
| string | event_name | Required parameter | No description provided |
| function | callback? | nil | No description provided |
🚀 Events
| Name | Description | |
|---|---|---|
LanguageChange | Called when the Client language changes | |
SpawnLocalPlayer | Called when the local player spawns (just after the game has loaded) | |
Tick | Called Every Frame. Do not abuse | |
ValueChange | Triggered when a Value is changed with Client.SetValue() or Server.SetValue() (for synced values) | |
WindowFocusChange | Called when the game is focused/unfocused |

LanguageChange
Called when the Client language changes
Client.Subscribe("LanguageChange", function(language)
-- LanguageChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| string | language | The new language code |

SpawnLocalPlayer
Called when the local player spawns (just after the game has loaded)
Client.Subscribe("SpawnLocalPlayer", function(local_player)
-- SpawnLocalPlayer was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| Player | local_player | No description provided |

Tick
Called Every Frame. Do not abuse
Client.Subscribe("Tick", function(delta_time)
-- Tick was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| float | delta_time | No description provided |

ValueChange
Triggered when a Value is changed withClient.SetValue()orServer.SetValue()(for synced values)
Client.Subscribe("ValueChange", function(key, value)
-- ValueChange was called
end)
See also SetValue, Server.SetValue().

WindowFocusChange
Called when the game is focused/unfocused
Client.Subscribe("WindowFocusChange", function(is_focused)
-- WindowFocusChange was called
end)
Arguments
| Type | Argument | Description |
|---|---|---|
| boolean | is_focused | If it's focused |