META:
<file src="pfad/lied.mp3 />
Client:
addEventHandler("onClientResourceStart", getRootElement(),
function()
sound = playSound("pfad/lied.mp3")
end)
Das sie einfach gehaltene Version und
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("", 255, 255, 255, true)
outputChatBox ("#FF0033Krischkros: #CCCCCCMap loaded", 255, 255, 255, true)
outputChatBox ("#FF0033Krischkros: #CCCCCCDrücke #007fff'M'#bdbdbd um die Musik ein und auszuschalten.", 255, 255, 255, true)
outputChatBox ("#FF0033Krischkros: #CCCCCCSong:SONGNAME", 255, 255, 255, true)
outputChatBox ("#FF0033Krischkros: #CCCCCCBesucht uns unter:http://krischkros.de/", 255, 255, 255, true)
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("musicmusic",toggleSong)
bindKey("m","down","musicmusic")
addEventHandler("onClientResourceStop",getResourceRootElement(getThisResource()),startMusic)