GetMoonSize: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Remove obsolete Requirements section)
 
Line 24: Line 24:
addEventHandler( "onResourceStart", resourceRoot, handleResourceStart )</syntaxhighlight>
addEventHandler( "onResourceStart", resourceRoot, handleResourceStart )</syntaxhighlight>
</section>
</section>
==Requirements==
{{Requirements|1.3.1-9.05063|1.3.1-9.05063}}


==See Also==
==See Also==
{{Client_world_functions}}
{{Client_world_functions}}

Latest revision as of 17:10, 7 November 2024

This function returns the moon size.

[[{{{image}}}|link=|]] Note: The function will return false server-side if moon size has not been set before the function is called.

Syntax

int getMoonSize ()

Returns

Returns a integer being the moon size that is currently set, depending on which side it is used.

Example

Click to collapse [-]
Server

This example will tell the moon size to everyone when the resource is started.

function handleResourceStart( )
    outputChatBox( string.format( "Server's moon size is set to %d", getMoonSize() ) )
end
addEventHandler( "onResourceStart", resourceRoot, handleResourceStart )

See Also