Jump to content

sounds


abdalbaset

Recommended Posts

Posted

yeah you can use playSound3D or playSound

EXMPLE playSound3D

addEventHandler( 'onClientResourceStart', resourceRoot, 
    function( ) 
        local uSound = playSound3D( 'http://193.34.51.25:80', 2498, -1659, 12 )  
        setSoundMaxDistance( uSound, 100 ) 
    end 
) 

Posted

its now working

but i want one more thing i want to add more than 1 song whene i use commend its go to the next song i didnt want to do that with gui becuse its kind of hard

Posted

Initialize an array with the song paths and push the array key until it gets to the end of the array - then start from the beginning of the array and repeat the same thing.

Make sure to use destroyElement or stopSound each time you skip a song, this way you won't get multiple sounds playing simultaneously.

Posted

look, if you wanna play sound and everyone wanna hear it, then use this as an example

function song () 
   sound = playsound("link of website" or "song in the same resource as your script is in") 
   setSoundMaxDistance(sound, 400) 
end 

check it :D

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