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

Function

setObjectProperty

ServerObjectsIdentical to MTA:SA

Stores an object physical property: "mass", "turn_mass", "air_resistance", "elasticity", "center_of_mass", "buoyancy".

Syntax

bool setObjectProperty(object theObject, string property, any value)

Arguments

theObjectobject
The object.
propertystring
Property name.
valueany
Value (a number, or {x, y, z} table for center_of_mass).

Returns

true on success, false for an unknown name.

Example

local obj = createObject(1225, 0, 0, 3)
setObjectProperty(obj, "elasticity", 0.8)

Notes

State for scripts. The object's physics in the game does not change.

See also