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

PulseGameButton#

void PulseGameButton(uint32_t bit, uint32_t holdMs = 50);

Presses a game button and schedules an automatic release after holdMs milliseconds. This is the correct call for abilities and other edge-triggered inputs (Skill1, Skill2, Ult, Reload, Interact, Melee).

The game fires these abilities once on the button's rising edge. A plain PressGameButton without a matching release keeps the bit held and blocks every subsequent cast — the plugin looks like it's "not activating the spell". PulseGameButton owns the press/release timing on the host side so plugins don't have to manage a per-bit timer.

Parameter Type Description
bit uint32_t Button bit from GameButton namespace
holdMs uint32_t Hold duration before auto-release. Default 50, clamped to [1, 2000].
// Fire Tracer blink once:
PulseGameButton(GameButton::Skill2);

// Fire pulse bomb, slightly longer hold to be safe across ticks:
PulseGameButton(GameButton::Ult, 80);

Continuous inputs (LMouse, RMouse, Jump, Crouch) are still best expressed with PressGameButton / ReleaseGameButton because you want the bit held for as long as the condition is true.


GameButton Constants#

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