Guest User

Chernarus int

a guest
Apr 3rd, 2015
352
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FFA_CLOSEHOUSE=["Land_HouseV_1I1","Land_HouseV_1I2","Land_HouseV_2L","Land_HouseV_3I3","Land_HouseV_3I1","Land_HouseV_3I4","Land_HouseV_3I2","Land_HouseV_1L1",
  2. "Land_houseV_2T1","Land_houseV_2T2","Land_HouseV_1T","Land_HouseV_2I","Land_HouseV_1I4","Land_HouseV_1I3","Land_HouseV_1L2","Land_HouseV2_03B","Land_HouseV2_03",
  3. "Land_HouseV2_01A","Land_HouseV2_01B","Land_HouseV2_02_Interier","Land_HouseV2_04_interier","Land_HouseV2_05","Land_SS_hangar","Land_A_Office02","Land_A_Hospital",
  4. "Land_Ind_Workshop01_03","Land_Misc_Cargo1B","Land_Misc_Cargo1C","Land_Misc_Cargo1D","Land_Misc_Cargo1A"
  5. ,"Land_Ind_TankBig","Land_Ind_Pec_03b","Land_Ind_Pec_03a","Land_Ind_Pec_02","Land_Misc_PowerStation","Land_Church_02","Land_Church_02a","Land_Church_01","Land_Ind_SawMill","Land_Mil_Barracks","Land_Mil_Barracks_L",
  6. "Land_Mil_House","Land_Mil_Guardhouse","Land_Misc_deerstand"];
  7.  
  8. fnc_bridgeA2 = {
  9.     private ["_start","_obj"];
  10.     _start = createVehicle [_this select 2,_this select 0,[],0,"CAN_COLLIDE"];
  11.     _start setVectorUp [0,0,1];
  12.     _start setDir (_this select 1);
  13.     _start setPosATL (_this select 0);
  14.     for "_i" from 1 to (_this select 3) do {
  15.         _obj = createVehicle [_this select 2,_this select 0,[],0,"CAN_COLLIDE"];
  16.         _obj attachTo [_start, [_i*(_this select 4),_i*(_this select 5),_i*(_this select 6)]];
  17.     };
  18. };
  19. if (isServer) then
  20. {
  21.     _box1=[["Land_HouseV_1I1","Land_HouseV_1I2"],["Land_smd_budova3_open"]];
  22.     _box2=[["Land_HouseV_3I3","Land_HouseV_3I1","Land_HouseV_3I4","Land_HouseV_3I2","Land_HouseV_1L1"],["Land_cihlovej_dum_in","Land_bouda2_vnitrek" ,"Land_hruzdum","Land_smd_cihlovej_dum_mini"]];
  23.     _box3=[["Land_houseV_2T1","Land_houseV_2T2"],["land_mbg_brickhouse_01","land_mbg_brickhouse_03","Land_sara_domek_zluty"]];
  24.     _box4=[["Land_HouseV_1T"],["Land_smd_hospoda_mesto"]];
  25.     _box5=[["Land_HouseV_2I","Land_HouseV_1I4","Land_HouseV_1I3","Land_HouseV_1I4","Land_HouseV_2L","Land_HouseV_1L2"],["Land_dum_mesto2"]];
  26.     _box6=[["Land_HouseV2_03B","Land_HouseV2_01A","Land_HouseV2_01B"],["Land_dum_mesto_in","Land_MBG_GER_PUB_2","Land_MBG_GER_PUB_1","MAP_AFbarabizna"]];
  27.     _box7=[["Land_HouseV2_03"],["Land_MBG_ATC_Base"]];
  28.     _box8=[["Land_HouseV2_02_Interier","Land_HouseV2_04_interier","Land_HouseV2_05"],["Land_MBG_GER_HUS_1","Land_MBG_GER_HUS_2","Land_MBG_GER_HUS_3","Land_MBG_GER_HUS_4"]];
  29.     _box9=[["Land_A_Hospital","Land_A_Office02"/* ,"Land_Ind_Pec_03b" */],["Land_mbg_companybuilding_1"]];
  30.     _box10=[["Land_SS_hangar"],["Land_smd_ss_hangar_withdoor"]];
  31.     _box11=[["Land_Shed_W4"],["MAP_Ind_Workshop01_01"]];
  32.     _box14=[["Land_Ind_Workshop01_03"],["Land_Ind_Workshop01_04"]];
  33.     _box15=[["Land_Misc_Cargo1B","Land_Misc_Cargo1C","Land_Misc_Cargo1D","Land_Misc_Cargo1A"],["Land_Misc_Cargo1Bo","Land_Misc_Cargo1Ao"]];
  34.     _box16=[[ "Land_Ind_Pec_03b","Land_Ind_Pec_02","Land_Ind_Pec_03a"],["Land_mbg_companybuilding_1"]];
  35.     _box17=[["Land_Ind_TankBig"],["dum_zboreny"]];
  36.     _box18=[["Land_Misc_PowerStation"],["Land_MBG_GER_RHUS_2","Land_MBG_GER_RHUS_5"]];
  37.     _box19=[["Land_Church_02","Land_Church_02a","Land_Church_01"],["Land_Church_03"]];
  38.     _box20=[["Land_Ind_SawMill"],["Land_tovarna1"]];
  39.     _box21=[["Land_Mil_Barracks","Land_Mil_Barracks_L"],["Land_Mil_Barracks_i"]];
  40.     _box22=[["Land_Mil_Guardhouse","Land_Misc_deerstand"],["Land_mbg_observation_tower"]];
  41.     _box23=[["Land_Mil_House"],["Land_smd_garaz_bez_tanku"]];
  42.     _FFA_LHOUSEV=[];
  43.     _FFA_HOUSES=[];
  44.  
  45.     if (worldName == "chernarus") then
  46.     {
  47.         _FFA_LHOUSEV=nearestObjects [getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"),["house"],15000];
  48.         for "_i" from 0 to (count _FFA_LHOUSEV)-1 do
  49.         {
  50.             _housev=_FFA_LHOUSEV select _i;
  51.             if ((typeof _housev) in FFA_CLOSEHOUSE) then
  52.             {
  53.                 _FFA_HOUSES set [count _FFA_HOUSES,_housev];
  54.             };
  55.         };
  56.        
  57.         for "_i" from 0 to (count _FFA_HOUSES)-1 do
  58.         {
  59.             _nBuilding =_FFA_HOUSES select _i;
  60.             _dirVector = vectorDir _nBuilding;
  61.             _objVector = vectorUp _nBuilding;
  62.             _pos = ASLtoATL getPosASL _nBuilding;
  63.             call {
  64.                 if ((typeof _nBuilding) =="Land_Ind_Pec_03a") exitwith { _pos set [0,(_pos select 0)-2]; _pos set [1,(_pos select 1)-4];};
  65.                 if ((typeof _nBuilding) =="Land_Ind_Pec_02") exitwith { _pos set [0,(_pos select 0)-7];};
  66.                 if ((typeof _nBuilding) =="Land_Church_02") exitwith { _pos set [0,(_pos select 0)+5];};
  67.                 if ((typeof _nBuilding) =="Land_Church_01") exitwith { _pos set [0,(_pos select 0)+5];   _pos set [1,(_pos select 1)+2]; };
  68.             };
  69.             _pos set [2,0];
  70.             _nBuilding hideObject true;
  71.            
  72.             _type="";
  73.             call{
  74.                 if ((typeof _nBuilding) in (_box1 select 0)) exitwith {_type=(_box1 select 1) select (floor random (count (_box1 select 1)));};
  75.                 if ((typeof _nBuilding) in (_box2 select 0)) exitwith {_type=(_box2 select 1) select (floor random (count (_box2 select 1)));};
  76.                 if ((typeof _nBuilding) in (_box3 select 0)) exitwith {_type=(_box3 select 1) select (floor random (count (_box3 select 1)));};
  77.                 if ((typeof _nBuilding) in (_box4 select 0)) exitwith {_type=(_box4 select 1) select (floor random (count (_box4 select 1)));};
  78.                 if ((typeof _nBuilding) in (_box5 select 0)) exitwith {_type=(_box5 select 1) select (floor random (count (_box5 select 1)));};
  79.                 if ((typeof _nBuilding) in (_box6 select 0)) exitwith {_type=(_box6 select 1) select (floor random (count (_box6 select 1)));};
  80.                 if ((typeof _nBuilding) in (_box7 select 0)) exitwith {_type=(_box7 select 1) select (floor random (count (_box7 select 1)));};
  81.                 if ((typeof _nBuilding) in (_box8 select 0)) exitwith {_type=(_box8 select 1) select (floor random (count (_box8 select 1)));};
  82.                 if ((typeof _nBuilding) in (_box9 select 0)) exitwith {_type=(_box9 select 1) select (floor random (count (_box9 select 1)));};
  83.                 if ((typeof _nBuilding) in (_box10 select 0)) exitwith {_type=(_box10 select 1) select (floor random (count (_box10 select 1)));};
  84.                 if ((typeof _nBuilding) in (_box11 select 0)) exitwith {_type=(_box11 select 1) select (floor random (count (_box11 select 1)));};
  85.                 if ((typeof _nBuilding) in (_box14 select 0)) exitwith {_type=(_box14 select 1) select (floor random (count (_box14 select 1)));};
  86.                 if ((typeof _nBuilding) in (_box15 select 0)) exitwith {_type=(_box15 select 1) select (floor random (count (_box15 select 1)));};
  87.                 if ((typeof _nBuilding) in (_box16 select 0)) exitwith {_type=(_box16 select 1) select (floor random (count (_box16 select 1)));};
  88.                 if ((typeof _nBuilding) in (_box17 select 0)) exitwith {_type=(_box17 select 1) select (floor random (count (_box17 select 1)));};
  89.                 if ((typeof _nBuilding) in (_box18 select 0)) exitwith {_type=(_box18 select 1) select (floor random (count (_box18 select 1)));};
  90.                 if ((typeof _nBuilding) in (_box19 select 0)) exitwith {_type=(_box19 select 1) select (floor random (count (_box19 select 1)));};
  91.                 if ((typeof _nBuilding) in (_box20 select 0)) exitwith {_type=(_box20 select 1) select (floor random (count (_box20 select 1)));};
  92.                 if ((typeof _nBuilding) in (_box21 select 0)) exitwith {_type=(_box21 select 1) select (floor random (count (_box21 select 1)));};
  93.                 if ((typeof _nBuilding) in (_box22 select 0)) exitwith {_type=(_box22 select 1) select (floor random (count (_box22 select 1)));};
  94.                 if ((typeof _nBuilding) in (_box23 select 0)) exitwith {_type=(_box23 select 1) select (floor random (count (_box23 select 1)));};
  95.             };
  96.             _house = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];
  97.             _house setdir (getdir _nBuilding);
  98.             call {
  99.                 if ( (((typeof _house) in (_box9 select 1)) && ((typeof _nBuilding) in (_box9 select 0)))) exitwith {_house setdir ((getdir _nBuilding)+90);};
  100.                 if ((typeof _house) in (_box22 select 1)) exitwith {_house setdir ((getdir _nBuilding)-90);};
  101.             };
  102.         };
  103.         [[13640.5,3862.64,-1], 105,"Land_nav_pier_m_2",17,40,0,0] call fnc_bridgeA2;   
  104.         [[4638.26,2564.16,0.00143909],120,"MAP_runway_main_40",17,0,40,0] call fnc_bridgeA2;
  105.         [[4649.19,2515.24,0.00143909],120,"MAP_runway_poj_draha",16,0,40,0] call fnc_bridgeA2;
  106.         [[11812.4,12838.6,0.00143433],110,"MAP_runway_main_40",18,0,40,0] call fnc_bridgeA2;
  107.         [[11814.2,12799.4,0.00143433],110,"MAP_runway_poj_draha",17,0,40,0] call fnc_bridgeA2;
  108.         //[[12938.8,3690.2,0.00156188],120,"Land_Ind_Expedice_2",16,3.5,30.65,0] call fnc_bridgeA2;
  109.     };
  110. };
  111.  
  112. if(!isServer || local player)then
  113. {
  114.     waitUntil{(player==player)};
  115.     waitUntil{alive player};
  116.     waitUntil{local player};
  117.     if (worldName == "chernarus") then
  118.     {
  119.         _FFA_CHOUSEV=[];
  120.         _FFA_CHOUSEV=nearestObjects [getArray(configFile >> "CfgWorlds" >> worldName >> "centerPosition"),["house"],15000];
  121.         for "_i" from 0 to (count _FFA_CHOUSEV)-1 do
  122.         {
  123.             _housev=_FFA_CHOUSEV select _i;
  124.             if ((typeof _housev) in FFA_CLOSEHOUSE) then
  125.             {
  126.                 _housev hideObject true;
  127.             };
  128.         };
  129.         [[13640.5,3862.64,-1], 105,"Land_nav_pier_m_2",17,40,0,0] call fnc_bridgeA2;   
  130.         [[4638.26,2564.16,0.00143909],120,"MAP_runway_main_40",17,0,40,0] call fnc_bridgeA2;
  131.         [[4649.19,2515.24,0.00143909],120,"MAP_runway_poj_draha",16,0,40,0] call fnc_bridgeA2;
  132.         [[11812.4,12838.6,0.00143433],110,"MAP_runway_main_40",18,0,40,0] call fnc_bridgeA2;
  133.         [[11814.2,12799.4,0.00143433],110,"MAP_runway_poj_draha",17,0,40,0] call fnc_bridgeA2;
  134.     };
  135. };
RAW Paste Data