Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(!isServer) exitWith {};
- private["_on","_range","_logic","_zones","_oldFlag","_newFlag","_z","_syncedZoneModule","_o"];
- _on = [_this,0,true,[true]] call BIS_fnc_param;
- _range = [_this,1,"",[""]] call BIS_fnc_param;
- _logic = [_this,2,objNull,[objNull]] call BIS_fnc_param;
- _zones = synchronizedObjects _logic;
- if (_on) then {
- _oldFlag = (getMarkerPos _range) nearestObject "FlagCarrier";
- deleteVehicle _oldFlag;
- sleep 0.25;
- _newFlag = "Flag_Red_F" createVehicle (getMarkerPos _range);
- for [{_z=0}, {(_z < count _zones)}, {_z = _z + 1}] do {
- _syncedZoneModule = _zones select _z;
- [_syncedZoneModule] spawn {
- _syncedZoneModule = _this select 0;
- ([_syncedZoneModule,armaedit_zones] call armaedit_fnc_getDetails) set [3, 0];
- };
- };
- };
- if (!_on) then {
- _oldFlag = (getMarkerPos _range) nearestObject "FlagCarrier";
- deleteVehicle _oldFlag;
- sleep 0.25;
- _newFlag = "Flag_Green_F" createVehicle (getMarkerPos _range);
- for [{_o=0}, {(_o < count _zones)}, {_o = _o + 1}] do {
- _syncedZoneModule = _zones select _o;
- [_syncedZoneModule] spawn {
- _syncedZoneModule = _this select 0;
- ([_syncedZoneModule,armaedit_zones] call armaedit_fnc_getDetails) set [3, 1];
- };
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement