IsPlayerConnected

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 12:45, 4 August 2026 by QCherry (talk | contribs) (Automatyczna aktualizacja dokumentacji funkcji)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

isPlayerConnected

Checks whether a player identifier belongs to a connected client.

Syntax

bool isPlayerConnected(int playerId)

Parameters

Name Type Required Description
playerId int yes The player identifier to check.

Returns

Returns true when the player is connected; otherwise returns false.

Examples

Validate a player before changing state:

if isPlayerConnected(playerId) then
    outputChatBox("You are connected", playerId)
end

Notes

  • Available only in server-side resource scripts.