DestroySound

From Onset Developer Wiki
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