mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-24 17:10:49 +03:00
1.0.2.13 developer build
This commit is contained in:
@@ -25,6 +25,8 @@ _objectUID = _obj getVariable["ObjectUID","0"];
|
||||
player removeAction s_player_packvault;
|
||||
s_player_packvault = 1;
|
||||
|
||||
if(_objectID == "0" && _objectUID == "0") exitWith {TradeInprogress = false; s_player_packvault = -1; cutText [format["%1 not setup yet.",_text], "PLAIN DOWN"];};
|
||||
|
||||
if((_ownerID != dayz_combination) and (_ownerID != dayz_playerUID)) exitWith { TradeInprogress = false; s_player_packvault = -1; cutText [format["You cannot pack this %1, you do not know the combination.",_text], "PLAIN DOWN"];};
|
||||
|
||||
_alreadyPacking = _obj getVariable["packing",0];
|
||||
@@ -57,56 +59,51 @@ if(!isNull _obj and alive _obj) then {
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
|
||||
if (_objectID != "0" && _objectUID != "0") then {
|
||||
// Remove from database
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
|
||||
// Set down vault "take" item
|
||||
_bag = createVehicle [_packedClass,_pos,[], 0, "CAN_COLLIDE"];
|
||||
|
||||
// Delete original
|
||||
deleteVehicle _obj;
|
||||
|
||||
// Remove from database
|
||||
dayzDeleteObj = [_objectID,_objectUID];
|
||||
publicVariableServer "dayzDeleteObj";
|
||||
|
||||
// Set down vault "take" item
|
||||
_bag = createVehicle [_packedClass,_pos,[], 0, "CAN_COLLIDE"];
|
||||
|
||||
// Delete original
|
||||
deleteVehicle _obj;
|
||||
_bag setdir _dir;
|
||||
_bag setpos _pos;
|
||||
player reveal _bag;
|
||||
|
||||
_bag setdir _dir;
|
||||
_bag setpos _pos;
|
||||
player reveal _bag;
|
||||
// Empty weapon holder
|
||||
_holder = _bag;
|
||||
|
||||
//Add weapons
|
||||
_objWpnTypes = _weapons select 0;
|
||||
_objWpnQty = _weapons select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
//Add Magazines
|
||||
_objWpnTypes = _magazines select 0;
|
||||
_objWpnQty = _magazines select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
// Empty weapon holder
|
||||
_holder = _bag;
|
||||
//Add Backpacks
|
||||
_objWpnTypes = _backpacks select 0;
|
||||
_objWpnQty = _backpacks select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
//Add weapons
|
||||
_objWpnTypes = _weapons select 0;
|
||||
_objWpnQty = _weapons select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addweaponcargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
//Add Magazines
|
||||
_objWpnTypes = _magazines select 0;
|
||||
_objWpnQty = _magazines select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addmagazinecargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
//Add Backpacks
|
||||
_objWpnTypes = _backpacks select 0;
|
||||
_objWpnQty = _backpacks select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
cutText [format["Your %1 has been packed",_text], "PLAIN DOWN"];
|
||||
} else {
|
||||
deleteVehicle _obj;
|
||||
};
|
||||
cutText [format["Your %1 has been packed",_text], "PLAIN DOWN"];
|
||||
};
|
||||
s_player_packvault = -1;
|
||||
TradeInprogress = false;
|
||||
Reference in New Issue
Block a user