Jump to content

Got problem with playsound3D


AlexWo

Recommended Posts

Client:

function onResourceStart() 
    local sound = playSound3D("sounds/Avicii.mp3", 373.14, -125.21, 1001, true)  
end 
addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), onResourceStart) 

Meta:

    "Alex" name="RoundMusic" version="1.0.0" type="script"/> 
    

everytime when I start the script it sais :

Couldn't find the script music/Avicii.mp3 for resource speaker

Link to comment
It's better be like this
function onResourceStart() 
        local sound = playSound3D("sounds/Avicii.mp3", 373.14, -125.21, 1001, true) 
    end 
addEventHandler("onClientResourceStart", resourceRoot, onResourceStart) 

It's exactly the same as his code.

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