From Multi Theft Auto: Wiki
Jump to navigation Jump to search

This function gets the values of secific properties or all the properties of a DGS element. For a list of properties and their meaning, see the DGS properties page.


table dgsGetProperties ( element dgsElement [, table properties ] )

DGS OOP Syntax Help! I don't understand this!

Method: DGSElement:getProperties(...)
Counterpart: dgsSetProperties

Required Arguments

  • dgsElement: the DGS element you wish to set a property to.

Optional Arguments

  • properties: a table stores the properties name you want to get.


returns a table stores property name and value if succeeds, false otherwise.


This example shows how to set multi properties at a time.

DGS = exports.dgs
button = DGS:dgsCreateLabel(20, 200, 150, 30, "Test", false)
properties = {"text","textcolor"}
local data = DGS:dgsGetProperties(button, properties)
for k,v in pairs(data) do
	outputChatBox(k.." = "..tostring(v))

See Also

DGS Properties

General Properties

Unique Properties For DGS Core Elements

Extra Properties For DGS Plugins

General Functions

General Events