Jump to content

CEF Play sound 3D


Recommended Posts

addEventHandler("onClientRender", root, function() 
    local x,y,z = getElementPosition(localPlayer) 
    for k,v in pairs(tvBrowsers) do 
        if not isBrowserLoading(v) then 
            local bx,by,bz = getElementPosition(tvParents[v]) 
            local dist = getDistanceBetweenPoints3D(x,y,z,bx,by,bz) 
            setBrowserVolume(v, 1-dist/10) 

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...