IsPlayerSitting
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.