Jump to content

Help - set volume of Browser


Recommended Posts

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 by Guest
Link to comment
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 

Link to comment
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 

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...