- Dokumentacja
- Funkcje klienta
- getSoundHeardVolume
Funkcja
getSoundHeardVolume
Zwraca głośność, którą gracz naprawdę słyszy: po odległości od kamery i po suwaku głośności w ustawieniach.
Składnia
float getSoundHeardVolume(sound theSound)Argumenty
theSoundsound- Dźwięk.
Zwraca
Głośność 0-1 albo false.
Przykład
addEventHandler("onClientRender", root, function()
if isElement(radio) then
dxDrawText(("Radio: %d%%"):format(getSoundHeardVolume(radio) * 100), 20, 300)
end
end)