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