SetFarClipDistance: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 10: Line 10:
*'''distance:''' A float specifying the distance of render. '''Setting this less than 5 will cause problems to the client.'''
*'''distance:''' A float specifying the distance of render. '''Setting this less than 5 will cause problems to the client.'''
[[File:Far.png|thumb|example for function]]
[[File:Far.png|thumb|example for function]]
===Returns===
Returns ''true'' if the distance was set correctly, ''false'' if invalid arguments were passed.




Line 18: Line 20:




===Returns===
Returns ''true'' if the distance was set correctly, ''false'' if invalid arguments were passed.


==Example==
==Example==

Revision as of 12:20, 27 April 2020

This function is used to set the distance of render. Areas beyond the specified distance will not be rendered.

Syntax

bool setFarClipDistance ( float distance )

Required Arguments

  • distance: A float specifying the distance of render. Setting this less than 5 will cause problems to the client.
example for function

Returns

Returns true if the distance was set correctly, false if invalid arguments were passed.





Example

Click to collapse [-]
Server

This example adjusts the visibility range of the game world.

addEventHandler( "onResourceStart", resourceRoot,
	function( )
		setFarClipDistance( 3000 ) -- We adjust visibility range to 3000 metres
	end
)
Click to expand [+]
Client

See Also