GetMoonSize: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
Line 24: Line 24:


==Requirements==
==Requirements==
{{Requirements|1.3.1-9.05063|1.3.1-9.05063|}}
{{Requirements|1.3.1-9.05063|1.3.1-9.05063}}


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

Revision as of 08:16, 18 February 2013

ADDED/UPDATED IN VERSION 1.3.1 r5063:

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.

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 )

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