huntergreyz Posted September 17, 2011 Share Posted September 17, 2011 Hallo erstmal ich hab mir eine Map gemappt und möchte jetzt gerne eine musik einfügen kann mir da jemand helfen danke an alle leuute !! Link to comment
Tockra Posted September 17, 2011 Share Posted September 17, 2011 Das musst du über Lua mit den entsprechenden Funktionen machen ( playSound, bindKey, etc.) . Link to comment
krischkros Posted March 17, 2012 Share Posted March 17, 2012 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) Link to comment
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