Jump to content

Got problem with playsound3D


AlexWo

Recommended Posts

Posted

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

Posted

This means the sound could not be found. Check if its path is right.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

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) 

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

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

make sure if the mp3 file its same name than in the meta and resource

Actual Nick: [XGN]BorderLine

Actual Clan: XLatino

Actual Status: Staff, Mod Level 1

(BOSS)Yakuza - [vS]Yakuza - [sXE]Yakuza - [uG]Yakuza - [FTLS]Racing - [XGN]Borderline

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