SetMoonSize: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server client function}} {{New feature/item|4.0132|1.3.1|5063| This function sets the moon size. Using this function server-side will overwrite the value that was pre...")
 
No edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__NOTOC__
__NOTOC__
{{Server client function}}
{{Server client function}}
{{New feature/item|4.0132|1.3.1|5063|
{{New feature/item|3.0132|1.3.1|5063|
This function sets the moon size. Using this function server-side will overwrite the value that was previously set client-side.
This function sets the moon size. Using this function server-side will overwrite the value that was previously set client-side.
}}
}}
Line 18: Line 18:
==Example==
==Example==
<section name="Server" class="server" show="true">
<section name="Server" class="server" show="true">
This example change moon size to more realistic for everyone when the resource is started.
This example change moon size to looks more realistic for everyone when the resource is started.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
function handleResourceStart( )
function handleResourceStart( )
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 11:54, 22 April 2013

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 )

Requirements

Minimum server version 1.3.1-9.05063
Minimum client version 1.3.1-9.05063

Note: Using this feature requires the resource to have the above minimum version declared in the meta.xml <min_mta_version> section. e.g. <min_mta_version server="1.3.1-9.05063" client="1.3.1-9.05063" />

See Also

Shared