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

Function

setObjectBreakable

Server and clientObjectsIdentical to MTA:SA

Sets whether the object can be broken with breakObject.

Syntax

bool setObjectBreakable(object theObject, bool breakable)

Arguments

theObjectobject
The object.
breakablebool
false = unbreakable.

Returns

true on success.

Example

local glass = createObject(1649, 0, 0, 3, 0, 0, 0, true)
setObjectBreakable(glass, false)

Notes

State for scripts. It controls breakObject; the object's physical behaviour in the game is set by isBreakable in createObject.

See also