SetCloudDensity

From Onset Developer Wiki
Revision as of 10:59, 24 July 2020 by BlueMountains (talk | contribs) (Created page with "{{Info|Function|Client|1.2.1}} {{FuncDescription|Sets the cloud density for this client.}} {{FuncSyntax|SetCloudDensity(density)}} {{FuncParameters}} {{FuncParam|density|De...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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)

See also