setElementDoubleSided | Multi Theft Auto: Wiki Skip to content

setElementDoubleSided

Client-side
Server-side
Shared

Pair: isElementDoubleSided

This function allows you to set the double-sidedness of an element's model. When an element's model is double-sided, it's back facing triangles become visible. See what is back-face culling.

Note

Possible uses of double-sidedness are: Elimination of invisible walls, using buildings as enclosures, using inverted landmasses as large pits or to make cave networks. It can also remove the need to add extra triangles to custom models when trying to make them appear solid from all directions.

OOP Syntax Help! I don't understand this!

  • Method:element:setDoubleSided(...)
  • Variable: .doubleSided

Syntax

bool setElementDoubleSided ( ​element theElement, ​bool enable )
Required Arguments
  • theElement: The element in which you'd like to set the double-sidedness of.
  • enable: Set to true/false to enable/disable double-sidedness.

Returns

  • bool: result

Returns true if theElement is valid, false otherwise.

Code Examples

shared
local obj = createObject(7488,1282.599609375, 1002, -6.0999999046326, 0, 0, 122.98101806641)
setElementDoubleSided(obj, true)

See Also

Element Functions