getWorldProperty | Multi Theft Auto: Wiki Skip to content

getWorldProperty

Client-side
Server-side
Shared

Pair: setWorldProperty

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function is used to get the values of time cycle and weather related properties.

Syntax

mixed getWorldProperty ( string property )
Required Arguments
  • property: The property you wish to retrieve.

Returns

  • mixed: value

Returns the value of property represented by either 1 or 3 numbers (RGB, FLOAT, INT) if successful, false otherwise.

Code Examples

shared

This example prints the value of AmbientColor:

local r, g, b = getWorldProperty("AmbientColor")
outputChatBox("Ambient Color: "..table.concat({r, g, b}, ", "))

See Also

World Functions