SetFarClipDistance

From Multi Theft Auto: Wiki
Revision as of 00:29, 6 October 2026 by IManGaaX (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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

example for function

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.

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 collapse [-]
Client

This example adjusts the visibility range of the game world.

addEventHandler("onClientResourceStart", resourceRoot,
    function()
        setFarClipDistance(3000) -- We adjust visibility range to 3000 metres
    end
)

See Also