⌨️ Client
Static Class present on Client side
🗿 Static Functions
| Appearance | ||
GetNearClipPlane: float | Gets the Near Clip Plane value | |
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 | |
| Data | ||
GetAllValuesKeys: table of string | Gets a list of all values keys | |
GetValue: any | Gets a value given a key | |
SetValue | Sets a global value in the Client, which can be accessed from anywhere (client side) | |
| Diagnostics | ||
GetFrameTime: float | Gets the current Frame Time | |
GetLogLevel: integer | Returns the current log level | |
GetTime: integer | Gets the Unix Epoch Time in milliseconds | |
SetDebugEnabled | Enables/Disables Debug settings and Client Console to be used | |
| Interface | ||
CopyToClipboard | Copies a text to Clipboard | |
OpenEscapeMenu | Opens the escape menu | |
SetEscapeMenuText | Sets the Escape Menu text as Markdown | |
ShowNotification | Shows a notification using the built-in notification system | |
| Packages | ||
GetPackages: table of table | Returns a list of Packages running | |
IsPackageLoaded: boolean | Returns if a Package is currently loaded | |
| Queries | ||
GetActorsInRadius: table of Base Actor | Returns the actors within the specified radius | |
GetEntityByID: Base Entity or nil | Returns the entity with the specified ID | |
| Session | ||
Disconnect | Disconnects from the server | |
GetConnectedServerIP: string | Gets the current connected server IP:Port | |
GetLocalPlayer: Player | Gets the local Player | |
GetMap: string | Returns the current map package name | |
Subscribe: function | 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 | |
| Settings | ||
GetLanguage: string | Gets the current language of the Client | |
GetSettings: table | Gets the local player's game Settings | |
IsVOIPSelfMuted: boolean | Gets whether the local player has muted their own microphone | |
Appearancestatic functions

GetNearClipPlaneOptimal
Gets the Near Clip Plane value
local ret = Client.GetNearClipPlane()
Returns
| Type | Descrição |
|---|---|
| float | Near Clip Plane value |
See also SetNearClipPlane.

SetHighlightColorOptimal
Changes the Highlight Color for highlighted actors at a specific Index
Multiply it by 5 (or more) for having a glowing effect.HighlightMode.Always will always be visible, even behind wallsHighlightMode.OnlyHidden will only be visible if behind a wallHighlightMode.OnlyVisible will 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
| Name | Type | Descrição |
|---|---|---|
highlight_color | Color | The color to use |
index | integer | Highlight slot index (0 to 2) |
mode? | HighlightMode | When the highlight is visible Default HighlightMode.Always |

SetNearClipPlaneOptimal
Sets the Near Clip Plane
Client.SetNearClipPlane(near_clip_plane)
Parameters
| Name | Type | Descrição |
|---|---|---|
near_clip_plane | float | The new Near Clip Plane |
See also GetNearClipPlane.

SetOutlineColorOptimal
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 is 0 (when interacting with stuff)
Client.SetOutlineColor(outline_color, index?, thickness?)

SetSettingGammaOverrideOptimal
Overrides the gamma setting and prevents the client from changing it
Client.SetSettingGammaOverride(override, new_gamma?)
Datastatic functions

GetValueModerate
Gets a value given a key
local ret = Client.GetValue(key, fallback)
Returns
| Type | Descrição |
|---|---|
| any | Value at key or fallback if key doesn't exist |
See also GetAllValuesKeys, SetValue.

SetValueModerate
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
| Name | Type | Descrição |
|---|---|---|
key | string | Key |
value | any | The value, can be any serializable type (not functions) |
See also GetAllValuesKeys, GetValue, ValueChange.
Diagnosticsstatic functions

GetFrameTimeOptimal
Gets the current Frame Time
local ret = Client.GetFrameTime()
Returns
| Type | Descrição |
|---|---|
| float | the Frame Time |

GetLogLevelOptimal
Returns the current log level
local ret = Client.GetLogLevel()
Returns
| Type | Descrição |
|---|---|
| integer | the log level |

GetTimeOptimal
Gets the Unix Epoch Time in milliseconds
local ret = Client.GetTime()
Returns
| Type | Descrição |
|---|---|
| integer | the unix timestamp |

SetDebugEnabledModerate
Enables/Disables Debug settings and Client Console to be used
Client.SetDebugEnabled(enable_debug)
Parameters
| Name | Type | Descrição |
|---|---|---|
enable_debug | boolean | Whether to enable Debug settings and Client Console to be used |
Interfacestatic functions

CopyToClipboardOptimal
Copies a text to Clipboard
Client.CopyToClipboard(text)
Parameters
| Name | Type | Descrição |
|---|---|---|
text | string | The text to copy |

OpenEscapeMenuOptimal
Opens the escape menu
Client.OpenEscapeMenu(open_settings?)
Parameters
| Name | Type | Descrição |
|---|---|---|
open_settings? | boolean | If true, opens the Settings tab directly Default false |

SetEscapeMenuTextModerate
Sets the Escape Menu text as Markdown
Client.SetEscapeMenuText(text)
Parameters
| Name | Type | Descrição |
|---|---|---|
text | string | The text to display, supports Markdown formatting |
Examples (1)
Client.SetEscapeMenuText([[
# Welcome to the server
Read the **rules** before playing!
- Be respectful
- Have fun
]])

ShowNotificationModerate
Shows a notification using the built-in notification system
Client.ShowNotification(text, notification_type?, add_to_notification_list?, duration?)
Parameters
| Name | Type | Descrição |
|---|---|---|
text | string | The text of the notification |
notification_type? | NotificationType | The notification style Default NotificationType.Info |
add_to_notification_list? | boolean | Whether to add this notification to the notification list (accessible from the bell icon on the top-right corner) Default true |
duration? | float | Duration in seconds to display the notification Default 10 |
Packagesstatic functions

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

IsPackageLoadedModerate
Returns if a Package is currently loaded
local ret = Client.IsPackageLoaded(package_name)
Parameters
| Name | Type | Descrição |
|---|---|---|
package_name | string | The package folder name |
Returns
| Type | Descrição |
|---|---|
| boolean | if the package is loaded |
Queriesstatic functions

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

GetEntityByIDModerate
Returns the entity with the specified ID
local ret = Client.GetEntityByID(entity_id)
Parameters
| Name | Type | Descrição |
|---|---|---|
entity_id | integer | The entity ID |
Returns
| Type | Descrição |
|---|---|
| Base Entity or nil | the entity |
Sessionstatic functions

GetConnectedServerIPOptimal
Gets the current connected server IP:Port
local ret = Client.GetConnectedServerIP()
Returns
| Type | Descrição |
|---|---|
| string | Current connected server IP:Port |

GetLocalPlayerOptimal
Gets the local Player
local ret = Client.GetLocalPlayer()
Returns
| Type | Descrição |
|---|---|
| Player | the local Player |

GetMapOptimal
Returns the current map package name
local ret = Client.GetMap()
Returns
| Type | Descrição |
|---|---|
| string | the current Map |

SubscribeOptimal
Subscribes for an Event
local ret = Client.Subscribe(event_name, callback)
Parameters
| Name | Type | Descrição |
|---|---|---|
event_name | string | The name of the event |
callback | function | The function to be called |
Returns
| Type | Descrição |
|---|---|
| function | the function callback itself |

UnsubscribeOptimal
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?)
Settingsstatic functions

GetLanguageOptimal
Gets the current language of the Client
local ret = Client.GetLanguage()
Returns
| Type | Descrição |
|---|---|
| string | the language code |

GetSettingsSlow
Gets the local player's game Settings
local ret = Client.GetSettings()
Returns
| Type | Descrição | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| table | the current Settings | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Table keys
|

IsVOIPSelfMutedOptimal
Gets whether the local player has muted their own microphone
Only the player can change it, with the VOIP key when the Open Mic setting is on, or from the escape menu
local ret = Client.IsVOIPSelfMuted()
Returns
| Type | Descrição |
|---|---|
| boolean | Whether the microphone is muted by the player |
🚀 Events
LanguageChange | Called when the Client language changes | |
PackageLoad | Triggered when any package is loaded | |
PackageUnload | Triggered when any package is unloaded | |
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) | |
VOIPSelfMuteChange | Called when the local player mutes or unmutes their own microphone, either with the VOIP key (on Open Mic) or from the escape menu | |
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
| Name | Type | Descrição |
|---|---|---|
language | string | The new language code |

PackageLoad
Triggered when any package is loaded
Client.Subscribe("PackageLoad", function(package_name)
-- PackageLoad was called
end)
Arguments
| Name | Type | Descrição |
|---|---|---|
package_name | string | The package name (its folder name) |
See also GetPackages, IsPackageLoaded.

PackageUnload
Triggered when any package is unloaded
Client.Subscribe("PackageUnload", function(package_name)
-- PackageUnload was called
end)
Arguments
| Name | Type | Descrição |
|---|---|---|
package_name | string | The package name (its folder name) |
See also GetPackages, IsPackageLoaded.

SpawnLocalPlayer
Called when the local player spawns (just after the game has loaded)
Client.Subscribe("SpawnLocalPlayer", function(local_player)
-- SpawnLocalPlayer was called
end)
Arguments
| Name | Type | Descrição |
|---|---|---|
local_player | Player | The local Player |

Tick
Called Every Frame. Do not abuse
Client.Subscribe("Tick", function(delta_time)
-- Tick was called
end)
Arguments
| Name | Type | Descrição |
|---|---|---|
delta_time | float | Seconds since the last frame |

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

VOIPSelfMuteChange
Called when the local player mutes or unmutes their own microphone, either with the VOIP key (on Open Mic) or from the escape menu
Client.Subscribe("VOIPSelfMuteChange", function(is_muted)
-- VOIPSelfMuteChange was called
end)
Arguments
| Name | Type | Descrição |
|---|---|---|
is_muted | boolean | Whether the microphone is now muted |


