UPDATE: Here is the script.
Call to Prayer - Marker version
-------------------
This script will add loudspeakers near user-placed markers which will play an Islamic Call to Prayer (adhan) at certain times of day (defined in the call to prayer loop in functions.sqf - by default these are based on May 2016 in Kabul). It will work on any map and allows the mission maker to define certain locations on a map to play the adhan, as opposed to the automatic script that detects towns and places louspeakers near the centre. The mission.sqm has markers placed at appropriate (ish) locations on FATA and these are defined in the init.sqf in the mission root, but these can be adapted to your needs.
INSTRUCTIONS
Step 1: Place the CalltoPrayer folder in the root of your mission folder. Place empty icon markers (not shape / area markers) on the map in the areas you want Call to Prayer loudspeakers to spawn. The loudspeakers will spawn fairly close to the markers so if you want them to sound like they are coming from a particular building, this is possible by placing the marker over that building. A loudspeaker will be spawned nearby. Name those markers something simple like CTP1, CTP2, CTP3 etc.
Step 2: Then add these lines to the init.sqf file in the mission root folder (IMPORTANT: they must go at the very top or the script may not work):
//--------------call to prayer------------------------------------------
INS_CTPMARKERS = ["CTP1","CTP2","CTP3","CTP4","CTP5","CTP6","CTP7","CTP8","CTP9","CTP10","CTP11","CTP12"]; // marker names in this array will be picked up by the call to prayer script adn can be changed according to preference (eg INS_CTPMARKERS = ["MyMarker1","MyMarker2","MyMarker3"]) call compile preprocessFile "CallToPrayer\init.sqf"; //this executes the Call to Prayer script
Step 3: Finally, add this to your description.ext:
//----------------------Call to Prayer------------------------ //This adds the sound config entries for the call to prayer script class CfgSounds { sounds[] = {prayer}; class prayer { name = "prayer"; sound[] = {"CalltoPrayer\sounds\prayer.ogg", db+10, 1}; titles[] = {}; }; };
Credits
-----------
Hazey and Sacha for writing the initial functions, SpyderBlack723 for adapting the scripts for use on FATA.