Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. A3L_Fnc_TraflightA = {
  2.  
  3. IF(isServer) THEN {
  4. private ["_trafficlight"];
  5.  
  6. _trafficlight = _this select 0;
  7. if (!(typeOf _trafficlight IN ["Land_E76_trafficlight01a","Land_E76_trafficlight03a"])) exitwith {};
  8.  
  9. sleep 3;
  10.  
  11. WHILE{true} DO {
  12.  
  13. _trafficlight animate ["switchyellow",0];
  14.  
  15. sleep 6;
  16. _trafficlight animate ["switchred",1];
  17. _trafficlight animate ["switchyellow",1];
  18. _trafficlight animate ["switchgreen",0];
  19.  
  20. sleep 20;
  21.  
  22. _trafficlight animate ["switchgreen",1];
  23. _trafficlight animate ["switchyellow",0];
  24.  
  25. sleep 6;
  26.  
  27. _trafficlight animate ["switchyellow",1];
  28. _trafficlight animate ["switchred",0];
  29.  
  30. sleep 32;
  31. };
  32. };
  33.  
  34. };
  35.  
  36. A3L_Fnc_TraflightB = {
  37.  
  38. IF(isServer) THEN {
  39. private ["_trafficlight"];
  40. _position2 = [8572,6707,0];
  41.  
  42. _trafficlight = _this select 0;
  43. if (!(typeOf _trafficlight IN ["Land_E76_trafficlight01b","Land_E76_trafficlight02a"])) exitwith {};
  44.  
  45. _sleep = 3;
  46.  
  47. if (
  48.  
  49. (_trafficlight == _position2 nearestObject 153)
  50. OR (_trafficlight == _position2 nearestObject 155)
  51. OR (_trafficlight == _position2 nearestObject 150)
  52. OR (_trafficlight == _position2 nearestObject 180)
  53. OR (_trafficlight == _position2 nearestObject 175)
  54. OR (_trafficlight == _position2 nearestObject 184)
  55. //NEUE
  56. OR (_trafficlight == _position2 nearestObject 350)
  57. OR (_trafficlight == _position2 nearestObject 345)
  58. OR (_trafficlight == _position2 nearestObject 373)
  59. /*
  60. OR (_trafficlight == _position2 nearestObject 1006828)
  61. OR (_trafficlight == _position2 nearestObject 1006830)
  62. OR (_trafficlight == _position2 nearestObject 1007376)
  63. OR (_trafficlight == _position2 nearestObject 1007481)
  64. */
  65. ) then {
  66. _sleep = 32;
  67. };
  68.  
  69. sleep _sleep;
  70.  
  71. WHILE{true} DO {
  72.  
  73. _trafficlight animate ["switchyellow",1];
  74. _trafficlight animate ["switchred",0];
  75.  
  76. sleep 32;
  77.  
  78. _trafficlight animate ["switchyellow",0];
  79.  
  80. sleep 6;
  81.  
  82. _trafficlight animate ["switchred",1];
  83. _trafficlight animate ["switchyellow",1];
  84. _trafficlight animate ["switchgreen",0];
  85.  
  86. sleep 20;
  87.  
  88. _trafficlight animate ["switchgreen",1];
  89. _trafficlight animate ["switchyellow",0];
  90.  
  91. sleep 6;
  92. };
  93. };
  94.  
  95. };
  96.  
  97. private ["_position","_objectsA","_objectsB","_2a1","_2a2"];
  98.  
  99. _position = [8572,6707,0];
  100.  
  101.  
  102. _objectsA = nearestObjects [_position, ["Land_E76_trafficlight01a","Land_E76_trafficlight03a"], 1000];
  103. _objectsB = nearestObjects [_position, ["Land_E76_trafficlight01b","Land_E76_trafficlight02a"], 1000];
  104.  
  105. _positionLD = [3598,7622,0];
  106.  
  107.  
  108. _objectsC = nearestObjects [_positionLD, ["Land_E76_trafficlight01a","Land_E76_trafficlight03a"], 800];
  109. _objectsD = nearestObjects [_positionLD, ["Land_E76_trafficlight01b","Land_E76_trafficlight02a"], 800];
  110.  
  111.  
  112. _positionMC = [7222,2788,0];
  113.  
  114.  
  115. _objectsE = nearestObjects [_positionMC, ["Land_E76_trafficlight01a","Land_E76_trafficlight03a"], 800];
  116. _objectsF = nearestObjects [_positionMC, ["Land_E76_trafficlight01b","Land_E76_trafficlight02a"], 800];
  117.  
  118. {
  119. [_x] spawn A3L_Fnc_TraflightA;
  120. } foreach _objectsA;
  121.  
  122. {
  123. [_x] spawn A3L_Fnc_TraflightB;
  124. } foreach _objectsB;
  125.  
  126. {
  127. [_x] spawn A3L_Fnc_TraflightA;
  128. } foreach _objectsC;
  129.  
  130. {
  131. [_x] spawn A3L_Fnc_TraflightB;
  132. } foreach _objectsD;
  133.  
  134. {
  135. [_x] spawn A3L_Fnc_TraflightA;
  136. } foreach _objectsE;
  137.  
  138. {
  139. [_x] spawn A3L_Fnc_TraflightB;
  140. } foreach _objectsF;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement