ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. isObjectMoving

Function

isObjectMoving

Server and clientObjectsIdentical to MTA:SA

Checks whether an object is currently being moved by moveObject.

Syntax

bool isObjectMoving(object theObject)

Arguments

theObjectobject
The object.

Returns

true while moving.

Example

local gate = createObject(980, 0, 0, 3)
addCommandHandler("brama", function()
    if isObjectMoving(gate) then return end
    moveObject(gate, 2000, 0, 0, -3)
end)

See also