- Documentation
- Client functions
- getSoundHeardVolume
Function
getSoundHeardVolume
Returns the volume the player actually hears: after distance from the camera and after the volume slider in the settings.
Syntax
float getSoundHeardVolume(sound theSound)Arguments
theSoundsound- The sound.
Returns
Volume 0-1 or false.
Example
addEventHandler("onClientRender", root, function()
if isElement(radio) then
dxDrawText(("Radio: %d%%"):format(getSoundHeardVolume(radio) * 100), 20, 300)
end
end)