GamerDeMTA Posted March 17, 2013 Posted March 17, 2013 can someone give me the Script? or is like Music in the maps?
csiguusz Posted March 17, 2013 Posted March 17, 2013 playSound ? Owner of [HUN]Magyar Play Szerver 1.4, IP: 31.220.43.153:22003
Anony# Posted March 17, 2013 Posted March 17, 2013 function startMusic() setRadioChannel(0) song = playSound("song.mp3",true) end function makeRadioStayOff() setRadioChannel(0) cancelEvent() end function toggleSong() if not songOff then setSoundVolume(song,0) songOff = true removeEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) else setSoundVolume(song,1) songOff = false setRadioChannel(0) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) end end addEventHandler("onClientResourceStart",getResourceRootElement(getThisResource()),startMusic) addEventHandler("onClientPlayerRadioSwitch",getRootElement(),makeRadioStayOff) addEventHandler("onClientPlayerVehicleEnter",getRootElement(),makeRadioStayOff) addCommandHandler("music",toggleSong) bindKey("m","down","music") observation was not made by me. Team, MTA Scripters.
Renkon Posted March 17, 2013 Posted March 17, 2013 Instead of copying and pasting why dont you do something simpler? addEventHandler("onClientResourceStart", resourceRoot, function() playSound("file.mp3") -- Dont forget to add file src in meta. end )
Anony# Posted March 17, 2013 Posted March 17, 2013 Instead of copying and pasting why dont you do something simpler? addEventHandler("onClientResourceStart", resourceRoot, function() playSound("file.mp3") -- Dont forget to add file src in meta. end ) he does not want to play just one sound, he wants a script for a map. ^^ Team, MTA Scripters.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now