Scripting/Server/Classes/Sound_server/SetVolume

Volume percentage.

Syntax

sound.SetVolume(0-100)
sound.Volume

Arguments

Example

function onPlayerCommand( player, cmd, params )
{
	if ( cmd == "setvolume" )
	{
		// sound is a sound handle (see Sound (server))
		sound.SetVolume( 0 );
	}
}

This sample was generated from the signature – adapt the values to your gamemode.

Section: Sound (server)

Categories: Server methods | Sound (server)