api.client for yourself.
Use get(player) to grab a handle for one player, then call methods on it like :getHealth() or :isReloading(). Or use the signals to react when anyone’s state changes. A handle has the shared methods plus whatever extras the current game adds, so guard the game-specific ones with if handle.x then. See Game support.
Looking up players
| Call | Returns | What it does |
|---|---|---|
getAll() | { Player } | A list of every other player currently in the match. |
get(player) | PlayerHandle? | A handle you can read state from. nil if you pass yourself; use api.client instead. |
getLocalPlayer() | Player | Shortcut for api.client.getPlayer(). Useful when you want to skip yourself in a loop. |
Example
Shared
Handle methods and signals that work in every game.
Bloxstrike
Plant/defuse, armor, hostages, money, backtrack.
Rivals
Duel, movement, level, ELO.
Apocalypse Rising 2
Ammo, velocity, healing.
Types
PlayerHandle.