- Documentation
- Client functions
- getSoundPosition
Function
getSoundPosition
Returns the current playback position in seconds.
Syntax
float getSoundPosition(sound theSound)Arguments
theSoundsound- The sound.
Returns
The second or false.
Example
addEventHandler("onClientRender", root, function()
if isElement(music) then
dxDrawText(("%.0f / %.0f s"):format(getSoundPosition(music), getSoundLength(music)), 20, 320)
end
end)