stopSound
Server
Stops a sound the server created and destroys the element on every client.
Also exists on the client, with its own implementation: stopSound
bool stopSound(sound sound)
Parameters
| Name | Type | Description |
|---|---|---|
| sound | sound | The sound element. |
Returns
true if the sound was destroyed, false otherwise.
Example
local alarm = playSound3D("sounds/alarm.ogg", 1481.0, -1771.3, 18.8, true)
setTimer(function()
stopSound(alarm)
end, 30000, 1)Coming from MTAIn MTA,
stopSound exists on the client only.