DgsGetProperties: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "{{Client function}} __NOTOC__ 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 (OOP Syntax)/(Template Organization) Mission)
Line 7: Line 7:
table dgsGetProperties ( element dgsElement [, table properties ] )
table dgsGetProperties ( element dgsElement [, table properties ] )
</syntaxhighlight>
</syntaxhighlight>
{{DGS/OOP||DGSElement:getProperties|||dgsSetProperties}}


===Required Arguments===
===Required Arguments===
Line 29: Line 30:
</syntaxhighlight>
</syntaxhighlight>


==See Also==
=See Also=
{{DGSFUNCTIONS}}
 
==<span style="color:#eb3f00;text-shadow:0.05em 0.05em 0.2em #00000099;">DGS Properties</span>==
{{DGSPROPERTIES}}
 
==<span style="color:#eb3f00;text-shadow:0.05em 0.05em 0.2em #00000099;">General Functions</span>==
{{DGS General Functions}}
 
==<span style="color:#eb3f00;text-shadow:0.05em 0.05em 0.2em #00000099;">General Events</span>==
{{DGS Events/General}}

Revision as of 16:48, 19 April 2021

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!

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