Jump to content

Sound played


browneyadz

Recommended Posts

Server

function bridgeMusic(thePlayer) 
  triggerClientEvent(getRootElement(), "bridgeCloseMusic", getRootElement()) 
end 
addCommandHandler("bridgeclose", bridgeMusic) 

Client

addEvent("bridgeCloseMusic",true) 
addEventHandler("bridgeCloseMusic", getRootElement(), function() 
local sound = playSound3D("music.mp3", x, y, z, false)   
setSoundVolume(sound, 2.0) 
end) 

Link to comment

mta lua is rather idiot-proof (it doesnt mean i think you are one, just a general calling), but on some more advanced languages - setting values over the max will broke whole code :P

the sound volume is max by default anyways 

im always wondering why everyone using playSound or playSound3D are setting volume to default value. never seen anybody here (asking for help) NOT doing this.. hmm, maybe example on wiki have this?

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