Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (isServer) then {
- waitUntil { sleep 10; a3a_var_started };
- all_flags = [flag_rus_1, flag_rus_2, flag_rus_3, flag_rus_4_hq, flag_us_1, flag_us_2, flag_us_3, flag_us_4_hq, flag_neut_1, flag_neut_2, flag_neut_3, flag_neut_4];
- neutral_flags = [flag_neut_1, flag_neut_2, flag_neut_3, flag_neut_4]; // флаги, а не ЗОНА
- russian_flags = [flag_rus_1, flag_rus_2, flag_rus_3, flag_rus_4_hq];
- us_flags = [flag_us_1, flag_us_2, flag_us_3, flag_us_4_hq];
- missionTime = 105*60;
- srv_gameStart = diag_tickTime;
- //присвоение флагам значения цивилиан, вест и еаст
- {_x setVariable ["controledBy", civilian, true];} forEach neutral_flags;
- {_x setVariable ["controledBy", west, true];} forEach us_flags;
- {_x setVariable ["controledBy", east, true];} forEach russian_flags;
- while {isNil "srv_triggerFinished"} do {
- sleep 10;
- if ((flag_rus_4_hq getvariable 'controledBy' == west) && (flag_neut_1 getvariable 'controledBy' == west) && (flag_neut_3 getvariable 'controledBy' == west) && (flag_neut_4 getvariable 'controledBy' == west)) then
- {
- srv_triggerFinished = true;
- ["Нейтральная полоса и штаб заняты синими!", west] call a3a_fnc_endMission;
- };
- if ((flag_us_4_hq getvariable 'controledBy' == east) && (flag_us_1 getvariable 'controledBy' == east) && (flag_us_2 getvariable 'controledBy' == east) && (flag_us_3 getvariable 'controledBy' == east)) then
- {
- srv_triggerFinished = true;
- ["Нейтральная полоса и штаб заняты синими!", west] call a3a_fnc_endMission;
- };
- if (((diag_tickTime - srv_gameStart) > missionTime)) then {
- if (_countEast == _countWest) then {
- srv_triggerFinished = true;
- ["Ничья!", resistance] call a3a_fnc_endMission;
- };
- if (_countEast >= _countWest) then {
- srv_triggerFinished = true;
- ["Победа ВДВ РФ", east] call a3a_fnc_endMission;
- };
- if (_countEast =< _countWest) then {
- srv_triggerFinished = true;
- ["Победа КМП США", west] call a3a_fnc_endMission;
- };
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement