function soundbinau3_init(e) --do not set above 100 maxvolume = 100 end function soundbinau3_main(e) nvolume = maxvolume - ( GetPlayerDistance(e) / 20.0 ) LoopSound(e,0) if nvolume <= 1 then nvolume = 1 elseif nvolume > maxvolume - 1 then nvolume = maxvolume end SetSoundVolume(nvolume) end if g_Entity[e]['plrinzone']==1 then Destroy(e) end