GetFarClipDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
("Added" getFarClipDistance( ) function page)
m (Added default value)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Server client function}}
{{Server client function}}
__NOTOC__
__NOTOC__
This function will tell you what is the current render distance. Areas beyond the specified distance will not be rendered.
This function will tell you what is the current render distance.
{{Note|The function will return ''false'' server-side if far clip distance has not been set before the function is called.}}
{{Note|The function will return ''false'' server-side if far clip distance has not been set before the function is called.}}
{{Note|Default far clip distance value is 800.}}
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">

Latest revision as of 14:07, 6 January 2022

This function will tell you what is the current render distance.

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

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