stevensalvaro Posted March 2, 2016 Posted March 2, 2016 (edited) Hello, i just make TV system , but i got an error , how to set my youtube full screen not like this , and how to set the volume so if i near the tv only i can hear the volume , because i can hear it everywhere in this map Edited March 2, 2016 by Guest
stevensalvaro Posted March 2, 2016 Author Posted March 2, 2016 btw , it's not on player screen , it's on world map.
Dimos7 Posted March 2, 2016 Posted March 2, 2016 (edited) for the sound can you take the distance between your tv and player example function tvScreensound() local x, y, z = getElementPosition(localPlayer) local dist = getDistanceBetweenPoints3D(x,y ,z, 0, 0, 3) -- in 0, 0 ,3 put the location of your screen if dist <= 100 then setSoundVolume(file/soundname, 100) end end Edited March 2, 2016 by Guest
stevensalvaro Posted March 2, 2016 Author Posted March 2, 2016 i can't use setSoundVolume , but i will try to use setBrowserVolume ...
stevensalvaro Posted March 2, 2016 Author Posted March 2, 2016 no , i can't set the default browser volume to 0 and then set it again on 3d volume to 1
Dimos7 Posted March 2, 2016 Posted March 2, 2016 function tvScreensound() local x, y, z = getElementPosition(localPlayer) local dist = getDistanceBetweenPoints3D(x,y ,z, 0, 0, 3) -- in 0, 0 ,3 put the location of your object where is your screen tv on. if dist <= 100 then setBrowserVolume(the browser, 1) end end
stevensalvaro Posted March 2, 2016 Author Posted March 2, 2016 hmm , how to set the browser volume 0 first , because i can hear the volume everywhere .. i just try to setBrowserVolume(myBrowser, 0) but when i add distance volume , the volume still 0
Dimos7 Posted March 2, 2016 Posted March 2, 2016 function tvScreensound() setBrowserVolume(myBrowser, 0.0) local x, y, z = getElementPosition(localPlayer) local dist = getDistanceBetweenPoints3D(x, y , z, 0, 0, 3) -- in 0, 0 ,3 put the location of your object where is your screen tv on. if dist <= 100 then setBrowserVolume(myBrowser, 1.0) end end
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now