Advertisement
Guest User

Untitled

a guest
Jan 20th, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.01 KB | None | 0 0
  1. /*
  2. DayZ Base Building
  3. Made for DayZ Epoch please ask permission to use/edit/distrubute email vbawol@veteranbastards.com.
  4. */
  5. private ["_helperColor","_objectHelper","_objectHelperDir","_objectHelperPos","_canDo", "_pos", "_cnt",
  6. "_location","_dir","_classname","_item","_hasrequireditem","_missing","_hastoolweapon","_cancel","_reason","_started","_finished","_animState","_isMedic","_dis","_sfx","_hasbuilditem","_tmpbuilt","_onLadder","_isWater","_require","_text","_offset","_IsNearPlot","_isOk","_location1","_location2","_counter","_limit","_proceed","_num_removed","_position","_object","_canBuildOnPlot","_friendlies","_nearestPole","_ownerID","_findNearestPoles","_findNearestPole","_distance","_classnametmp","_ghost","_isPole","_needText","_lockable","_zheightchanged","_rotate","_combination_1","_combination_2","_combination_3","_combination_4","_combination","_combination_1_Display","_combinationDisplay","_zheightdirection","_abort","_isNear","_need","_needNear","_vehicle","_inVehicle","_requireplot","_objHDiff","_isLandFireDZ","_isTankTrap"];
  7.  
  8. if(DZE_ActionInProgress) exitWith { cutText [(localize "str_epoch_player_40") , "PLAIN DOWN"]; };
  9. DZE_ActionInProgress = true;
  10.  
  11. //snap vars -- temporary fix for errors so variables.sqf can be skipped
  12. if (isNil "snapProVariables") then {
  13. if (isNil "DZE_snapExtraRange") then {
  14. DZE_snapExtraRange = 0;
  15. };
  16. if (isNil "DZE_checkNearbyRadius") then {
  17. DZE_checkNearbyRadius = 30;
  18. };
  19. s_player_toggleSnap = -1;
  20. s_player_toggleSnapSelect = -1;
  21. s_player_toggleSnapSelectPoint=[];
  22. snapActions = -1;
  23. snapGizmos = [];
  24. snapGizmosNearby = [];
  25. snapProVariables = true; // will skip this statement from now on.
  26. };
  27. // snap vars
  28.  
  29. // disallow building if too many objects are found within (30m by default) add DZE_checkNearbyRadius = 30; to your init.sqf to change
  30. _pos = [player] call FNC_GetPos;
  31. _cnt = count (_pos nearObjects ["All",DZE_checkNearbyRadius]);
  32. if (_cnt >= DZE_BuildingLimit) exitWith { //end script if too many objects nearby
  33. DZE_ActionInProgress = false;
  34. cutText [(localize "str_epoch_player_41"), "PLAIN DOWN"];
  35. };
  36.  
  37. _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
  38. _isWater = dayz_isSwimming;
  39. _cancel = false;
  40. _reason = "";
  41. _canBuildOnPlot = false;
  42.  
  43. _vehicle = vehicle player;
  44. _inVehicle = (_vehicle != player);
  45.  
  46. helperDetach = false;
  47. _canDo = (!r_drag_sqf and !r_player_unconscious);
  48.  
  49. DZE_Q = false;
  50. DZE_Z = false;
  51.  
  52. DZE_Q_alt = false;
  53. DZE_Z_alt = false;
  54.  
  55. DZE_Q_ctrl = false;
  56. DZE_Z_ctrl = false;
  57.  
  58. DZE_5 = false;
  59. DZE_4 = false;
  60. DZE_6 = false;
  61. DZE_F = false;
  62.  
  63. DZE_cancelBuilding = false;
  64.  
  65. call gear_ui_init;
  66. closeDialog 1;
  67.  
  68. if (_isWater) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_26", "PLAIN DOWN"];};
  69. if (_inVehicle) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_42"), "PLAIN DOWN"];};
  70. if (_onLadder) exitWith {DZE_ActionInProgress = false; cutText [localize "str_player_21", "PLAIN DOWN"];};
  71. if (player getVariable["combattimeout", 0] >= time) exitWith {DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_43"), "PLAIN DOWN"];};
  72.  
  73. _item = _this;
  74.  
  75. // Need Near Requirements
  76. _abort = false;
  77. _reason = "";
  78.  
  79. _needNear = getArray (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "neednearby");
  80.  
  81. {
  82. switch(_x) do{
  83. case "fire":
  84. {
  85. _distance = 3;
  86. _isNear = {inflamed _x} count (_pos nearObjects _distance);
  87. if(_isNear == 0) then {
  88. _abort = true;
  89. _reason = "fire";
  90. };
  91. };
  92. case "workshop":
  93. {
  94. _distance = 3;
  95. _isNear = count (nearestObjects [_pos, ["Wooden_shed_DZ","WoodShack_DZ","WorkBench_DZ"], _distance]);
  96. if(_isNear == 0) then {
  97. _abort = true;
  98. _reason = "workshop";
  99. };
  100. };
  101. case "fueltank":
  102. {
  103. _distance = 30;
  104. _isNear = count (nearestObjects [_pos, dayz_fuelsources, _distance]);
  105. if(_isNear == 0) then {
  106. _abort = true;
  107. _reason = "fuel tank";
  108. };
  109. };
  110. };
  111. } forEach _needNear;
  112.  
  113.  
  114. if(_abort) exitWith {
  115. cutText [format[(localize "str_epoch_player_135"),_reason,_distance], "PLAIN DOWN"];
  116. DZE_ActionInProgress = false;
  117. };
  118.  
  119. _classname = getText (configFile >> "CfgMagazines" >> _item >> "ItemActions" >> "Build" >> "create");
  120. _classnametmp = _classname;
  121. _require = getArray (configFile >> "cfgMagazines" >> _this >> "ItemActions" >> "Build" >> "require");
  122. _text = getText (configFile >> "CfgVehicles" >> _classname >> "displayName");
  123. _ghost = getText (configFile >> "CfgVehicles" >> _classname >> "ghostpreview");
  124.  
  125. _lockable = 0;
  126. if(isNumber (configFile >> "CfgVehicles" >> _classname >> "lockable")) then {
  127. _lockable = getNumber(configFile >> "CfgVehicles" >> _classname >> "lockable");
  128. };
  129.  
  130. _requireplot = DZE_requireplot;
  131. if(isNumber (configFile >> "CfgVehicles" >> _classname >> "requireplot")) then {
  132. _requireplot = getNumber(configFile >> "CfgVehicles" >> _classname >> "requireplot");
  133. };
  134.  
  135. _isAllowedUnderGround = 1;
  136. if(isNumber (configFile >> "CfgVehicles" >> _classname >> "nounderground")) then {
  137. _isAllowedUnderGround = getNumber(configFile >> "CfgVehicles" >> _classname >> "nounderground");
  138. };
  139.  
  140. _offset = getArray (configFile >> "CfgVehicles" >> _classname >> "offset");
  141. if((count _offset) <= 0) then {
  142. _offset = [0,1.5,0];
  143. };
  144.  
  145. _isPole = (_classname == "Plastic_Pole_EP1_DZ");
  146. _isLandFireDZ = (_classname == "Land_Fire_DZ");
  147.  
  148. _distance = DZE_PlotPole select 0;
  149. _needText = localize "str_epoch_player_246";
  150.  
  151. if(_isPole) then {
  152. _distance = DZE_PlotPole select 1;
  153. };
  154.  
  155. // check for near plot
  156. _findNearestPoles = nearestObjects [(vehicle player), ["Plastic_Pole_EP1_DZ"], _distance];
  157. _findNearestPole = [];
  158.  
  159. {
  160. if (alive _x) then {
  161. _findNearestPole set [(count _findNearestPole),_x];
  162. };
  163. } count _findNearestPoles;
  164.  
  165. _IsNearPlot = count (_findNearestPole);
  166.  
  167. // If item is plot pole && another one exists within 45m
  168. if(_isPole && _IsNearPlot > 0) exitWith { DZE_ActionInProgress = false; cutText [(localize "str_epoch_player_44") , "PLAIN DOWN"]; };
  169.  
  170. if(_IsNearPlot == 0) then {
  171.  
  172. // Allow building of plot
  173. if(_requireplot == 0 || _isLandFireDZ) then {
  174. _canBuildOnPlot = true;
  175. };
  176.  
  177. } else {
  178. // Since there are plots nearby we check for ownership && then for friend status
  179.  
  180. // check nearby plots ownership && then for friend status
  181. _nearestPole = _findNearestPole select 0;
  182.  
  183. // Find owner
  184. _ownerID = _nearestPole getVariable ["CharacterID","0"];
  185.  
  186. // diag_log format["DEBUG BUILDING: %1 = %2", dayz_characterID, _ownerID];
  187.  
  188. // check if friendly to owner
  189. if(dayz_characterID == _ownerID) then { //Keep ownership
  190. // owner can build anything within his plot except other plots
  191. if(!_isPole) then {
  192. _canBuildOnPlot = true;
  193. };
  194.  
  195. } else {
  196. // disallow building plot
  197. if(!_isPole) then {
  198. _friendlies = player getVariable ["friendlyTo",[]];
  199. // check if friendly to owner
  200. if(_ownerID in _friendlies) then {
  201. _canBuildOnPlot = true;
  202. };
  203. };
  204. };
  205. };
  206.  
  207. // _message
  208. if(!_canBuildOnPlot) exitWith { DZE_ActionInProgress = false; cutText [format[(localize "STR_EPOCH_PLAYER_135"),_needText,_distance] , "PLAIN DOWN"]; };
  209.  
  210. _missing = "";
  211. _hasrequireditem = true;
  212. {
  213. _hastoolweapon = _x in weapons player;
  214. if(!_hastoolweapon) exitWith { _hasrequireditem = false; _missing = getText (configFile >> "cfgWeapons" >> _x >> "displayName"); };
  215. } count _require;
  216.  
  217. _hasbuilditem = _this in magazines player;
  218. if (!_hasbuilditem) exitWith {DZE_ActionInProgress = false; cutText [format[(localize "str_player_31"),_text,"build"] , "PLAIN DOWN"]; };
  219.  
  220. if (!_hasrequireditem) exitWith {DZE_ActionInProgress = false; cutText [format[(localize "str_epoch_player_137"),_missing] , "PLAIN DOWN"]; };
  221. if (_hasrequireditem) then {
  222.  
  223. _location = [0,0,0];
  224. _isOk = true;
  225.  
  226. // get inital players position
  227. _location1 = [player] call FNC_GetPos;
  228. _dir = getDir player;
  229.  
  230. // if ghost preview available use that instead
  231. if (_ghost != "") then {
  232. _classname = _ghost;
  233. };
  234.  
  235. _object = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
  236. //Build gizmo
  237. _objectHelper = "Sign_sphere10cm_EP1" createVehicle _location;
  238. _helperColor = "#(argb,8,8,3)color(0,0,0,0,ca)";
  239. _objectHelper setobjecttexture [0,_helperColor];
  240. _objectHelper attachTo [player,_offset];
  241. _object attachTo [_objectHelper,[0,0,0]];
  242. _position = [_objectHelper] call FNC_GetPos;
  243.  
  244. _objHDiff = 0;
  245.  
  246. if (isClass (missionConfigFile >> "SnapBuilding" >> _classname)) then {
  247. ["","","",["Init",_object,_classname,_objectHelper]] spawn snap_build;
  248. };
  249.  
  250. while {_isOk} do {
  251.  
  252. _zheightchanged = false;
  253. _zheightdirection = "";
  254. _rotate = false;
  255.  
  256. if (DZE_Q) then {
  257. DZE_Q = false;
  258. _zheightdirection = "up";
  259. _zheightchanged = true;
  260. };
  261. if (DZE_Z) then {
  262. DZE_Z = false;
  263. _zheightdirection = "down";
  264. _zheightchanged = true;
  265. };
  266. if (DZE_Q_alt) then {
  267. DZE_Q_alt = false;
  268. _zheightdirection = "up_alt";
  269. _zheightchanged = true;
  270. };
  271. if (DZE_Z_alt) then {
  272. DZE_Z_alt = false;
  273. _zheightdirection = "down_alt";
  274. _zheightchanged = true;
  275. };
  276. if (DZE_Q_ctrl) then {
  277. DZE_Q_ctrl = false;
  278. _zheightdirection = "up_ctrl";
  279. _zheightchanged = true;
  280. };
  281. if (DZE_Z_ctrl) then {
  282. DZE_Z_ctrl = false;
  283. _zheightdirection = "down_ctrl";
  284. _zheightchanged = true;
  285. };
  286. if (DZE_4) then {
  287. _rotate = true;
  288. DZE_4 = false;
  289. _dir = -45;
  290. };
  291. if (DZE_6) then {
  292. _rotate = true;
  293. DZE_6 = false;
  294. _dir = 45;
  295. };
  296.  
  297. if (DZE_F and _canDo) then {
  298. if (helperDetach) then {
  299. _objectHelperDir = getDir _objectHelper;
  300. _objectHelper attachTo [player];
  301. _objectHelper setDir _objectHelperDir-(getDir player);
  302. helperDetach = false;
  303. } else {
  304. _objectHelperDir = getDir _objectHelper;
  305. detach _objectHelper;
  306. [_objectHelper] call FNC_GetSetPos;
  307. _objectHelper setVelocity [0,0,0]; //fix sliding glitch
  308. helperDetach = true;
  309. };
  310. DZE_F = false;
  311. };
  312.  
  313. if(_rotate) then {
  314. if (helperDetach) then {
  315. _objectHelperDir = getDir _objectHelper;
  316. _objectHelper setDir _objectHelperDir+_dir;
  317. [_objectHelper] call FNC_GetSetPos;
  318. } else {
  319. detach _objectHelper;
  320. _objectHelperDir = getDir _objectHelper;
  321. _objectHelper setDir _objectHelperDir+_dir;
  322. [_objectHelper] call FNC_GetSetPos;
  323. _objectHelperDir = getDir _objectHelper;
  324. _objectHelper attachTo [player];
  325. _objectHelper setDir _objectHelperDir-(getDir player);
  326. };
  327.  
  328. };
  329.  
  330. if(_zheightchanged) then {
  331. if (!helperDetach) then {
  332. detach _objectHelper;
  333. _objectHelperDir = getDir _objectHelper;
  334. };
  335.  
  336. _position = [_objectHelper] call FNC_GetPos;
  337.  
  338. if(_zheightdirection == "up") then {
  339. _position set [2,((_position select 2)+0.1)];
  340. _objHDiff = _objHDiff + 0.1;
  341. };
  342. if(_zheightdirection == "down") then {
  343. _position set [2,((_position select 2)-0.1)];
  344. _objHDiff = _objHDiff - 0.1;
  345. };
  346.  
  347. if(_zheightdirection == "up_alt") then {
  348. _position set [2,((_position select 2)+1)];
  349. _objHDiff = _objHDiff + 1;
  350. };
  351. if(_zheightdirection == "down_alt") then {
  352. _position set [2,((_position select 2)-1)];
  353. _objHDiff = _objHDiff - 1;
  354. };
  355.  
  356. if(_zheightdirection == "up_ctrl") then {
  357. _position set [2,((_position select 2)+0.01)];
  358. _objHDiff = _objHDiff + 0.01;
  359. };
  360. if(_zheightdirection == "down_ctrl") then {
  361. _position set [2,((_position select 2)-0.01)];
  362. _objHDiff = _objHDiff - 0.01;
  363. };
  364.  
  365. if((_isAllowedUnderGround == 0) && ((_position select 2) < 0)) then {
  366. _position set [2,0];
  367. };
  368.  
  369. if (surfaceIsWater _position) then {
  370. _objectHelper setPosASL _position;
  371. } else {
  372. _objectHelper setPosATL _position;
  373. };
  374.  
  375. if (!helperDetach) then {
  376. _objectHelper attachTo [player];
  377. _objectHelper setDir _objectHelperDir-(getDir player);
  378. };
  379. };
  380.  
  381. sleep 0.5;
  382.  
  383. _location2 = [player] call FNC_GetPos;
  384. _objectHelperPos = [_objectHelper] call FNC_GetPos;
  385.  
  386. if(DZE_5) exitWith {
  387. _isOk = false;
  388. _position = [_object] call FNC_GetPos;
  389. detach _object;
  390. _dir = getDir _object;
  391. deleteVehicle _object;
  392. detach _objectHelper;
  393. deleteVehicle _objectHelper;
  394. };
  395.  
  396. if(_location1 distance _location2 > 10) exitWith {
  397. _isOk = false;
  398. _cancel = true;
  399. _reason = "You've moved to far away from where you started building (within 10 meters)";
  400. detach _object;
  401. deleteVehicle _object;
  402. detach _objectHelper;
  403. deleteVehicle _objectHelper;
  404. };
  405.  
  406. if(_location1 distance _objectHelperPos > 10) exitWith {
  407. _isOk = false;
  408. _cancel = true;
  409. _reason = "Object is placed to far away from where you started building (within 10 meters)";
  410. detach _object;
  411. deleteVehicle _object;
  412. detach _objectHelper;
  413. deleteVehicle _objectHelper;
  414. };
  415.  
  416. if(abs(_objHDiff) > 10) exitWith {
  417. _isOk = false;
  418. _cancel = true;
  419. _reason = "Cannot move up or down more than 10 meters";
  420. detach _object;
  421. deleteVehicle _object;
  422. detach _objectHelper;
  423. deleteVehicle _objectHelper;
  424. };
  425.  
  426. if (player getVariable["combattimeout", 0] >= time) exitWith {
  427. _isOk = false;
  428. _cancel = true;
  429. _reason = (localize "str_epoch_player_43");
  430. detach _object;
  431. deleteVehicle _object;
  432. detach _objectHelper;
  433. deleteVehicle _objectHelper;
  434. };
  435.  
  436. if (DZE_cancelBuilding) exitWith {
  437. _isOk = false;
  438. _cancel = true;
  439. _reason = "Cancelled building.";
  440. detach _object;
  441. deleteVehicle _object;
  442. detach _objectHelper;
  443. deleteVehicle _objectHelper;
  444. };
  445. };
  446.  
  447. //No building on roads unless toggled
  448. if (!DZE_BuildOnRoads) then {
  449. if (isOnRoad _position) then { _cancel = true; _reason = "Cannot build on a road."; };
  450. };
  451.  
  452. // No building in trader zones
  453. if(!canbuild) then { _cancel = true; _reason = "Cannot build in a city."; };
  454.  
  455. if(!_cancel) then {
  456.  
  457. _classname = _classnametmp;
  458.  
  459. // Start Build
  460. _tmpbuilt = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
  461. // ### [CPC] Indestructible Base Fix
  462. _tmpbuilt addEventHandler ["HandleDamage", {false}];
  463. _tmpbuilt enableSimulation false;
  464. // ### [CPC] Indestructible Base Fix
  465.  
  466. _tmpbuilt setdir _dir;
  467.  
  468. // Get position based on object
  469. _location = _position;
  470.  
  471. if((_isAllowedUnderGround == 0) && ((_location select 2) < 0)) then {
  472. _location set [2,0];
  473. };
  474.  
  475. if (surfaceIsWater _location) then {
  476. _tmpbuilt setPosASL _location;
  477. _location = ASLtoATL _location;
  478. } else {
  479. _tmpbuilt setPosATL _location;
  480. };
  481.  
  482. cutText [format[(localize "str_epoch_player_138"),_text], "PLAIN DOWN"];
  483.  
  484. _limit = 3;
  485.  
  486. if (DZE_StaticConstructionCount > 0) then {
  487. _limit = DZE_StaticConstructionCount;
  488. }
  489. else {
  490. if (isNumber (configFile >> "CfgVehicles" >> _classname >> "constructioncount")) then {
  491. _limit = getNumber(configFile >> "CfgVehicles" >> _classname >> "constructioncount");
  492. };
  493. };
  494.  
  495. _isOk = true;
  496. _proceed = false;
  497. _counter = 0;
  498.  
  499. while {_isOk} do {
  500.  
  501. [10,10] call dayz_HungerThirst;
  502. player playActionNow "Medic";
  503.  
  504. _dis=20;
  505. _sfx = "repair";
  506. [player,_sfx,0,false,_dis] call dayz_zombieSpeak;
  507. [player,_dis,true,(getPosATL player)] spawn player_alertZombies;
  508.  
  509. r_interrupt = false;
  510. r_doLoop = true;
  511. _started = false;
  512. _finished = false;
  513.  
  514. while {r_doLoop} do {
  515. _animState = animationState player;
  516. _isMedic = ["medic",_animState] call fnc_inString;
  517. if (_isMedic) then {
  518. _started = true;
  519. };
  520. if (_started && !_isMedic) then {
  521. r_doLoop = false;
  522. _finished = true;
  523. };
  524. if (r_interrupt || (player getVariable["combattimeout", 0] >= time)) then {
  525. r_doLoop = false;
  526. };
  527. if (DZE_cancelBuilding) exitWith {
  528. r_doLoop = false;
  529. };
  530. sleep 0.1;
  531. };
  532. r_doLoop = false;
  533.  
  534.  
  535. if(!_finished) exitWith {
  536. _isOk = false;
  537. _proceed = false;
  538. };
  539.  
  540. if(_finished) then {
  541. _counter = _counter + 1;
  542. };
  543.  
  544. cutText [format[(localize "str_epoch_player_139"),_text, _counter,_limit], "PLAIN DOWN"];
  545.  
  546. if(_counter == _limit) exitWith {
  547. _isOk = false;
  548. _proceed = true;
  549. };
  550.  
  551. };
  552.  
  553. if (_proceed) then {
  554.  
  555. _num_removed = ([player,_item] call BIS_fnc_invRemove);
  556. if(_num_removed == 1) then {
  557.  
  558. cutText [format[localize "str_build_01",_text], "PLAIN DOWN"];
  559.  
  560. if (_isPole) then {
  561. [] spawn player_plotPreview;
  562. };
  563.  
  564. _tmpbuilt setVariable ["OEMPos",_location,true];
  565.  
  566. if(_lockable > 1) then {
  567.  
  568. _combinationDisplay = "";
  569.  
  570. switch (_lockable) do {
  571.  
  572. case 2: { // 2 lockbox
  573. _combination_1 = (floor(random 3)) + 100; // 100=red,101=green,102=blue
  574. _combination_2 = floor(random 10);
  575. _combination_3 = floor(random 10);
  576. _combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
  577. dayz_combination = _combination;
  578. if (_combination_1 == 100) then {
  579. _combination_1_Display = "Red";
  580. };
  581. if (_combination_1 == 101) then {
  582. _combination_1_Display = "Green";
  583. };
  584. if (_combination_1 == 102) then {
  585. _combination_1_Display = "Blue";
  586. };
  587. _combinationDisplay = format["%1%2%3",_combination_1_Display,_combination_2,_combination_3];
  588. };
  589.  
  590. case 3: { // 3 combolock
  591. _combination_1 = floor(random 10);
  592. _combination_2 = floor(random 10);
  593. _combination_3 = floor(random 10);
  594. _combination = format["%1%2%3",_combination_1,_combination_2,_combination_3];
  595. dayz_combination = _combination;
  596. _combinationDisplay = _combination;
  597. };
  598.  
  599. case 4: { // 4 safe
  600. _combination_1 = floor(random 10);
  601. _combination_2 = floor(random 10);
  602. _combination_3 = floor(random 10);
  603. _combination_4 = floor(random 10);
  604. _combination = format["%1%2%3%4",_combination_1,_combination_2,_combination_3,_combination_4];
  605. dayz_combination = _combination;
  606. _combinationDisplay = _combination;
  607. };
  608. };
  609.  
  610. _tmpbuilt setVariable ["CharacterID",_combination,true];
  611.  
  612.  
  613. PVDZE_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],_classname];
  614. publicVariableServer "PVDZE_obj_Publish";
  615.  
  616. cutText [format[(localize "str_epoch_player_140"),_combinationDisplay,_text], "PLAIN DOWN", 5];
  617.  
  618.  
  619. } else {
  620. _tmpbuilt setVariable ["CharacterID",dayz_characterID,true];
  621.  
  622. // fire?
  623. if(_tmpbuilt isKindOf "Land_Fire_DZ") then {
  624. _tmpbuilt spawn player_fireMonitor;
  625. } else {
  626. PVDZE_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
  627. publicVariableServer "PVDZE_obj_Publish";
  628. };
  629. };
  630. } else {
  631. deleteVehicle _tmpbuilt;
  632. cutText [(localize "str_epoch_player_46") , "PLAIN DOWN"];
  633. };
  634.  
  635. } else {
  636. r_interrupt = false;
  637. if (vehicle player == player) then {
  638. [objNull, player, rSwitchMove,""] call RE;
  639. player playActionNow "stop";
  640. };
  641.  
  642. deleteVehicle _tmpbuilt;
  643.  
  644. cutText [(localize "str_epoch_player_46") , "PLAIN DOWN"];
  645. };
  646.  
  647. } else {
  648. cutText [format[(localize "str_epoch_player_47"),_text,_reason], "PLAIN DOWN"];
  649. };
  650. };
  651.  
  652. DZE_ActionInProgress = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement