OnPlayerInteractionStart
Jump to navigation
Jump to search
onPlayerInteractionStart
Triggered when a replicated general interaction begins.
Availability
This event is available in server-side scripts.
Callback signature
onPlayerInteractionStart(playerId, kind, actionId, serverStartTimeMs)
Parameters
| Name | Type | Description |
|---|---|---|
playerId |
int |
The interacting player ID. |
kind |
string |
The interaction kind, such as mining or sitting. |
actionId |
int |
The replicated action ID. |
serverStartTimeMs |
int |
Server time at which the action began. |
Examples
Handle the event:
addEventHandler("onPlayerInteractionStart", root, function(playerId, kind, actionId, serverStartTimeMs)
outputDebugString("onPlayerInteractionStart: player=" .. playerId .. " kind=" .. kind)
end)
Notes
- Use the specialized mining and sitting events when the interaction type matters.