SetCloudDensity

From Onset Developer Wiki
SetCloudDensity

Type: Function
Context: Client
Introduced: v1.2.1

Description

Sets the cloud density for this client.

Syntax

SetCloudDensity(density)

Parameters

  • density
    Density value between 0.0 and 4.0, default: 1.15

Return Value

  • Returns true.

Example

-- server side
function cmd_clouddensity(player, density)
	if (density == nil) then
		return AddPlayerChat(player, "Usage: /clouddensity <density 0-4>")
	end
	
	density = tonumber(density)

	CallRemoteEvent(player, "ClientSetCloudDensity", density)
end
AddCommand("clouddensity", cmd_clouddensity)

-- client side
function ClientSetCloudDensity(density)
	SetCloudDensity(density)
end
AddRemoteEvent("ClientSetCloudDensity", ClientSetCloudDensity)

A density of 0 hides the clouds on the first cloud layer.

A density of 4 will cover the entire sky with clouds. This also has an effect on the lighting on the ground.

See also