ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server events
  3. onMapObjectMove

Event

onMapObjectMove

ServerObjectsTrilogy Hub only

A player moved a game map object (e.g. a hydrant or a barrel), not a script-created object.

Handler

addEventHandler("onMapObjectMove", root, function(key, model, x, y, z) ... end)

Parameters

keystring
Map object key.
modelint
Model.
x, y, zfloat
Position.

Source

source is the player who moved the object.

Example

addEventHandler("onMapObjectMove", root, function(key, model, x, y, z)
    outputServerLog(("Model %d ruszony na %.0f, %.0f"):format(model, x, y))
end)

See also