25.08.2012, 11:43
It's possible, but it's probably not worth the hassle.
You would need to create multiple sound files, where you adjust the volume of the sirens, and have them uploaded somewhere.
When typing the command /siren, you do a check for players nearby and play the sound with the correct volume according to their distance. I would personally create a timer which would adjust the sounds according to their distance(s).
Your console and/or chat would probably be spammed though due to prints. As I said, it's probably not worth the hassle.
You would need to create multiple sound files, where you adjust the volume of the sirens, and have them uploaded somewhere.
When typing the command /siren, you do a check for players nearby and play the sound with the correct volume according to their distance. I would personally create a timer which would adjust the sounds according to their distance(s).
Your console and/or chat would probably be spammed though due to prints. As I said, it's probably not worth the hassle.