Advertisement
Guest User

Untitled

a guest
Jul 10th, 2013
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.65 KB | None | 0 0
  1. private["_func_ownerRemove","_qtyS","_qtyW","_qtyL","_qtyM","_qtyG","_qtyT","_removable","_eTool","_result","_building","_dialog","_classname","_requirements","_objectID","_objectUID","_obj","_cnt","_id","_tblProb","_locationPlayer","_randNum2","_smallWloop","_medWloop","_longWloop","_wait","_longWait","_medWait","_highP","_medP","_lowP","_failRemove","_canRemove","_randNum","_text","_dir","_pos","_isWater","_inVehicle","_onLadder","_hasToolbox","_canDo","_hasEtool"];
  2. disableserialization;
  3. _obj = cursorTarget;
  4. if (_obj isKindof "Grave") then {
  5. _text = "Bomb";
  6. cutText [format["You can only disarm %1 to remove it",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit";
  7. };
  8. // Get ObjectID or UID
  9. if (!isNull _obj) then {
  10. _objectID = _obj getVariable["ObjectID","0"];
  11. _objectUID = _obj getVariable["ObjectUID","0"];
  12. };
  13.  
  14. _ownerID = _obj getVariable ["characterID","0"];
  15. // Pre-Checks
  16. _dir = direction _obj;
  17. _pos = getposATL _obj;
  18. _locationPlayer = player modeltoworld [0,0,0];
  19. _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
  20. _isWater = (surfaceIsWater _locationPlayer) or dayz_isSwimming;
  21. _inVehicle = (vehicle player != player);
  22. _building = nearestObject [player, "Building"];
  23. _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1;
  24. _hasToolbox = "ItemToolbox" in items player;
  25. _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder); //USE!!
  26. _hasEtool = "ItemEtool" in weapons player;
  27.  
  28. //Booleans
  29. _canRemove = false;
  30. _failRemove = false;
  31. _result = false;
  32.  
  33. //Integers
  34. _longWloop = 6; // larger object loop, decrease to decrease time
  35. _medWloop = 4;
  36. _smallWloop = 3;
  37. _tblProb = 30;
  38. _lowP = 35;
  39. _medP = 70;
  40. _highP = 95;
  41. _cnt = 0;
  42. _wait = 10;
  43.  
  44. _qtyT = 0;
  45. _qtyS = 0; //144752844454260
  46. _qtyW = 0;
  47. _qtyL = 0;
  48. _qtyM = 0;
  49. _qtyG = 0;
  50. // Do percentages
  51. _randNum = round(random 100);
  52. _randNum2 = round(random 100);
  53.  
  54. //Others
  55. if(_isWater) then {cutText [localize "str_player_26", "PLAIN DOWN"];breakOut "exit";};
  56. if(_onLadder) then {cutText [localize "str_player_21", "PLAIN DOWN"];breakOut "exit";};
  57. if (_inVehicle) then {cutText [localize "Can't do this in vehicle", "PLAIN DOWN"];breakOut "exit";};
  58.  
  59. // This function is for owner removal either by code (line 109) or by ownerID (line 112)
  60. _func_ownerRemove = {
  61.  
  62. for "_i" from 0 to ((count allbuildables) - 1) do
  63. {
  64. _classname = (allbuildables select _i) select _i - _i + 1;
  65. _result = [typeOf(_obj),_classname] call BIS_fnc_areEqual;
  66. if (_result) then {
  67. _recipe = (allbuildables select _i) select _i - _i;
  68. //[_qtyT, _qtyS, _qtyW, _qtyL, _qtyM, _qtyG]
  69. _qtyT = _recipe select 0;
  70. _qtyS = _recipe select 1;
  71. _qtyW = _recipe select 2;
  72. _qtyL = _recipe select 3;
  73. _qtyM = _recipe select 4;
  74. _qtyG = _recipe select 5;
  75. };
  76. };
  77. if (_qtyT > 0) then {
  78. for "_i" from 1 to _qtyT do { _result = [player,"ItemTankTrap"] call BIS_fnc_invAdd; };
  79. };
  80. if (_qtyS > 0) then {
  81. for "_i" from 1 to _qtyS do { _result = [player,"ItemSandbag"] call BIS_fnc_invAdd; };
  82. };
  83. if (_qtyW > 0) then {
  84. for "_i" from 1 to _qtyW do { _result = [player,"ItemWire"] call BIS_fnc_invAdd; };
  85. };
  86. if (_qtyL > 0) then {
  87. for "_i" from 1 to _qtyL do { _result = [player,"PartWoodPile"] call BIS_fnc_invAdd; };
  88. };
  89. if (_qtyM > 0) then {
  90. for "_i" from 1 to _qtyM do { _result = [player,"PartGeneric"] call BIS_fnc_invAdd; };
  91. };
  92. if (_qtyG > 0) then {
  93. for "_i" from 1 to _qtyG do { _result = [player,"HandGrenade_west"] call BIS_fnc_invAdd; };
  94. };
  95. cutText [format["Owner refunded for object %1",typeof(_obj)], "PLAIN DOWN",1];
  96. PVDZ_obj_Delete = [_objectID,_objectUID];
  97. publicVariableServer "PVDZ_obj_Delete";
  98. if (isServer) then {
  99. PVDZ_obj_Delete call local_deleteObj;
  100. };
  101. deletevehicle _obj;
  102. breakout "exit";
  103.  
  104. };
  105.  
  106.  
  107.  
  108. //Determine camoNet since camoNets cannot be targeted with Crosshair
  109.  
  110. switch (true) do
  111. {
  112. case(camoNetB_East distance player < 10 && isNull _obj):
  113. {
  114. _obj = camoNetB_East;
  115. _objectID = _obj getVariable["ObjectID","0"];
  116. _objectUID = _obj getVariable["ObjectUID","0"];
  117. _ownerID = _obj getVariable ["characterID","0"];
  118. };
  119. case(camoNetVar_East distance player < 10 && isNull _obj):
  120. {
  121. _obj = camoNetVar_East;
  122. _objectID = _obj getVariable["ObjectID","0"];
  123. _objectUID = _obj getVariable["ObjectUID","0"];
  124. _ownerID = _obj getVariable ["characterID","0"];
  125. };
  126. case(camoNet_East distance player < 10 && isNull _obj):
  127. {
  128. _obj = camoNet_East;
  129. _objectID = _obj getVariable["ObjectID","0"];
  130. _objectUID = _obj getVariable["ObjectUID","0"];
  131. _ownerID = _obj getVariable ["characterID","0"];
  132. };
  133. case(camoNetB_Nato distance player < 10 && isNull _obj):
  134. {
  135. _obj = camoNetB_Nato;
  136. _objectID = _obj getVariable["ObjectID","0"];
  137. _objectUID = _obj getVariable["ObjectUID","0"];
  138. _ownerID = _obj getVariable ["characterID","0"];
  139. };
  140. case(camoNetVar_Nato distance player < 10 && isNull _obj):
  141. {
  142. _obj = camoNetVar_Nato;
  143. _objectID = _obj getVariable["ObjectID","0"];
  144. _objectUID = _obj getVariable["ObjectUID","0"];
  145. _ownerID = _obj getVariable ["characterID","0"];
  146. };
  147. case(camoNet_Nato distance player < 10 && isNull _obj):
  148. {
  149. _obj = camoNet_Nato;
  150. _objectID = _obj getVariable["ObjectID","0"];
  151. _objectUID = _obj getVariable["ObjectUID","0"];
  152. _ownerID = _obj getVariable ["characterID","0"];
  153. };
  154.  
  155. };
  156.  
  157. _validObject = _obj getVariable ["validObject",false];
  158. if (removeObject && _validObject) then {
  159. call _func_ownerRemove;
  160. };
  161.  
  162. if ( _ownerID == dayz_characterID ) then {
  163. call _func_ownerRemove;
  164. };
  165. if ( _ownerID == dayz_playerUID ) then {
  166. call _func_ownerRemove;
  167. };
  168. // ------------------------------------------------------------------------kikyou2 Panel Admin Override Start---------------------------------------------------------------------
  169. if ((getPlayerUID player) in ["x"]) then {
  170. call _func_ownerRemove;
  171. };
  172. // ------------------------------------------------------------------------kikyou2 Panel Admin Overide End------------------------------------------------------------------------
  173. remProc = true;
  174. // Check what object is returned from global array, then return classname
  175. for "_i" from 0 to ((count allbuildables) - 1) do
  176. {
  177. _classname = (allbuildables select _i) select _i - _i + 1;
  178. _result = [typeOf(_obj),_classname] call BIS_fnc_areEqual;
  179. if (_result) then {
  180. //_text = _classname;
  181. _text = getText (configFile >> "CfgVehicles" >> typeOf cursorTarget >> "displayName");
  182. _requirements = (allbuildables select _i) select _i - _i + 2;
  183. };
  184. };
  185. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  186.  
  187. //Get Requirements from build_list.sqf global array [_attachCoords, _startPos, _modDir, _toolBox, _eTool, _medWait, _longWait, _inBuilding, _roadAllowed, _inTown];
  188. _eTool = _requirements select 4;
  189. _medWait = _requirements select 5;
  190. _longWait = _requirements select 6;
  191. _removable = _requirements select 10;
  192. if (!_removable) then {cutText [format["%1 is not allowed to be removed!",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  193. switch (true) do
  194. {
  195. case(_longWait):
  196. {
  197. if (_eTool) then {
  198. if (!_hasEtool) then {cutText [format["You need an entrenching tool to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  199. };
  200. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  201. if (_randNum > _highP) then {_tblProb = _tblProb + 40;_canRemove = true;} else {_tblProb = _tblProb + 40;_failRemove = true;_longWait = true; };
  202. };
  203. case(_medWait):
  204. {
  205. if (_eTool) then {
  206. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  207. };
  208. if (!_hasEtool) then {cutText [format["You need an entrenching tool to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  209. if (_randNum > _medP) then {_tblProb = _tblProb + 20;_canRemove = true;} else {_tblProb = _tblProb + 20; _failRemove = true; _medWait = true;};
  210. };
  211. case(!_medWait && !_longWait):
  212. {
  213. if (_eTool) then {
  214. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  215. };
  216. if (!_hasEtool) then {cutText [format["You need an entrenching tool to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  217. if (_randNum > _lowP) then {_canRemove = true;} else { _failRemove = true;};
  218. };
  219. };
  220.  
  221.  
  222. //BuiltItems = ["Land_CncBlock","Land_ladder_half","Land_prebehlavka","Misc_cargo_cont_small_EP1","Land_fort_rampart_EP1","Hhedgehog_concrete","Land_ladder_half","Land_A_Castle_Stairs_A","Ins_WarfareBContructionSite","Misc_Cargo1Bo_military","Land_Misc_Cargo2E","Barrack2","Land_rails_bridge_40","Land_HBarrier1","Land_BagFenceRound","Land_fortified_nest_small","Land_HBarrier_large","Base_WarfareBBarrier10x","bunkerMedium02","Base_WarfareBBarrier10xTall","Land_Fort_Watchtower","Land_fortified_net_big","Fence_Ind","Fort_RazorWire","Land_podlejzacka","Land_camoNet_Nato","Land_camoNetB_Nato","Land_camoNetVar_Nato"];
  223.  
  224. switch (true) do
  225. {
  226. case(_longWait && _canRemove):
  227. {
  228. _cnt = _longWloop;
  229. _cnt = _cnt * 10;
  230. for "_i" from 0 to _longWloop do
  231. {
  232. cutText [format["Attempting to deconstruct %1 %2 seconds left. \nMove from current position to cancel\n %3 percent chance to fail, %4 percent chance to lose toolbox",_text,_cnt + 10,_highP,_tblProb], "PLAIN DOWN",1];
  233. if (player distance _locationPlayer > 0.2) then {cutText [format["Removal canceled for %1, position of player moved",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  234. if (!_canDo || _onLadder || _inVehicle) then {cutText [format["Removal canceled for %1, player is unable to continue",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  235. player playActionNow "Medic";
  236. _dialog = findDisplay 106;
  237. sleep 1;
  238. [player,"repair",0,false] call dayz_zombieSpeak;
  239. _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
  240. sleep _wait;
  241. _hasToolbox = "ItemToolbox" in items player;
  242. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  243. if (!(isNull _dialog)) then {cutText [format["Removal canceled for %1, you opened your gear menu.",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  244. _cnt = _cnt - 10;
  245. };
  246. _hasToolbox = "ItemToolbox" in items player;
  247. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  248. if (!isNull _obj && _randNum2 < _tblProb) then {player removeWeapon "ItemToolbox"; cutText ["Your toolbox was used up!", "PLAIN DOWN"];};
  249. sleep 1.5;
  250. };
  251. case(_medWait && _canRemove):
  252. {
  253. _cnt = _medWloop;
  254. _cnt = _cnt * 10;
  255. for "_i" from 0 to _medWloop do
  256. {
  257. cutText [format["Attempting to deconstruct %1 %2 seconds left. \nMove from current position to cancel\n %3 percent chance to fail, %4 percent chance to lose toolbox",_text,_cnt + 10,_medP,_tblProb], "PLAIN DOWN",1];
  258. if (player distance _locationPlayer > 0.2) then {cutText [format["Removal canceled for %1, position of player moved",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  259. if (!_canDo || _onLadder || _inVehicle) then {cutText [format["Removal canceled for %1, player is unable to continue",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  260. player playActionNow "Medic";
  261. _dialog = findDisplay 106;
  262. sleep 1;
  263. [player,"repair",0,false] call dayz_zombieSpeak;
  264. _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
  265. sleep _wait;
  266. _hasToolbox = "ItemToolbox" in items player;
  267. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  268. if (!(isNull _dialog)) then {cutText [format["Removal canceled for %1, you opened your gear menu.",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  269. _cnt = _cnt - 10;
  270. };
  271. _hasToolbox = "ItemToolbox" in items player;
  272. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  273. if (!isNull _obj && _randNum2 < _tblProb) then {player removeWeapon "ItemToolbox"; cutText ["Your toolbox was used up!", "PLAIN DOWN"];};
  274. sleep 1.5;
  275. };
  276. case((!_medWait && !_longWait) && _canRemove):
  277. {
  278. _cnt = _smallWloop;
  279. _cnt = _cnt * 10;
  280. for "_i" from 0 to _smallWloop do
  281. {
  282. cutText [format["Attempting to deconstruct %1 %2 seconds left. \nMove from current position to cancel\n %3 percent chance to fail, %4 percent chance to lose toolbox",_text,_cnt + 10,_lowP,_tblProb], "PLAIN DOWN",1];
  283. if (player distance _locationPlayer > 0.2) then {cutText [format["Removal canceled for %1, position of player moved",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  284. if (!_canDo || _onLadder || _inVehicle) then {cutText [format["Removal canceled for %1, player is unable to continue",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  285. player playActionNow "Medic";
  286. _dialog = findDisplay 106;
  287. sleep 1;
  288. [player,"repair",0,false] call dayz_zombieSpeak;
  289. _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
  290. sleep _wait;
  291. _hasToolbox = "ItemToolbox" in items player;
  292. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  293. if (!(isNull _dialog)) then {cutText [format["Removal canceled for %1, you opened your gear menu.",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  294. _cnt = _cnt - 10;
  295. };
  296. _hasToolbox = "ItemToolbox" in items player;
  297. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  298. if (!isNull _obj && _randNum2 < _tblProb) then {player removeWeapon "ItemToolbox"; cutText ["Your toolbox was used up!", "PLAIN DOWN"];};
  299. sleep 1.5;
  300. };
  301. case(_longWait && _failRemove):
  302. {
  303. _cnt = _longWloop;
  304. _cnt = _cnt * 10;
  305. for "_i" from 0 to _longWloop do
  306. {
  307. cutText [format["Attempting to deconstruct %1 %2 seconds left. \nMove from current position to cancel\n %3 percent chance to fail, %4 percent chance to lose toolbox",_text,_cnt + 10,_highP,_tblProb], "PLAIN DOWN",1];
  308. if (player distance _locationPlayer > 0.2) then {cutText [format["Removal canceled for %1, position of player moved",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  309. if (!_canDo || _onLadder || _inVehicle) then {cutText [format["Removal canceled for %1, player is unable to continue",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  310. player playActionNow "Medic";
  311. _dialog = findDisplay 106;
  312. sleep 1;
  313. [player,"repair",0,false] call dayz_zombieSpeak;
  314. _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
  315. sleep _wait;
  316. _hasToolbox = "ItemToolbox" in items player;
  317. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  318. if (!(isNull _dialog)) then {cutText [format["Removal canceled for %1, you opened your gear menu.",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  319. _cnt = _cnt - 10;
  320. };
  321. _hasToolbox = "ItemToolbox" in items player;
  322. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  323. if (!isNull _obj && _randNum2 < _tblProb) then {player removeWeapon "ItemToolbox"; cutText ["Your toolbox was used up!", "PLAIN DOWN"];};
  324. sleep 1.5;
  325. cutText [format["You failed to remove %1!",_text], "PLAIN DOWN",6]; remProc = false; breakOut "exit";
  326. };
  327. case(_medWait && _failRemove):
  328. {
  329. _cnt = _medWloop;
  330. _cnt = _cnt * 10;
  331. for "_i" from 0 to _medWloop do
  332. {
  333. cutText [format["Attempting to deconstruct %1 %2 seconds left. \nMove from current position to cancel\n %3 percent chance to fail, %4 percent chance to lose toolbox",_text,_cnt + 10,_medP,_tblProb], "PLAIN DOWN",1];
  334. if (player distance _locationPlayer > 0.2) then {cutText [format["Removal canceled for %1, position of player moved",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  335. if (!_canDo || _onLadder || _inVehicle) then {cutText [format["Removal canceled for %1, player is unable to continue",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  336. player playActionNow "Medic";
  337. _dialog = findDisplay 106;
  338. sleep 1;
  339. [player,"repair",0,false] call dayz_zombieSpeak;
  340. _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
  341. sleep _wait;
  342. _hasToolbox = "ItemToolbox" in items player;
  343. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  344. if (!(isNull _dialog)) then {cutText [format["Removal canceled for %1, you opened your gear menu.",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  345. _cnt = _cnt - 10;
  346. };
  347. _hasToolbox = "ItemToolbox" in items player;
  348. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  349. if (!isNull _obj && _randNum2 < _tblProb) then {player removeWeapon "ItemToolbox"; cutText ["Your toolbox was used up!", "PLAIN DOWN"];};
  350. sleep 1.5;
  351. cutText [format["You failed to remove %1!",_text], "PLAIN DOWN",6]; remProc = false; breakOut "exit";
  352. };
  353. case((!_medWait && !_longWait) && _failRemove):
  354. {
  355. _cnt = _smallWloop;
  356. _cnt = _cnt * 10;
  357. for "_i" from 0 to _smallWloop do
  358. {
  359. cutText [format["Attempting to deconstruct %1 %2 seconds left. \nMove from current position to cancel\n %3 percent chance to fail, %4 percent chance to lose toolbox",_text,_cnt + 10,_lowP,_tblProb], "PLAIN DOWN",1];
  360. if (player distance _locationPlayer > 0.2) then {cutText [format["Removal canceled for %1, position of player moved",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  361. if (!_canDo || _onLadder || _inVehicle) then {cutText [format["Removal canceled for %1, player is unable to continue",_text], "PLAIN DOWN",1]; remProc = false; breakOut "exit";};
  362. player playActionNow "Medic";
  363. _dialog = findDisplay 106;
  364. sleep 1;
  365. [player,"repair",0,false] call dayz_zombieSpeak;
  366. _id = [player,50,true,(getPosATL player)] spawn player_alertZombies;
  367. sleep _wait;
  368. _hasToolbox = "ItemToolbox" in items player;
  369. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  370. if (!(isNull _dialog)) then {cutText [format["Removal canceled for %1, you opened your gear menu.",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  371. _cnt = _cnt - 10;
  372. };
  373. _hasToolbox = "ItemToolbox" in items player;
  374. if (!_hasToolbox) then {cutText [format["You need a tool box to remove %1",_text], "PLAIN DOWN",1];remProc = false; breakOut "exit"; };
  375. if (!isNull _obj && _randNum2 < _tblProb) then {player removeWeapon "ItemToolbox"; cutText ["Your toolbox was used up!", "PLAIN DOWN"];};
  376. sleep 1.5;
  377. cutText [format["You failed to remove %1!",_text], "PLAIN DOWN",6]; remProc = false; breakOut "exit";
  378. };
  379.  
  380. };
  381.  
  382.  
  383. //Player removes object successfully
  384. if (!isNull _obj) then {
  385. cutText [format["You removed a %1 successfully!",_text], "PLAIN DOWN"];
  386. PVDZ_obj_Delete = [_objectID,_objectUID];
  387. publicVariableServer "PVDZ_obj_Delete";
  388. if (isServer) then {
  389. PVDZ_obj_Delete call server_deleteObj;
  390. };
  391. sleep .1;
  392. deleteVehicle _obj;
  393. };
  394. remProc = false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement