#Conditional Hooks ; play-music-from-file script v0.04 - by pecenipicek $Application: FS2_Open $On Game Init: [ ahret = -1 fadeh = false pm = function( MFile, fade, Vol) Vol = Vol / 100.0 if fade == 0 then fadeh = false end if fade == 1 then fadeh = true end if ahret ~= nil then if ahret ~= -1 then ad.stopMusic(ahret, fadeh) end end ahret = ad.playMusic(MFile, Vol) end sm = function() if ahret ~= nil then if ahret ~= -1 then ad.stopMusic(ahret, fadeh) ahret = -1 fade = false end end end ] $On Mission End: [ if ahret ~= -1 then ad.stopMusic(ahret, fadeh) ahret = -1 fadeh = false end ] #End