GetFarClipDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Created page with "__NOTOC__ {{Server client function}} ==Syntax== <syntaxhighlight lang="lua"> float getFarClipDistance () </syntaxhighlight>")
 
("Added" getFarClipDistance( ) function page)
Line 1: Line 1:
{{Server client function}}
__NOTOC__
__NOTOC__
{{Server client function}}
This function will tell you what is the current render distance. Areas beyond the specified distance will not be rendered.
{{Note|The function will return ''false'' server-side if far clip distance has not been set before the function is called.}}
==Syntax==
<syntaxhighlight lang="lua">
float getFarClipDistance ( )
</syntaxhighlight>
 
===Returns===
Returns a ''float'' with the current render distance, ''false'' if the operation could not be completed.


==Syntax==
==Example==  
This example will demonstrate basic functionality of the function.
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
float getFarClipDistance ()
setFarClipDistance( 1200 )
outputDebugString( "Render distance: " .. getFarClipDistance( ) )
</syntaxhighlight>
</syntaxhighlight>
==See Also==
{{World_functions}}

Revision as of 12:57, 3 August 2014

This function will tell you what is the current render distance. Areas beyond the specified distance will not be rendered.

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

Syntax

float getFarClipDistance ( )

Returns

Returns a float with the current render distance, false if the operation could not be completed.

Example

This example will demonstrate basic functionality of the function.

setFarClipDistance( 1200 )
outputDebugString( "Render distance: " .. getFarClipDistance( ) )

See Also