ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Server functions
  3. breakObject

Function

breakObject

ServerObjectsIdentical to MTA:SA

Breaks a breakable object: the object disappears for players and the server fires onObjectBreak. Does nothing for unbreakable objects.

Syntax

bool breakObject(object theObject)

Arguments

theObjectobject
The object.

Returns

true when broken.

Example

local glass = createObject(1649, 2495, -1660, 14, 0, 0, 0, true)
setTimer(function() breakObject(glass) end, 5000, 1)

See also