mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 09:10:27 +03:00
more vault fixes
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
private["_obj","_bag","_pos"];
|
||||
hintSilent format["DEBUG: %1",_this];
|
||||
_obj = _this select 3;
|
||||
_obj spawn player_packVault;
|
||||
|
||||
@@ -26,6 +26,7 @@ if(_ownerID == dayz_characterID) then {
|
||||
//place tent (local)
|
||||
_holder = createVehicle ["VaultStorageLocked",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_holder setdir _dir;
|
||||
_holder setpos _pos;
|
||||
player reveal _holder;
|
||||
|
||||
_holder setVariable["CharacterID",_ownerID,true];
|
||||
@@ -42,34 +43,14 @@ if(_ownerID == dayz_characterID) then {
|
||||
// dayzDeleteObj call local_deleteObj;
|
||||
// };
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
//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;
|
||||
deleteVehicle _obj;
|
||||
|
||||
//Add Backpacks
|
||||
_objWpnTypes = _backpacks select 0;
|
||||
_objWpnQty = _backpacks select 1;
|
||||
_countr = 0;
|
||||
{
|
||||
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
|
||||
_countr = _countr + 1;
|
||||
} forEach _objWpnTypes;
|
||||
|
||||
|
||||
// Fill variables with loot
|
||||
_holder setVariable ["WeaponCargo", _weapons, true];
|
||||
_holder setVariable ["MagazineCargo", _magazines, true];
|
||||
_holder setVariable ["BackpackCargo", _backpacks, true];
|
||||
|
||||
cutText ["Your vault has been locked", "PLAIN DOWN"];
|
||||
} else {
|
||||
|
||||
@@ -26,15 +26,16 @@ if(_ownerID == dayz_characterID) then {
|
||||
//place tent (local)
|
||||
_holder = createVehicle ["VaultStorage",_pos,[], 0, "CAN_COLLIDE"];
|
||||
_holder setdir _dir;
|
||||
_holder setpos _pos;
|
||||
player reveal _holder;
|
||||
|
||||
_holder setVariable["CharacterID",_ownerID,true];
|
||||
_holder setVariable["ObjectID",_objectID,true];
|
||||
_holder setVariable["ObjectUID",_objectUID,true];
|
||||
|
||||
_weapons = getWeaponCargo _obj;
|
||||
_magazines = getMagazineCargo _obj;
|
||||
_backpacks = getBackpackCargo _obj;
|
||||
_weapons = _obj getVariable["WeaponCargo",[]];
|
||||
_magazines = _obj getVariable["MagazineCargo",[]];
|
||||
_backpacks = _obj getVariable["BackpackCargo",[]];
|
||||
|
||||
// dayzDeleteObj = [_objectID,_objectUID];
|
||||
// publicVariableServer "dayzDeleteObj";
|
||||
@@ -43,6 +44,8 @@ if(_ownerID == dayz_characterID) then {
|
||||
// };
|
||||
|
||||
deleteVehicle _obj;
|
||||
|
||||
|
||||
|
||||
//Add weapons
|
||||
_objWpnTypes = _weapons select 0;
|
||||
|
||||
Reference in New Issue
Block a user