Advertisement
Guest User

ctp.sqf

a guest
Feb 10th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. private ["_mosque", "_times_to_play", "_played_times", "_i"];
  2. _mosque = [minaret,minaret_1,minaret_2,minaret_3,minaret_4,minaret_5,minaret_6,minaret_7,minaret_8,minaret_9,minaret_10,minaret_11,minaret_12,minaret_13]; //object on map named minaret
  3. _times_to_play = [5, 7, 14, 17, 20, 22];
  4. _played_times = [0, 0, 0, 0, 0, 0];
  5. _i = 0;
  6. while {true} do
  7. {
  8. _i = 0;
  9. {
  10. if (abs (dayTime - _x) < 0.05) then
  11. {
  12. if ((_played_times select _i) == 0) then
  13. {
  14. _played_times set [_i, 1];
  15. {_x say3D ["prayer",1500]} forEach _mosque;
  16. };
  17. };
  18. _i = _i + 1;
  19. } forEach _times_to_play;
  20.  
  21. if (dayTime > ((_times_to_play select 4) + 0.1)) then
  22. {
  23. _played_times = [0, 0, 0, 0, 0, 0];
  24. };
  25.  
  26. Sleep 10;
  27. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement