SetMoonSize: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
(Remove obsolete Requirements section)
 
Line 25: Line 25:
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 sets the moon size. Using this function server-side will overwrite the value that was previously set client-side.

Syntax

bool setMoonSize ( int size )

Required Arguments

  • size: The size, can be 0 or any positive value. Default is 3.

Returns

Returns true if the moon size was set correctly, false otherwise.

Example

Click to collapse [-]
Server

This example change moon size to looks more realistic for everyone when the resource is started.

function handleResourceStart( )
    setMoonSize( 0 )
end
addEventHandler( "onResourceStart",  resourceRoot, handleResourceStart )

See Also