DestroySound

From Onset Developer Wiki
Revision as of 12:54, 20 November 2019 by 28days (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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