The music.lua seems to have dissapeared. The lua script below works, I believe I once copied it from these forums too. Save it in a file called music.lua , create a folder called files in your maps' location and put the music file in it called music.mp3
function startMusic()
setRadioChannel(0)
song = playSound("files/music.mp3",true)
outputChatBox("Press M to mute the music.")
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("mkmap1_racetheme",toggleSong)
bindKey("m","down","mkmap1_racetheme")