GetMoonSize: 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 returns the moon size. Using this function server-side will return the server-side value,...")
 
(Remove obsolete Requirements section)
 
(5 intermediate revisions by 3 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 returns the moon size. Using this function server-side will return the server-side value, not necessarily the same that is set client-side.
This function returns the moon size.
{{Note|The function will return ''false'' server-side if moon size has not been set before the function is called.}}
 
}}
}}


Line 11: Line 13:


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


==Example==
==Example==

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