Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A3L_Fnc_TraflightA = {
- IF(isServer) THEN {
- private ["_trafficlight"];
- _trafficlight = _this select 0;
- if (!(typeOf _trafficlight IN ["Land_E76_trafficlight01a","Land_E76_trafficlight03a"])) exitwith {};
- sleep 3;
- WHILE{true} DO {
- _trafficlight animate ["switchyellow",0];
- sleep 6;
- _trafficlight animate ["switchred",1];
- _trafficlight animate ["switchyellow",1];
- _trafficlight animate ["switchgreen",0];
- sleep 20;
- _trafficlight animate ["switchgreen",1];
- _trafficlight animate ["switchyellow",0];
- sleep 6;
- _trafficlight animate ["switchyellow",1];
- _trafficlight animate ["switchred",0];
- sleep 32;
- };
- };
- };
- A3L_Fnc_TraflightB = {
- IF(isServer) THEN {
- private ["_trafficlight"];
- _position2 = [8572,6707,0];
- _trafficlight = _this select 0;
- if (!(typeOf _trafficlight IN ["Land_E76_trafficlight01b","Land_E76_trafficlight02a"])) exitwith {};
- _sleep = 3;
- if (
- (_trafficlight == _position2 nearestObject 153)
- OR (_trafficlight == _position2 nearestObject 155)
- OR (_trafficlight == _position2 nearestObject 150)
- OR (_trafficlight == _position2 nearestObject 180)
- OR (_trafficlight == _position2 nearestObject 175)
- OR (_trafficlight == _position2 nearestObject 184)
- //NEUE
- OR (_trafficlight == _position2 nearestObject 350)
- OR (_trafficlight == _position2 nearestObject 345)
- OR (_trafficlight == _position2 nearestObject 373)
- /*
- OR (_trafficlight == _position2 nearestObject 1006828)
- OR (_trafficlight == _position2 nearestObject 1006830)
- OR (_trafficlight == _position2 nearestObject 1007376)
- OR (_trafficlight == _position2 nearestObject 1007481)
- */
- ) then {
- _sleep = 32;
- };
- sleep _sleep;
- WHILE{true} DO {
- _trafficlight animate ["switchyellow",1];
- _trafficlight animate ["switchred",0];
- sleep 32;
- _trafficlight animate ["switchyellow",0];
- sleep 6;
- _trafficlight animate ["switchred",1];
- _trafficlight animate ["switchyellow",1];
- _trafficlight animate ["switchgreen",0];
- sleep 20;
- _trafficlight animate ["switchgreen",1];
- _trafficlight animate ["switchyellow",0];
- sleep 6;
- };
- };
- };
- private ["_position","_objectsA","_objectsB","_2a1","_2a2"];
- _position = [8572,6707,0];
- _objectsA = nearestObjects [_position, ["Land_E76_trafficlight01a","Land_E76_trafficlight03a"], 1000];
- _objectsB = nearestObjects [_position, ["Land_E76_trafficlight01b","Land_E76_trafficlight02a"], 1000];
- _positionLD = [3598,7622,0];
- _objectsC = nearestObjects [_positionLD, ["Land_E76_trafficlight01a","Land_E76_trafficlight03a"], 800];
- _objectsD = nearestObjects [_positionLD, ["Land_E76_trafficlight01b","Land_E76_trafficlight02a"], 800];
- _positionMC = [7222,2788,0];
- _objectsE = nearestObjects [_positionMC, ["Land_E76_trafficlight01a","Land_E76_trafficlight03a"], 800];
- _objectsF = nearestObjects [_positionMC, ["Land_E76_trafficlight01b","Land_E76_trafficlight02a"], 800];
- {
- [_x] spawn A3L_Fnc_TraflightA;
- } foreach _objectsA;
- {
- [_x] spawn A3L_Fnc_TraflightB;
- } foreach _objectsB;
- {
- [_x] spawn A3L_Fnc_TraflightA;
- } foreach _objectsC;
- {
- [_x] spawn A3L_Fnc_TraflightB;
- } foreach _objectsD;
- {
- [_x] spawn A3L_Fnc_TraflightA;
- } foreach _objectsE;
- {
- [_x] spawn A3L_Fnc_TraflightB;
- } foreach _objectsF;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement