ResetFarClipDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
("Added" resetFarClipDistance( ) function page)
m (Added a note on client-side use of this function)
Line 2: Line 2:
__NOTOC__
__NOTOC__
This function resets the far clip distance to its default state.
This function resets the far clip distance to its default state.
 
{{Note|The function will not reset far clip distance client-side, as it is not relying on a static value. It is recommended to set a value (default: 1000) server-side, and call for the value from client's side when such static value is needed.}}
==Syntax==
==Syntax==
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">

Revision as of 13:05, 3 August 2014

This function resets the far clip distance to its default state.

[[{{{image}}}|link=|]] Note: The function will not reset far clip distance client-side, as it is not relying on a static value. It is recommended to set a value (default: 1000) server-side, and call for the value from client's side when such static value is needed.

Syntax

bool resetFarClipDistance ( )

Returns

Returns true if operation was successful, false otherwise.

Example

This example will demonstrate basic functionality of the function.

setFarClipDistance( 1200 )
outputDebugString( "Render distance: " .. getFarClipDistance( ) )
resetFarClipDistance( )
outputDebugString( "New render distance: " .. tostring( getFarClipDistance( ) ) )

See Also