SetFogDistance

From Multi Theft Auto: Wiki
Jump to navigation Jump to search

This function changes the distance at which fog appears. Keep in mind that this function doesn't change the distance of render.

Syntax

bool setFogDistance ( float distance )

Arguments

  • distance: distance in GTA units at which fog will appear. Very short distances will cause graphical bugs to the players.

Returns

Returns true if the distance changed successfully, false if bad arguments were passed.

Example

Click to collapse [-]
Server

This example makes any weather very clear when the resource that contains it starts.

function makeWeatherClear()
    setFogDistance(500) -- Set the fog distance to 500 units, so any weather will appear to be extremely clear
end
addEventHandler("onResourceStart", resourceRoot, makeWeatherClear)

See Also