Advertisement
Guest User

Untitled

a guest
Jul 8th, 2013
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.35 KB | None | 0 0
  1. []execVM "\z\addons\dayz_server\system\s_fps.sqf"; //server monitor FPS (writes each ~181s diag_fps+181s diag_fpsmin*)
  2. #include "\z\addons\dayz_server\compile\server_toggle_debug.hpp"
  3.  
  4. dayz_versionNo = getText(configFile >> "CfgMods" >> "DayZ" >> "version");
  5. dayz_hiveVersionNo = getNumber(configFile >> "CfgMods" >> "DayZ" >> "hiveVersion");
  6. _script = getText(missionConfigFile >> "onPauseScript");
  7.  
  8. if ((count playableUnits == 0) and !isDedicated) then {
  9. isSinglePlayer = true;
  10. };
  11.  
  12. waitUntil{initialized}; //means all the functions are now defined
  13. // ####Copy START
  14. // ### BASE BUILDING 1.2 ### SERVER SIDE BUILD ARRAYS - START
  15. call build_baseBuilding_arrays;
  16. // ### BASE BUILDING 1.2 ### SERVER SIDE BUILD ARRAYS - END
  17. // ####Copy END
  18.  
  19. diag_log "HIVE: Starting";
  20.  
  21. //Set the Time
  22. //Send request
  23. _key = "CHILD:307:";
  24. _result = _key call server_hiveReadWrite;
  25. _outcome = _result select 0;
  26. if(_outcome == "PASS") then {
  27. _date = _result select 1;
  28.  
  29. //date setup
  30. _year = _date select 0;
  31. _month = _date select 1;
  32. _day = _date select 2;
  33. _hour = _date select 3;
  34. _minute = _date select 4;
  35.  
  36. //Force full moon nights
  37. _date = [2012,8,31,_hour,_minute];
  38.  
  39. if(isDedicated) then {
  40. //["dayzSetDate",_date] call broadcastRpcCallAll;
  41. setDate _date;
  42. dayzSetDate = _date;
  43. publicVariable "dayzSetDate";
  44. };
  45. diag_log ("HIVE: Local Time set to " + str(_date));
  46. };
  47.  
  48. //Stream in objects
  49. /* STREAM OBJECTS
  50. //Send the key
  51. _key = format["CHILD:302:%1:",dayZ_instance];
  52. _result = _key call server_hiveReadWrite;
  53.  
  54. diag_log "HIVE: Request sent";
  55.  
  56. //Process result
  57. _status = _result select 0;
  58.  
  59. _myArray = [];
  60. if (_status == "ObjectStreamStart") then {
  61. _val = _result select 1;
  62. //Stream Objects
  63. diag_log ("HIVE: Commence Object Streaming...");
  64. for "_i" from 1 to _val do {
  65. _result = _key call server_hiveReadWrite;
  66.  
  67. _status = _result select 0;
  68. _myArray set [count _myArray,_result];
  69. //diag_log ("HIVE: Loop ");
  70. };
  71. //diag_log ("HIVE: Streamed " + str(_val) + " objects");
  72. };
  73.  
  74. _countr = 0;
  75. {
  76.  
  77. //Parse Array
  78. _countr = _countr + 1;
  79.  
  80. _idKey = _x select 1;
  81. _type = _x select 2;
  82. _ownerID = _x select 3;
  83. _worldspace = _x select 4;
  84. _inventory= _x select 5;
  85. _hitPoints= _x select 6;
  86. _fuel = _x select 7;
  87. _damage = _x select 8;
  88.  
  89. _dir = 0;
  90. _pos = [0,0,0];
  91. _wsDone = false;
  92. if (count _worldspace >= 2) then
  93. {
  94. _dir = _worldspace select 0;
  95. if (count (_worldspace select 1) == 3) then {
  96. _pos = _worldspace select 1;
  97. _wsDone = true;
  98. }
  99. };
  100.  
  101. if (!_wsDone) then {
  102. if (count _worldspace >= 1) then { _dir = _worldspace select 0; };
  103. _objectPos = [_worldspace select 1 select 0,_worldspace select 1 select 1,0];
  104. _pos = [(_objectPos),0,15,1,0,2000,0,[],[_objectPos,[]]] call BIS_fnc_findSafePos;
  105. if (count _pos < 3) then { _pos = [_pos select 0,_pos select 1,0]; };
  106. diag_log ("MOVED OBJ: " + str(_idKey) + " of class " + _type + " to pos: " + str(_pos));
  107. };
  108.  
  109. if (_damage < 1) then {
  110. diag_log format["OBJ: %1 - %2", _idKey,_type];
  111.  
  112. //Create it
  113. _object = createVehicle [_type, _pos, [], 0, "CAN_COLLIDE"];a
  114. _object setVariable ["lastUpdate",time];
  115. _object setVariable ["ObjectID", _idKey, true];
  116. _object setVariable ["CharacterID", _ownerID, true];
  117.  
  118.  
  119.  
  120. //the following is happening on every server restart
  121. _code = _fuel * 1000; //it is necessary cause we get only the converted fuel variable from the database, so we got to calculate back to code format
  122. _object setVariable ["Code", _code,true]; //set Code to the Object
  123. _object setVariable ["Classname", _type,true]; //set Classname to the Object
  124. _object setVariable ["ObjectID", _idKey,true]; //set ObjectID to the Object
  125. _object setVariable ["ObjectUID", _worldspace call dayz_objectUID2, true]; //set ObjectUID to the Object
  126. if ((_object isKindOf "Static") && !(_object isKindOf "TentStorage")) then {
  127. _object setpos [(getposATL _object select 0),(getposATL _object select 1), 0];
  128. };
  129. //Set Variable
  130. if (_object isKindOf "Infostand_2_EP1" && !(_object isKindOf "Infostand_1_EP1")) then {
  131. _object setVariable ["Code", _code, true]; //changed to _code instead of _worldspace call dayz_objectUID2
  132. };
  133.  
  134. // ####Copy START
  135. // ##### BASE BUILDING 1.2 Server Side ##### - START
  136.  
  137.  
  138. // Set whether or not buildable is destructable
  139. if (typeOf(_object) in allbuildables_class) then {
  140. diag_log ("SERVER: in allbuildables_class:" + typeOf(_object) + " !");
  141. for "_i" from 0 to ((count allbuildables) - 1) do
  142. {
  143. _classname = (allbuildables select _i) select _i - _i + 1;
  144. _result = [_classname,typeOf(_object)] call BIS_fnc_areEqual;
  145. if (_result) then {
  146. _requirements = (allbuildables select _i) select _i - _i + 2;
  147.  
  148. _isDestructable = _requirements select 13;
  149. diag_log ("SERVER: " + typeOf(_object) + " _isDestructable = " + str(_isDestructable));
  150. if (!_isDestructable) then {
  151. diag_log("Spawned: " + typeOf(_object) + " Handle Damage False");
  152. _object addEventHandler ["HandleDamage", {false}];
  153. };
  154. };
  155. };
  156. //gateKeypad = _object addaction ["Defuse", "\z\addons\dayz_server\compile\enterCode.sqf"];
  157. };
  158. // ##### BASE BUILDING 1.2 Server Side ##### - END
  159. // This sets objects to appear properly once server restarts
  160. // ###COPY END
  161.  
  162.  
  163. if (count _inventory > 0) then {
  164. //Add weapons
  165. _objWpnTypes = (_inventory select 0) select 0;
  166. _objWpnQty = (_inventory select 0) select 1;
  167. _countr = 0;
  168. {
  169. if (_x == "Crossbow") then { _x = "Crossbow_DZ" }; // Convert Crossbow to Crossbow_DZ
  170. _isOK = isClass(configFile >> "CfgWeapons" >> _x);
  171. if (_isOK) then {
  172. _block = getNumber(configFile >> "CfgWeapons" >> _x >> "stopThis") == 1;
  173. if (!_block) then {
  174. _object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
  175. };
  176. };
  177. _countr = _countr + 1;
  178. } forEach _objWpnTypes;
  179.  
  180. //Add Magazines
  181. _objWpnTypes = (_inventory select 1) select 0;
  182. _objWpnQty = (_inventory select 1) select 1;
  183. _countr = 0;
  184. {
  185. if (_x == "BoltSteel") then { _x = "WoodenArrow" }; // Convert BoltSteel to WoodenArrow
  186. _isOK = isClass(configFile >> "CfgMagazines" >> _x);
  187. if (_isOK) then {
  188. _block = getNumber(configFile >> "CfgMagazines" >> _x >> "stopThis") == 1;
  189. if (!_block) then {
  190. _object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
  191. };
  192. };
  193. _countr = _countr + 1;
  194. } forEach _objWpnTypes;
  195.  
  196. //Add Backpacks
  197. _objWpnTypes = (_inventory select 2) select 0;
  198. _objWpnQty = (_inventory select 2) select 1;
  199. _countr = 0;
  200. {
  201. _isOK = isClass(configFile >> "CfgVehicles" >> _x);
  202. if (_isOK) then {
  203. _block = getNumber(configFile >> "CfgVehicles" >> _x >> "stopThis") == 1;
  204. if (!_block) then {
  205. _object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
  206. };
  207. };
  208. _countr = _countr + 1;
  209. } forEach _objWpnTypes;
  210. };
  211.  
  212. if (_object isKindOf "AllVehicles") and (typeOf(_object) in allbuildables_class) then {
  213. {
  214. _selection = _x select 0;
  215. _dam = _x select 1;
  216. if (_selection in dayZ_explosiveParts and _dam > 0.8) then {_dam = 0.8};
  217. [_object,_selection,_dam] call fnc_veh_handleRepair;
  218. } forEach _hitpoints;
  219. _object setvelocity [0,0,1];
  220. _object setFuel _fuel;
  221. _object call fnc_veh_ResetEH;
  222.  
  223. //Updated object position if moved
  224. if (!_wsDone) then {
  225. [_object, "position"] call server_updateObject;
  226. };
  227. };
  228.  
  229. //Monitor the object
  230. //_object enableSimulation false;
  231. dayz_serverObjectMonitor set [count dayz_serverObjectMonitor,_object];
  232. };
  233. } forEach _myArray;
  234.  
  235. // # END OF STREAMING #
  236. */
  237. waituntil{isNil "sm_done"}; // prevent server_monitor be called twice (bug during login of the first player)
  238.  
  239. #include "\z\addons\dayz_server\compile\fa_hiveMaintenance.hpp"
  240.  
  241. if (isServer and isNil "sm_done") then {
  242. private["_i","_hiveResponse","_key","_objectArray","_objectCount"];
  243.  
  244. for "_i" from 1 to 5 do {
  245. diag_log "HIVE: trying to get objects";
  246. _key = format["CHILD:302:%1:", dayZ_instance];
  247. _hiveResponse = _key call server_hiveReadWrite;
  248. if ((((isnil "_hiveResponse") || {(typeName _hiveResponse != "ARRAY")}) || {((typeName (_hiveResponse select 1)) != "SCALAR")}) || {(_hiveResponse select 1 > 2000)}) then {
  249. diag_log ("HIVE: connection problem... HiveExt response:"+str(_hiveResponse));
  250. _hiveResponse = ["",0];
  251. }
  252. else {
  253. diag_log ("HIVE: found "+str(_hiveResponse select 1)+" objects" );
  254. _i = 99; // break
  255. };
  256. };
  257.  
  258. _objectArray = [];
  259. if ((_hiveResponse select 0) == "ObjectStreamStart") then {
  260. _objectCount = _hiveResponse select 1;
  261. diag_log ("HIVE: Commence Object Streaming...");
  262. for "_i" from 1 to _objectCount do {
  263. _hiveResponse = _key call server_hiveReadWrite;
  264. _objectArray set [_i - 1, _hiveResponse];
  265. //diag_log (format["HIVE dbg %1 %2", typeName _hiveResponse, _hiveResponse]);
  266. };
  267. diag_log ("HIVE: got " + str(count _objectArray) + " objects");
  268. #ifdef EMPTY_TENTS_CHECK
  269. // check empty tents, remove some of them
  270. [_objectArray, EMPTY_TENTS_GLOBAL_LIMIT, EMPTY_TENTS_USER_LIMIT] call fa_removeExtraTents;
  271. #endif
  272. // check vehicles count
  273. [_objectArray] call fa_checkVehicles;
  274. };
  275.  
  276. {
  277. private["_action","_ObjectID","_class","_CharacterID","_worldspace","_inventory", "_hitpoints","_fuel","_damage","_entity","_dir","_point","_res", "_rawData","_class","_worldspace","_uid", "_selection", "_dam", "_booleans", "_point", "_wantExplosiveParts"];
  278.  
  279. _action = _x select 0; // values : "OBJ"=object got from hive "CREATED"=vehicle just created ...
  280. _ObjectID = _x select 1;
  281. _class = if ((typeName (_x select 2)) == "STRING") then { _x select 2 } else { "Old_bike_TK_CIV_EP1" };
  282. _CharacterID = _x select 3;
  283. _worldspace = if ((typeName (_x select 4)) == "ARRAY") then { _x select 4 } else { [] };
  284. _inventory= if ((typeName (_x select 5)) == "ARRAY") then { _x select 5 } else { [] };
  285. _hitpoints= if ((typeName (_x select 6)) == "ARRAY") then { _x select 6 } else { [] };
  286. _fuel = if ((typeName (_x select 7)) == "SCALAR") then { _x select 7 } else { 0 };
  287. _damage = if ((typeName (_x select 8)) == "SCALAR") then { _x select 8 } else { 0.9 };
  288. _entity = nil;
  289.  
  290. _dir = floor(random(360));
  291. _point = getMarkerpos "respawn_west";
  292. if (count _worldspace >= 1 && {(typeName (_worldspace select 0)) == "SCALAR"}) then {
  293. _dir = _worldspace select 0;
  294. };
  295. if (count _worldspace == 2 && {(typeName (_worldspace select 1)) == "ARRAY"}) then {
  296. _i = _worldspace select 1;
  297. if (count _i == 3 &&
  298. {(typeName (_i select 0)) == "SCALAR"} &&
  299. {(typeName (_i select 1)) == "SCALAR"} &&
  300. {(typeName (_i select 2)) == "SCALAR"}) then {
  301. _point = _i;
  302. };
  303. };
  304.  
  305. // if legit vehicle
  306. if ((_class isKindOf "AllVehicles") && ((_CharacterID == "0") OR (_CharacterID == "1")) && (_damage < 1)) then {
  307. //_damage=0.86;//_action="CREATED";
  308. _point set [2, 0]; // here _point is in ATL format
  309. #ifdef VEH_MAINTENANCE_ROTTEN_AT_STARTUP
  310. // rotten randomly the vehicle. Successive damages will lead to a respawn.
  311. if ((random(VEH_MAINTENANCE_ROTTEN_AT_STARTUP) < 1) AND {(_action == "OBJ")}) then {
  312. _damage = VEH_MAINTENANCE_ROTTEN_LOGIC; _action = "DAMAGED";
  313. };
  314. #endif
  315. #ifdef VEH_MAINTENANCE_ADD_MISSING
  316.  
  317. // ask to create a new vehicle if damage is too high
  318. if (_damage > 0.85 AND (_action != "CREATED")) then { _action = "SPAWNED"; };
  319. #endif
  320. // check for no collision with world. Find a suitable place (depending of defined parameters)
  321. _worldspace = [_class, _dir, _point, _action] call fa_smartlocation;
  322. if (count _worldspace < 2) then { // safe position NOT found
  323. _action = "FAILED"; // don't worry, maybe we will find a nice spot next time :)
  324. }
  325. else { // found a spot for respawn
  326. if ((([_worldspace select 1, _point] call BIS_fnc_distance2D) > 1)
  327. AND (_action == "OBJ")) then { _action = "MOVED"; };
  328. _dir = _worldspace select 0;
  329. _point = _worldspace select 1;
  330. _entity = createVehicle [_class, _point, [], 0,
  331. if ((_class isKindOf "Air") OR {(_action != "OBJ")}) then {"NONE"} else {"CAN_COLLIDE"}
  332. ];
  333. _entity setVariable ["ObjectID", _ObjectID, true]; // this variable must be set very early
  334. _entity setVariable ["CharacterID", _CharacterID, true];
  335. _entity setVariable ["lastUpdate",time]; // prevent immediate hive write when vehicle parts are set up
  336. // setPos will be done again just after setDir, see below....
  337. #ifdef VEH_MAINTENANCE_ADD_MISSING
  338. if (_damage > 0.85) then {
  339. _fuel = VEH_MAINTENANCE_SPAWN_FUEL_LOGIC;
  340. _hitpoints = [];
  341. _damage = _hitpoints call fa_setDamagedParts;
  342.  
  343. _inventory = []; // TODO: rewrite this inventory setup.
  344. //diag_log (format["VEH MAINTENANCE Creating vehicle Inventory:%1 and Damaged parts:%2", _inventory, _hitpoints]);
  345. };
  346. #endif
  347. _entity setDamage _damage;
  348. {
  349. _wantExplosiveParts = _x;
  350. {
  351. _selection = _x select 0;
  352. _dam = _x select 1;
  353. if (_selection in dayZ_explosiveParts) then {
  354. if (_wantExplosiveParts) then {
  355. if (_dam > 0.8) then { _dam = 0.8; };
  356. [_entity, _selection, _dam] call fnc_veh_handleDam;
  357. };
  358. }
  359. else {
  360. if (!_wantExplosiveParts) then {
  361. [_entity, _selection, _dam] call fnc_veh_handleDam;
  362. };
  363. };
  364. } forEach _hitpoints;
  365. } forEach [false, true]; // we set non explosive part first, then explosive parts
  366. _entity setvelocity [0,0,1];
  367. _entity setFuel _fuel;
  368. _entity call fnc_veh_ResetEH;
  369. };
  370. #ifdef OBJECT_DEBUG
  371. diag_log (format["VEHICLE %1 %2 at %3, original damage=%4, effective damage=%6, fuel=%5",
  372. _action, _entity call fa_veh2str, (getPosASL _entity) call fa_coor2str, _damage, _fuel, damage _entity]); // , hitpoints:%6, inventory=%7" , _hitpoints, _inventory
  373. #endif
  374. }
  375. else { // else for object or non legit vehicle
  376. if (!(_class in SafeObjects )) then {
  377. _damage = 1;
  378. };
  379. if (_damage < 1) then {
  380. // Rule #1: Tents will be always spawned if non empty.
  381. // Rule #2: Objects are not spawned if inside/close to building.
  382. // Rule #3: Rule #1 is higher priority
  383. _booleans=[];
  384. _worldspace = [_class, _point, _booleans] call fn_niceSpot;
  385. if (_booleans select 3) then { // is in building
  386. if ((_class != "TentStorage") OR {(_inventory call fa_tentEmpty)}) then {
  387. _action = "FAILED";
  388. _damage = 5;
  389. #ifdef OBJECT_DEBUG
  390. diag_log(format["Won't spawn object #%1(%4) in/close to a building, _point:%3, inventory: %5 booleans:%2",_ObjectID, _booleans, _point, _class, _inventory]);
  391. #endif
  392. };
  393. };
  394. };
  395. if (_damage < 1) then { // create object
  396. #ifdef OBJECTS_FIX_OUTOFMAP
  397. _worldspace = [_dir, _point] call fa_staywithus;
  398. _dir = _worldspace select 0;
  399. _point = _worldspace select 1;
  400. #endif
  401. // for tents: non colliding position
  402. _entity = createVehicle [_class, _point, [], 0,
  403. if (_class=="TentStorage") then {"NONE"} else {"CAN_COLLIDE"}
  404. ];
  405. _entity setVariable ["ObjectUID", _ObjectID, true];
  406. _entity setVariable ["CharacterID", _CharacterID, true];
  407. _entity setVariable ["lastUpdate",time];
  408. _entity setDamage _damage;
  409.  
  410. if (_class == "TentStorage") then {
  411. _entity addMPEventHandler ["MPKilled",{_this call vehicle_handleServerKilled;}];
  412. };
  413. //diag_log ("DW_DEBUG " + _class + " #" + str(_ObjectID) + " pos=" + (_point call fa_coor2str) + ", damage=" + str(_damage) );
  414. }
  415. else { // delete object -- this has been comented out: object are never really deleted from hive
  416. /* _key = format["CHILD:306:%1:%2:%3:", _ObjectID, [], 1];
  417. _rawData = "HiveEXT" callExtension _key;
  418. _key = format["CHILD:304:%1:",_ObjectID]; // delete by ID (not UID which is handler 310)
  419. _rawData = "HiveEXT" callExtension _key;*/
  420. #ifdef OBJECT_DEBUG
  421. diag_log (format["IGNORED %1 oid#%2 cid:%3 ",
  422. _class, _ObjectID, _CharacterID ]);
  423. #endif
  424. };
  425. };
  426. //diag_log(format["VEH MAINTENANCE DEBUG %1 %2", __FILE__, __LINE__]);
  427.  
  428. // common code (vehicle or not)
  429. if (_damage < 1 AND !(isNil ("_entity"))) then {
  430. _entity setdir _dir;
  431. _entity setPos _point;
  432. [_entity, _inventory] call fa_populateCargo;
  433.  
  434. dayz_serverObjectMonitor set [count dayz_serverObjectMonitor, _entity];
  435.  
  436. // UPDATE MODIFIED OBJECTS TO THE HIVE
  437. if (_action == "CREATED") then {
  438. // insert className damage characterId worldSpace inventory hitPoints fuel uniqueId
  439. _key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:", dayZ_instance,
  440. _class, _damage , 1,
  441. [_dir, _point],
  442. [getWeaponCargo _entity, getMagazineCargo _entity ,getBackpackCargo _entity],
  443. _hitpoints, _fuel, _ObjectID
  444. ];
  445. //diag_log (_key);
  446. _rawData = "HiveEXT" callExtension _key;
  447. };
  448. if (_action == "SPAWNED" || _action == "DAMAGED") then {
  449. // update hitpoint,damage -- already done by needupdate
  450. /*_key = format["CHILD:306:%1:%2:%3:", _ObjectID, _hitpoints, _damage];
  451. _rawData = "HiveEXT" callExtension _key;*/
  452. };
  453. if (_action == "SPAWNED") then {
  454. // update inventory
  455. _key = format["CHILD:309:%1:%2:", _ObjectID,
  456. [getWeaponCargo _entity, getMagazineCargo _entity, getBackpackCargo _entity]];
  457. _rawData = "HiveEXT" callExtension _key;
  458. };
  459. if (_action == "MOVED" || _action == "SPAWNED") then {
  460. // update position,fuel in Hive
  461. // already done by server_updateObject?
  462. /*_key = format["CHILD:305:%1:%2:%3:", _ObjectID, [_dir, _point], _fuel];
  463. _rawData = "HiveEXT" callExtension _key;*/
  464. //Updated object position if moved
  465. [_entity, "position"] call server_updateObject;
  466. };
  467. };
  468. // not damaged
  469. sleep 0.01; // yield to connecting players.
  470. } forEach _objectArray;
  471.  
  472. createCenter civilian;
  473. if (isDedicated) then {
  474. endLoadingScreen;
  475. };
  476.  
  477. if (isDedicated) then {
  478. _id = [] execFSM "\z\addons\dayz_server\system\server_cleanup.fsm";
  479. };
  480.  
  481. allowConnection = true;
  482.  
  483. // [_guaranteedLoot, _randomizedLoot, spawnOnStart, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire]
  484. // [_guaranteedLoot, _randomizedLoot, _frequency, _variance, _spawnChance, _spawnMarker, _spawnRadius, _spawnFire, _fadeFire, _useStatic, _preWaypoint, _crashDamage]
  485. [
  486. 5, //Number of the guaranteed Loot-Piles at the Crashside
  487. 4, //Number of the random Loot-Piles at the Crashside 3+(1,2,3 or 4)
  488. 2000, //Fixed-Time (in seconds) between each start of a new Chopper
  489. 660, //Random time (in seconds) added between each start of a new Chopper
  490. 1, //Spawnchance of the Heli (1 will spawn all possible Choppers, 0.5 only 50% of them)
  491. 'center', //Center-Marker for the Random-Crashpoints, for Chernarus this is a point near Stary
  492. 4000, //Radius in Meters from the Center-Marker in which the Choppers can crash and get waypoints
  493. true, //Should the spawned crashsite burn (at night) & have smoke?
  494. false, //Should the flames & smoke fade after a while?
  495. false, //Use the Static-Crashpoint-Function? If true, you have to add Coordinates into server_spawnCrashSite.sqf
  496. 1, //Amount of Random-Waypoints the Heli gets before he flys to his Point-Of-Crash (using Static-Crashpoint-Coordinates if its enabled)
  497. 0.0005 //Amount of Damage the Heli has to get while in-air to explode before the POC. (0.0001 = Insta-Explode when any damage//bullethit, 1 = Only Explode when completly damaged)
  498. ] spawn server_spawnCrashSite;
  499.  
  500. //Spawn camps
  501. // quantity, marker, radius, min distance between 2 camps
  502. Server_InfectedCamps = [3, "center", 4500, 2000] call fn_bases;
  503. dayzInfectedCamps = Server_InfectedCamps;
  504. publicVariable "dayzInfectedCamps";
  505.  
  506. // antiwallhack
  507. call compile preprocessFileLineNumbers "\z\addons\dayz_server\compile\fa_antiwallhack.sqf";
  508.  
  509. sm_done = true;
  510. publicVariable "sm_done";
  511. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement