Skip to content

Connection#

Defined in Core.hpp. Network latency queries and game-level button injection.

GetClientPing#

int GetClientPing();

Returns the client-side network ping in milliseconds. Returns 0 if the connection component is not available.

int ping = GetClientPing();

GetServerPing#

int GetServerPing();

Returns the server-side network ping in milliseconds. Returns 0 if the connection component is not available.

int serverPing = GetServerPing();

PressGameButton#

void PressGameButton(uint32_t bit);

Presses a game-level button. The button remains pressed until ReleaseGameButton() is called with the same bit.

Parameter Type Description
bit uint32_t Button bit from GameButton namespace
PressGameButton(GameButton::Jump);
// ... later ...
ReleaseGameButton(GameButton::Jump);

Warning

Always pair PressGameButton with ReleaseGameButton. Forgetting to release will keep the button held indefinitely.


ReleaseGameButton#

void ReleaseGameButton(uint32_t bit);

Releases a previously pressed game button.

Parameter Type Description
bit uint32_t Button bit from GameButton namespace

GameButton Constants#

See Constants — Game Buttons for the full table of button bits.