GetFogDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Server client function}}
__NOTOC__
__NOTOC__
{{Server client function}}
This function will tell you what is the current fog render distance.
{{Note|The function will return ''false'' server-side if fog distance has not been set before the function is called.}}
==Syntax==
<syntaxhighlight lang="lua">
float getFogDistance ( )
</syntaxhighlight>
 
===Returns===
Returns a ''float'' with the current fog 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 getFogDistance ()
function fogDistance( )
outputChatBox( "Fog distance is: " .. tostring( getFogDistance( ) ) )
end
addCommandHandler( "fog", fogDistance )
</syntaxhighlight>
</syntaxhighlight>
==See Also==
{{World_functions}}

Latest revision as of 13:13, 3 August 2014

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

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

Syntax

float getFogDistance ( )

Returns

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

Example

This example will demonstrate basic functionality of the function.

function fogDistance( )
	outputChatBox( "Fog distance is: " .. tostring( getFogDistance( ) ) )
end
addCommandHandler( "fog", fogDistance )

See Also