Skip to main content
Version: latest - a1.7.0 ⚖️

⌨️ Client

Static Class present on Client side

info

🟧 Authority: This can be accessed only on Client.

🗿 Static Class: This is a Static Class. You can access it's methods directly with .. It is not possible to initialize or create new instances.

Functions

ReturnsNameDescription
CallLevelBlueprintEventCalls a Level Blueprint custom event (which can be added when creating levels through Unreal Engine)
DrawDebugBox
DrawDebugCoordinateSystem
DrawDebugCrosshairs
DrawDebugCylinder
DrawDebugDirectionalArrow
DrawDebugLineDraws a Debug Line in the World
DrawDebugPointDraws a Debug Point in the World
DrawDebugSphereDraws a Debug Line in the World
DrawDebugString
ProjectWorldToScreenTransforms a 3D world-space vector into 2D screen coordinates
DeprojectScreenToWorldTransforms a 2D screen coordinates into 3D world-space location
InitializeDiscordInitializes the Discord Integration with your custom client_id
SendChatMessageSends a chat message which will display local only
SetChatConfigurationConfigure the Chat
SetChatVisibilitySet if the Chat is visible or not
SetCrosshairEnabledEnables/Disables the default Crosshair
SetBloodScreenEnabledEnables/Disables the Blood Screen effect
SetBloodScreenIntensityManually sets the Blood Screen intensity
SetHardwareCursorLoads or sets a hardware cursor from the content directory in the game.
SetDiscordActivityCommunicates with Discord and sets a custom user status
SetInputEnabledToggles Local Player input
SetMouseEnabledDisplays/Hides Mouse Cursor
SetHighlightColorChanges the Highlight Color for highlighted actors at a specific Index
SetOutlineColorChanges the Outline Color for outlined actors at a specific Index
SetSteamRichPresenceSets Steam Rich Presence value
SetValueSets a global value in the Client, which can be accessed from anywhere (client side)
functionSubscribeSubscribes for an Event
UnsubscribeUnsubscribes from all subscribed Events in this Class and in this Package, optionally passing the function to unsubscribe only that callback
tableTraceTrace a ray against the world and returns a table with the first blocking hit information
PlayerGetLocalPlayerGets the local Player
VectorGetRandomReachablePointInRadiusFinds random, reachable point in navigable space restricted to radius around origin
VectorGetRandomPointInNavigableRadiusFinds random, point in navigable space restricted to Radius around Origin. Resulting location is not tested for reachability from the Origin
VectorFindPathToLocationFinds a Path given Start and End location
stringGetMapReturns the current Map
Vector2DGetMousePositionGets the current mouse screen location
tableGetPackagesReturns a list of Packages folder names loaded and running in the client
anyGetViewportSizeGets the size of viewport
anyGetValueGets a value given a key
booleanInputKeyForces an Input Key event on Local Player
booleanIsKeyDownReturns if a key is being pressed
booleanIsMouseEnabled
booleanIsInputEnabled

Events

NameDescription
ChatCalled when a chat text is submitted (by LocalPlayer)
ChatEntryCalled when a Chat Entry is received, this is also triggered when SendChatMessage is called
ConsoleCalled when a console command is submitted
KeyDownA keyboard key is being pressed
KeyPressA keyboard key has been pressed
KeyUpA keyboard key has been released
LogEntryCalled when a Client log is received
MouseDownA mouse button has been pressed / is being pressed
MouseUpA mouse button has been released
MouseEnabledWhen mouse cursor is displayed/hidden
MouseMoveXCalled when the mouse moves in the X axis
MouseMoveYCalled when the mouse moves in the Y axis
OpenChatWhen player opens the Chat
CloseChatWhen player closes the Chat
OpenConsoleWhen player closes the Console
CloseConsoleWhen player closes the Console
TickCalled Every Frame. Do not abuse
ViewportResizedCalled when the screen is resized
WindowFocusChangedCalled when the game is focused/unfocused

Functions Detailed

CallLevelBlueprintEvent

Calls a Level Blueprint custom event (which can be added when creating levels through Unreal Engine). Parameters can be concatenated to event_name like 'MyEventName 123, "MyParameter2", 456'

Client.CallLevelBlueprintEvent(event_name)
TypeParameterDescription
stringevent_name

DrawDebugBox

DrawDebugBox

Client.DrawDebugBox(location, extent, rotation, color, life_time, thickness)
TypeParameterDefault ValueDescription
Vectorlocation
Vectorextent
Rotatorrotation
Colorcolor
numberlife_time5
numberthickness0

DrawDebugCoordinateSystem

DrawDebugCoordinateSystem

Client.DrawDebugCoordinateSystem(location, rotation, size, life_time, thickness)
TypeParameterDefault ValueDescription
Vectorlocation
Rotatorrotation
numbersize100
numberlife_time5
numberthickness0

DrawDebugCrosshairs

DrawDebugCrosshairs

Client.DrawDebugCrosshairs(location, rotation, size, color, life_time, thickness)
TypeParameterDefault ValueDescription
Vectorlocation
Rotatorrotation
numbersize100
ColorcolorColor.RED
numberlife_time5
numberthickness0

DrawDebugDirectionalArrow

DrawDebugDirectionalArrow

Client.DrawDebugDirectionalArrow(start_location, end_location, arrow_size, color, life_time, thickness)
TypeParameterDefault ValueDescription
Vectorstart_location
Vectorend_location
numberarrow_size100
ColorcolorColor.RED
numberlife_time5
numberthickness0

DrawDebugCylinder

DrawDebugCylinder

Client.DrawDebugCylinder(start_location, end_location, radius, segments, color, life_time, thickness)
TypeParameterDefault ValueDescription
Vectorstart_location
Vectorend_location
numberradius
numbersegments
ColorcolorColor.RED
numberlife_time5
numberthickness0

DrawDebugString

DrawDebugString

Client.DrawDebugString(location, text, color, life_time, draw_shadow, font_scale)
TypeParameterDefault ValueDescription
Vectorlocation
stringtext
ColorcolorColor.RED
numberlife_time5
booleandraw_shadowfalse
numberfont_scale1

DrawDebugLine

Draws a Debug Line in the World

Client.DrawDebugLine(start_position, end_position, color, duration, thickness)
TypeParameterDefault ValueDescription
Vectorstart_position
Vectorend_position
ColorcolorColor.RED
numberduration5
numberthickness0

DrawDebugPoint

Draws a Debug Point in the World

Client.DrawDebugPoint(start_position, color, duration, size)
TypeParameterDefault ValueDescription
Vectorstart_position
ColorcolorColor.RED
numberduration5
numbersize10

DrawDebugSphere

Draws a Debug Line in the World

Client.DrawDebugSphere(start_position, radius, segments, color, duration, thickness)
TypeParameterDefault ValueDescription
Vectorstart_position
numberradius
numbersegments
ColorcolorColor.RED
numberduration5
numberthickness0

DeprojectScreenToWorld

Transforms a 2D screen coordinates into 3D world-space location

Returns table in the format {"Position", "Direction"}

Client.DeprojectScreenToWorld(screen_position)
TypeParameterDescription
Vector2Dscreen_positionScreen position

ProjectWorldToScreen

Transforms a 3D world-space vector into 2D screen coordinates

Returns Vector2D

Client.ProjectWorldToScreen(world_position)
TypeParameterDescription
Vectorworld_positionWorld 3D position

InitializeDiscord

Initializes the Discord Integration with your custom client_id

Client.InitializeDiscord(client_id)
TypeParameterDescription
numberclient_id

SendChatMessage

Sends a chat message which will display local only

Client.SendChatMessage(message)
TypeParameterDescription
stringmessage

SetChatConfiguration

Configure the Chat. Anchors = (1, 1) means the location will be relative to bottom right and (0, 0) to top left.

Client.SetChatConfiguration(screen_location, size, anchors_min, anchors_max, alignment, justify, show_scrollbar)
TypeParameterDefault ValueDescription
Vector2Dscreen_locationVector(-25, 0)
Vector2DsizeVector(600, 250)
Vector2Danchors_minVector(1, 0.5)
Vector2Danchors_maxVector(1, 0.5)
Vector2DalignmentVector(1, 0.5)
boolean
booleanshow_scrollbartrue

SetChatVisibility

Set if the Chat is visible or not

Client.SetChatVisibility(is_visible)
TypeParameterDescription
booleanis_visible

SetCrosshairEnabled

Enables/Disables the default Crosshair

Client.SetCrosshairEnabled(is_enabled)
TypeParameterDescription
booleanis_enabled

SetBloodScreenEnabled

Enables/Disables the Blood Screen

Client.SetBloodScreenEnabled(is_enabled)
TypeParameterDescription
booleanis_enabled

SetBloodScreenIntensity

Manually sets the Blood Screen intensity

If you want the Blood Screen to do not be overridden, disable it with Client.SetBloodScreenEnabled(false) before

Client.SetBloodScreenIntensity(intensity)
TypeParameterDescription
numberintensityFrom 0.0 to 1.1

SetHardwareCursor

Loads or sets a hardware cursor from the content directory in the game.

Client.SetHardwareCursor(cursor_shape, cursor_path, hotspot)
TypeParameterDefault ValueDescription
CursorTypecursor_shape
stringcursor_path
Vector2DhotspotVector(0, 0)=

SetDiscordActivity

Communicates with Discord and sets a custom user status

Client.SetDiscordActivity(state, details, large_image, large_text)
TypeParameterDescription
stringstate
stringdetails
stringlarge_image
stringlarge_text

SetInputEnabled

Toggles Local Player input

Client.SetInputEnabled(enable_input)
TypeParameterDescription
booleanenable_input

SetMouseEnabled

Displays/Hides Mouse Cursor

Client.SetMouseEnabled(is_enabled)
TypeParameterDescription
booleanis_enabled

SetHighlightColor

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 walls HighlightMode.OnlyHidden will only be visible if behind a wall HighlightMode.OnlyVisible will only be visible if not behind a wall

Client.SetHighlightColor(highlight_color, index, mode)
TypeParameterDescription
Colorhighlight_color
numberindex
HighlightModemode

SetOutlineColor

Changes the Outline Color for outlined actors at a specific Index. Multiply it by 5 (or more) for having a glowing effect.

Note: The default Outline color index used by the game is 0 (when interacting with stuff).

Client.SetOutlineColor(outline_color, index)
TypeParameterDescription
Coloroutline_color
numberindex

SetSteamRichPresence

Changes the Steam Rich Presence text

Client.SetSteamRichPresence(text)
TypeParameterDescription
stringtext

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)
TypeParameterDescription
stringkeyKey
anyvalueValue

Subscribe

Subscribes for an Event

Returns the function callback itself

Client.Subscribe(event_name, callback)
TypeParameterDescription
stringevent_name
functionfunction

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)
TypeParameterDefault ValueDescription
stringevent_name
functionfunctionnil

Trace

Trace a ray against the world and returns a table with the first blocking hit information. Currently only supports trace for Character, Vehicle, StaticMesh, Weapon, Melee, Grenade and Prop, more can be requested.

Returned Table: {"Success", "Location", "Normal", "Entity", "BoneName", "ActorName", "ComponentName", "SurfaceType"}

info

The Trace will collide with the ObjectType (in the Collision Settings), even if the channel is ignored below.

Client.Trace(start_location, end_location, collision_channel, trace_complex, return_entity, return_physical_material, ignored_actors, draw_debug)
TypeParameterDefault ValueDescription
Vectorstart_location
Vectorend_location
CollisionChannelcollision_channelCollisionChannel.WorldStaticSupports several channels separating by |
booleantrace_complexfalse
booleanreturn_entityfalse
booleanreturn_physical_materialfalse
tableignored_actors{}List of Ignored actors
booleandraw_debugfalse

GetLocalPlayer

Gets the local Player

Returns Player

Client.GetLocalPlayer()

GetRandomReachablePointInRadius

Finds random, reachable point in navigable space restricted to radius around origin (only if map has a NavMesh)

Returns Vector

Client.GetRandomReachablePointInRadius(origin, radius)
TypeParameterDescription
Vectororigin
numberradius

GetRandomPointInNavigableRadius

Finds random, point in navigable space restricted to Radius around Origin. Resulting location is not tested for reachability from the Origin (only if map has a NavMesh)

Returns Vector

Client.GetRandomPointInNavigableRadius(origin, radius)
TypeParameterDescription
Vectororigin
numberradius

FindPathToLocation

Finds a Path given Start and End location (only if map has a NavMesh)

Returned Table: {"IsValid", "IsPartial", "Length", "Cost", "PathPoints"}

Client.FindPathToLocation(start_location, end_location)
TypeParameterDescription
Vectorstart_location
Vectorend_location

GetMap

Returns the current Map

Returns string

Client.GetMap()

GetMousePosition

Gets the current mouse screen location

Returns Vector2D

Client.GetMousePosition()

GetPackages

Gets a list of Packages folder names loaded and running in the client

Returns a Table with Packages folder names

Client.GetPackages()

GetViewportSize

Gets the size of viewport (how much screen space the game window occupies)

Returns Vector2D

Client.GetViewportSize()

GetValue

Gets a value given a key. Please refer to Entity Values for more information

Returns any

Client.GetValue(key, fallback)
TypeParameterDescription
stringkeyKey
anyfallbackFallback Value if key doesn't exist

InputKey

Forces a Input Key event on Local Player

This won't trigger any Scripting event as it bypass internal validations

Client.InputKey(key_name, input_event, amount_depressed)
TypeParameterDefaultDescription
stringkey_nameKey Name to input
InputEventinput_eventWhich Event to input (Released/Pressed)
numberamount_depressed1The amount pressed

IsKeyDown

Gets if a key is being pressed

Returns boolean

Client.IsKeyDown(key_name)
TypeParameterDescription
stringkey_name

IsMouseEnabled

Gets if the mouse is visible

Returns boolean

Client.IsMouseEnabled()

IsInputEnabled

Gets if the input is visible

Returns boolean

Client.IsInputEnabled()

Events Detailed

Chat

Called when a chat text is submitted (by LocalPlayer)

Return false to prevent the message to be sent

TypeParameterDescription
stringtext
Client.Subscribe("Chat", function(text)

end)

ChatEntry

Called when a Chat Entry is received

This is also triggered when SendChatMessage is called (useful for creating your own Chat interface while still use the built-in system)

TypeParameterDescription
stringtext
Playersender
Client.Subscribe("ChatEntry", function(text, sender)

end)

Console

Called when a console command is submitted

TypeParameterDescription
stringtext
Client.Subscribe("Console", function(text)

end)

KeyDown

A keyboard key is being pressed

Return false to block it

TypeParameterDescription
stringkey_name
Client.Subscribe("KeyDown", function(key_name)

end)

KeyPress

A keyboard key has been pressed

Return false to block it

TypeParameterDescription
stringkey_name
Client.Subscribe("KeyPress", function(key_name)

end)

KeyUp

A keyboard key has been released

Return false to block it

TypeParameterDescription
stringkey_name
Client.Subscribe("KeyUp", function(key_name)

end)

LogEntry

Called when a Client log is received

TypeParameterDescription
stringtext
LogTypetype
Client.Subscribe("LogEntry", function(text, type)

end)

MouseDown

A mouse button has been pressed / is being pressed

Return false to block it

TypeParameterDescription
stringkey_name
numbermouse_x
numbermouse_y
Client.Subscribe("MouseDown", function(key_name, mouse_x, mouse_y)

end)

MouseUp

A mouse button has been released

Return false to block it

TypeParameterDescription
stringkey_name
numbermouse_x
numbermouse_y
Client.Subscribe("MouseUp", function(key_name, mouse_x, mouse_y)

end)

MouseEnabled

When mouse cursor is displayed/hidden

TypeParameterDescription
booleanis_enabled
Client.Subscribe("MouseEnabled", function(is_enabled)

end)

MouseMoveX

Called when the mouse moves in the X axis

TypeParameterDescription
numberdelta
numberdelta_time
numbernum_samples
Client.Subscribe("MouseMoveX", function(delta, delta_time, num_samples)

end)

MouseMoveY

Called when the mouse moves in the X axis

TypeParameterDescription
numberdelta
numberdelta_time
numbernum_samples
Client.Subscribe("MouseMoveY", function(delta, delta_time, num_samples)

end)

OpenChat

When player opens the chat

Client.Subscribe("OpenChat", function()

end)

CloseChat

When player closes the chat

Client.Subscribe("CloseChat", function()

end)

OpenConsole

When player opens the console

Client.Subscribe("OpenConsole", function()

end)

CloseConsole

When player closes the console

Client.Subscribe("CloseConsole", function()

end)

Tick

Called Every Frame. Do not abuse.

TypeParameterDescription
numberdelta_time
Client.Subscribe("Tick", function(delta_time)

end)

ViewportResized

Called when the screen is resized

Client.Subscribe("ViewportResized", function(new_size)

end)
TypeParameterDescription
Vector2Dnew_sizeNew new screen size

WindowFocusChanged

Called when the game is focused/unfocused

Client.Subscribe("WindowFocusChanged", function(is_focused)

end)
TypeParameterDescription
booleanis_focusedIf it's focused

Key Names

List of all keys names returned in Key/Mouse events.

Function Keys

Key NameDescription
F1Function one
F2Function two
F3Function three
F4Function four
F5Function five
F6Function six
F7Function seven
F8Function eight
F9Function nine
F10Function ten
F11Function eleven
F12Function twelve

Alphanumerical keys

Key NameDescription
ALetter A
BLetter B
CLetter C
DLetter D
ELetter E
FLetter F
GLetter G
HLetter H
ILetter I
JLetter J
KLetter K
LLetter L
MLetter M
NLetter N
OLetter O
PLetter P
QLetter Q
RLetter R
SLetter S
TLetter T
ULetter U
VLetter V
WLetter W
XLetter X
YLetter Y
ZLetter Z

Special keys

Key NameDescription
EscapeEscape
TabTab
Tilde~
ScrollLockScroll lock
PausePause
OneOne
TwoTwo
ThreeThree
FourFour
FiveFive
SixSix
SevenSeven
EightEight
NineNine
ZeroZero
Underscore_
Equals=
Backslash
LeftBracket[
RightBracket]
EnterEnter or Numpad enter
CapsLockCaps lock
Semicolon;
Quote
LeftShiftLeft shift
Comma,
Period.
Slash/
RightShiftRight Shif
LeftControlLeft control
LeftAltLeft alt
SpaceBarSpace bar
RightAltRight alt
RightControlRight control
LeftLeft
UpUp
DownDown
RightRight
HomeHome
EndEnd
InsertInsert
PageUpPage up
DeleteDelete
PageDownPage down
NumLockNum lock
DivideNumpad /
MultiplyNumpad *
SubtractNumpad -
AddNumpad +
PageDownPage down
NumPadOneNumpad one
NumPadTwoNumpad two
NumPadThreeNumpad three
NumPadFourNumpad four
NumPadFiveNumpad five
NumPadSixNumpad six
NumPadSevenNumpad seven
NumPadEightNumpad eight
NumPadNineNumpad nine
NumPadZeroNumpad zero
DecimalNumpad decimal

Mouse

Key NameDescription
LeftMouseButtonLeft mouse button
RightMouseButtonRight mouse button
ThumbMouseButtonPrimary mouse thumb button
ThumbMouseButton2Secondary mouse thumb button
MouseScrollUpMouse wheel scrolling up
MouseScrollDownMouse wheel scrolling down
MouseXMouse movement on the X axis
MouseYMouse movement on the Y axis