IsPlayerInteracting: Difference between revisions
Jump to navigation
Jump to search
Document server-owned monsters and interactions |
Complete Lua function catalog |
||
| Line 31: | Line 31: | ||
* This covers every interaction kind, including mining and sitting. | * This covers every interaction kind, including mining and sitting. | ||
[[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
isPlayerInteracting
Checks whether a player currently has any active replicated interaction.
Syntax
bool isPlayerInteracting(int playerId)
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
playerId |
int |
yes | The connected player identifier. |
Returns
Returns true while an interaction is active; otherwise returns false.
Examples
Block an action while the player is busy:
if isPlayerInteracting(playerId) then
outputChatBox("Finish the current interaction first.", playerId)
return
end
Notes
- Available only in server-side resource scripts.
- This covers every interaction kind, including mining and sitting.