1.0.1.6 Developer Build

This commit is contained in:
[VB]AWOL
2013-07-30 21:52:28 -05:00
parent e333adff4f
commit b2b79305f7
42 changed files with 791 additions and 438 deletions

View File

@@ -3,12 +3,12 @@ private ["_array","_type","_classname","_holder","_config","_isOk","_muzzles","_
// Exit if player zombie
if(player isKindOf "PZombie_VB") exitWith {};
if(TradeInprogress) exitWith { cutText ["Take item already in progress." , "PLAIN DOWN"]; };
TradeInprogress = true;
// Test cannot lock while another player is nearby
_playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1;
if(_playerNear) exitWith { TradeInprogress = false; cutText ["Cannot take item while another player is nearby." , "PLAIN DOWN"]; };
// _playerNear = {isPlayer _x} count (player nearEntities ["CAManBase", 6]) > 1;
// if(_playerNear) exitWith {cutText ["Cannot take item while another player is nearby." , "PLAIN DOWN"]; };
if (!DZE_CanPickup) exitWith { cutText ["Take item already in progress." , "PLAIN DOWN"]; };
DZE_CanPickup = false;
_array = _this select 3;
_type = _array select 0;
@@ -29,9 +29,10 @@ if (_claimedBy == "0" or !_playerNear) then {
_holder setVariable["claimed",_playerID,true];
};
if(_classname isKindOf "TrapBear") exitwith {TradeInprogress = false; deleteVehicle _holder;};
if(_classname isKindOf "TrapBear") exitwith {DZE_CanPickup = true; deleteVehicle _holder;};
player playActionNow "PutDown";
if (_classname == "MeleeCrowbar") then {
player addMagazine 'crowbar_swing';
};
@@ -45,26 +46,18 @@ if (_classname == "MeleeFishingPole") then {
player addMagazine 'Fishing_Swing';
};
_broken = false;
if(_classname == "WoodenArrow") then {
if (20 > random 100) then {
_broken = true;
};
};
if (_broken) exitWith { deleteVehicle _holder; TradeInprogress = false; cutText [localize "str_broken_arrow", "PLAIN DOWN"] };
sleep 1;
_claimedBy = _holder getVariable["claimed","0"];
if (_claimedBy != _playerID) exitWith {TradeInprogress = false; cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]};
if (_claimedBy != _playerID) exitWith {sleep 1; DZE_CanPickup = true; cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]};
if(_classname isKindOf "Bag_Base_EP1") then {
diag_log("Picked up a bag: " + _classname);
};
// test to see if item still exists just before adding and removing
if(isNull _holder) exitWith { TradeInprogress = false; };
if(isNull _holder) exitWith { sleep 1; DZE_CanPickup = true; };
_obj = nearestObjects [(getPosATL player), [(typeOf _holder)], 5];
_qty = count _obj;
@@ -105,4 +98,6 @@ if(_qty >= 1) then {
};
};
};
TradeInprogress = false;
sleep 1;
DZE_CanPickup = true;