Guest User

Player Build

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