SPS:getProperties: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
{{Server client function}}
{{Server client function}}
<lowercasetitle></lowercasetitle>
__NOTOC__
__NOTOC__



Latest revision as of 11:17, 7 June 2019


This function is used to retrieve all property elements.

Syntax

table getProperties()

Returns

Returns all property elements.

Example

Click to collapse [-]
Serverside example

This example script outputs all property IDs to the chat.

addEventHandler("onResourceStart",root,
	function()
		local properties = getProperties()
		for i,property in ipairs(properties) do
			outputChatBox("ID: "..getPropertyID(property))
		end
	end
)