DgsGetProperties

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.

Syntax

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

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

Example

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))
end

See Also

DGS Properties

General Properties

Unique Properties For DGS Core Elements

Extra Properties For DGS Plugins

General Functions

General Events