DestroySound

From Onset Developer Wiki
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
DestroySound

Type: Function
Context: Client
Introduced: v1.0

Description

Destroy the sound created with CreateSound.

Syntax

DestroySound(sound)

Parameters

  • sound
    The sound identifier.

Return Value

  • This function returs nothing.

Example

function PlayAudioFile(file)
	DestroySound(LastSoundPlayed)

	LastSoundPlayed = CreateSound("client/files/"..file)
	SetSoundVolume(LastSoundPlayed, 1.1)
end
AddRemoteEvent("PlayAudioFile", PlayAudioFile)

See also