IsPlayerSitting

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 09:54, 15 August 2026 by QCherry (talk | contribs) (Complete Lua function catalog)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

isPlayerSitting

Checks whether a player is currently performing the replicated sitting interaction.

Syntax

bool isPlayerSitting(int playerId)

Parameters

Name Type Required Description
playerId int yes The connected player identifier.

Returns

Returns true only while the player's active interaction kind is sitting; otherwise returns false.

Examples

Start passive recovery while a player sits:

if isPlayerSitting(playerId) then
    local health = getPlayerHealth(playerId)
    setPlayerHealth(playerId, health + 1)
end

Notes

  • Available only in server-side resource scripts.
  • The visual sitting animation is replicated by the client presentation layer.