IsPlayerSitting: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Document server-owned monsters and interactions
 
Complete Lua function catalog
 
Line 31: Line 31:
* The visual sitting animation is replicated by the client presentation layer.
* The visual sitting animation is replicated by the client presentation layer.


[[Category:Lua Functions]]
[[Category:Server Functions]]
[[Category:Server Functions]]
[[Category:Player Functions]]
[[Category:Player Functions]]
[[Category:Interaction Functions]]
[[Category:Interaction Functions]]

Latest revision as of 09:54, 15 August 2026

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.