Closed FileEX closed 5 years ago
setSoundPosiiton
i think you make typo in function name, should be setSoundPosition
or, you pass string as position, and script could not be able to convert it to float
Yes, it setSoundPosition, my mistake on github :P
And the same code with playSound instead playSound3D will work.
Its working just fine - cant reproduce it. The only thing i've noticed: When passing an invalid position argument to it, it will start from 0 instead of returning false
local uSound = false
addEventHandler("onClientResourceStart", resourceRoot, function()
uSound = playSound3D("music.mp3", 0, 0, 3.5, true)
end)
addCommandHandler("ssp", function(strCMD, position)
outputChatBox("Seting sound position: " .. tostring(setSoundPosition(uSound, position)))
end)
So playSound3D don't support setSoundPosition only if path is url instead file. I use release, and i was tested it on URL, i wasn't tested it on file path.
Oh, sorry - yeah - it`s obviously that you cant change the sound position of a stream because it would require MTA to cache the song locally. For streams, it should return false.
But i can change the sound position of a stream, only in playSound :P So this don't work only on playSound3D
I've tested it with playSound and also with playSound3D - streamed songs (ex: podcasts) wont work for both.
Convert music from yt and use download url as sound url. With playSound it work and can change position, but with 3D don't work.
What does setElementPosition() do with the streamed sound?
I mean playback position instead position as sound element. With playSound it work, with playSound3D it don't work.
Describe the bug setSoundPosition don't work at sound which is created with playSound3D. Only don't work if path is URL.
To reproduce
Expected behaviour
Screenshots
Version 1.5.6
Additional context 3D sounds don't support setSoundPosition