- Documentation
- Client functions
- stopSound
Function
stopSound
Stops a sound and removes it. Fires onClientSoundStopped with the reason "destroyed".
Syntax
bool stopSound(sound theSound)Arguments
theSoundsound- The sound.
Returns
true on success.
Example
local horn = playSound("audio/horn.wav")
setTimer(function()
if isElement(horn) then stopSound(horn) end
end, 2000, 1)