mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
more vault fixes
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
private["_obj","_bag","_pos"];
|
private["_obj","_bag","_pos"];
|
||||||
hintSilent format["DEBUG: %1",_this];
|
|
||||||
_obj = _this select 3;
|
_obj = _this select 3;
|
||||||
_obj spawn player_packVault;
|
_obj spawn player_packVault;
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ if(_ownerID == dayz_characterID) then {
|
|||||||
//place tent (local)
|
//place tent (local)
|
||||||
_holder = createVehicle ["VaultStorageLocked",_pos,[], 0, "CAN_COLLIDE"];
|
_holder = createVehicle ["VaultStorageLocked",_pos,[], 0, "CAN_COLLIDE"];
|
||||||
_holder setdir _dir;
|
_holder setdir _dir;
|
||||||
|
_holder setpos _pos;
|
||||||
player reveal _holder;
|
player reveal _holder;
|
||||||
|
|
||||||
_holder setVariable["CharacterID",_ownerID,true];
|
_holder setVariable["CharacterID",_ownerID,true];
|
||||||
@@ -42,34 +43,14 @@ if(_ownerID == dayz_characterID) then {
|
|||||||
// dayzDeleteObj call local_deleteObj;
|
// dayzDeleteObj call local_deleteObj;
|
||||||
// };
|
// };
|
||||||
|
|
||||||
deleteVehicle _obj;
|
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;
|
|
||||||
|
|
||||||
//Add Backpacks
|
|
||||||
_objWpnTypes = _backpacks select 0;
|
|
||||||
_objWpnQty = _backpacks select 1;
|
// Fill variables with loot
|
||||||
_countr = 0;
|
_holder setVariable ["WeaponCargo", _weapons, true];
|
||||||
{
|
_holder setVariable ["MagazineCargo", _magazines, true];
|
||||||
_holder addbackpackcargoGlobal [_x,(_objWpnQty select _countr)];
|
_holder setVariable ["BackpackCargo", _backpacks, true];
|
||||||
_countr = _countr + 1;
|
|
||||||
} forEach _objWpnTypes;
|
|
||||||
|
|
||||||
cutText ["Your vault has been locked", "PLAIN DOWN"];
|
cutText ["Your vault has been locked", "PLAIN DOWN"];
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -26,15 +26,16 @@ if(_ownerID == dayz_characterID) then {
|
|||||||
//place tent (local)
|
//place tent (local)
|
||||||
_holder = createVehicle ["VaultStorage",_pos,[], 0, "CAN_COLLIDE"];
|
_holder = createVehicle ["VaultStorage",_pos,[], 0, "CAN_COLLIDE"];
|
||||||
_holder setdir _dir;
|
_holder setdir _dir;
|
||||||
|
_holder setpos _pos;
|
||||||
player reveal _holder;
|
player reveal _holder;
|
||||||
|
|
||||||
_holder setVariable["CharacterID",_ownerID,true];
|
_holder setVariable["CharacterID",_ownerID,true];
|
||||||
_holder setVariable["ObjectID",_objectID,true];
|
_holder setVariable["ObjectID",_objectID,true];
|
||||||
_holder setVariable["ObjectUID",_objectUID,true];
|
_holder setVariable["ObjectUID",_objectUID,true];
|
||||||
|
|
||||||
_weapons = getWeaponCargo _obj;
|
_weapons = _obj getVariable["WeaponCargo",[]];
|
||||||
_magazines = getMagazineCargo _obj;
|
_magazines = _obj getVariable["MagazineCargo",[]];
|
||||||
_backpacks = getBackpackCargo _obj;
|
_backpacks = _obj getVariable["BackpackCargo",[]];
|
||||||
|
|
||||||
// dayzDeleteObj = [_objectID,_objectUID];
|
// dayzDeleteObj = [_objectID,_objectUID];
|
||||||
// publicVariableServer "dayzDeleteObj";
|
// publicVariableServer "dayzDeleteObj";
|
||||||
@@ -43,6 +44,8 @@ if(_ownerID == dayz_characterID) then {
|
|||||||
// };
|
// };
|
||||||
|
|
||||||
deleteVehicle _obj;
|
deleteVehicle _obj;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Add weapons
|
//Add weapons
|
||||||
_objWpnTypes = _weapons select 0;
|
_objWpnTypes = _weapons select 0;
|
||||||
|
|||||||
@@ -1931,14 +1931,9 @@ class CfgVehicles
|
|||||||
model = "\dayz_equip\models\safe1.p3d";
|
model = "\dayz_equip\models\safe1.p3d";
|
||||||
destrType = "DestructNo";
|
destrType = "DestructNo";
|
||||||
armor = 2000;
|
armor = 2000;
|
||||||
memoryPointSupply = "";
|
|
||||||
supplyRadius = 0;
|
|
||||||
transportMaxWeapons = 0;
|
|
||||||
transportMaxMagazines = 0;
|
transportMaxMagazines = 0;
|
||||||
|
transportMaxWeapons = 0;
|
||||||
transportMaxBackpacks = 0;
|
transportMaxBackpacks = 0;
|
||||||
transportAmmo = 0;
|
|
||||||
transportRepair = 0;
|
|
||||||
transportFuel = 0;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class CardboardBox: ReammoBox
|
class CardboardBox: ReammoBox
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ diag_log "HIVE: Starting";
|
|||||||
_pos set [2,0];
|
_pos set [2,0];
|
||||||
_object setpos _pos;
|
_object setpos _pos;
|
||||||
};
|
};
|
||||||
if (_object isKindOf "VaultStorage") then {
|
if (_object isKindOf "VaultStorageLocked") then {
|
||||||
_pos set [2,0];
|
_pos set [2,0];
|
||||||
_object setpos _pos;
|
_object setpos _pos;
|
||||||
};
|
};
|
||||||
@@ -98,57 +98,61 @@ diag_log "HIVE: Starting";
|
|||||||
_object setDamage _damage;
|
_object setDamage _damage;
|
||||||
|
|
||||||
if (count _intentory > 0) then {
|
if (count _intentory > 0) then {
|
||||||
//Add weapons
|
if (_object isKindOf "VaultStorageLocked") then {
|
||||||
_objWpnTypes = (_intentory select 0) select 0;
|
// Fill variables with loot
|
||||||
_objWpnQty = (_intentory select 0) select 1;
|
_object setVariable ["WeaponCargo", (_intentory select 0), true];
|
||||||
_countr = 0;
|
_object setVariable ["MagazineCargo", (_intentory select 1), true];
|
||||||
{
|
_object setVariable ["BackpackCargo", (_intentory select 2), true];
|
||||||
_isOK = isClass(configFile >> "CfgWeapons" >> _x);
|
} else {
|
||||||
if (_isOK) then {
|
|
||||||
_block = getNumber(configFile >> "CfgWeapons" >> _x >> "stopThis") == 1;
|
|
||||||
if (!_block) then {
|
|
||||||
_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
_countr = _countr + 1;
|
|
||||||
} forEach _objWpnTypes;
|
|
||||||
|
|
||||||
//Add Magazines
|
|
||||||
_objWpnTypes = (_intentory select 1) select 0;
|
|
||||||
_objWpnQty = (_intentory select 1) select 1;
|
|
||||||
_countr = 0;
|
|
||||||
{
|
|
||||||
_isOK = isClass(configFile >> "CfgMagazines" >> _x);
|
|
||||||
if (_isOK) then {
|
|
||||||
_block = getNumber(configFile >> "CfgMagazines" >> _x >> "stopThis") == 1;
|
|
||||||
if (!_block) then {
|
|
||||||
_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
_countr = _countr + 1;
|
|
||||||
} forEach _objWpnTypes;
|
|
||||||
|
|
||||||
//Add Backpacks
|
//Add weapons
|
||||||
_objWpnTypes = (_intentory select 2) select 0;
|
_objWpnTypes = (_intentory select 0) select 0;
|
||||||
_objWpnQty = (_intentory select 2) select 1;
|
_objWpnQty = (_intentory select 0) select 1;
|
||||||
_countr = 0;
|
_countr = 0;
|
||||||
{
|
{
|
||||||
_isOK = isClass(configFile >> "CfgVehicles" >> _x);
|
_isOK = isClass(configFile >> "CfgWeapons" >> _x);
|
||||||
if (_isOK) then {
|
if (_isOK) then {
|
||||||
_block = getNumber(configFile >> "CfgVehicles" >> _x >> "stopThis") == 1;
|
_block = getNumber(configFile >> "CfgWeapons" >> _x >> "stopThis") == 1;
|
||||||
if (!_block) then {
|
if (!_block) then {
|
||||||
_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
|
_object addWeaponCargoGlobal [_x,(_objWpnQty select _countr)];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
_countr = _countr + 1;
|
||||||
_countr = _countr + 1;
|
} forEach _objWpnTypes;
|
||||||
} forEach _objWpnTypes;
|
|
||||||
|
//Add Magazines
|
||||||
|
_objWpnTypes = (_intentory select 1) select 0;
|
||||||
|
_objWpnQty = (_intentory select 1) select 1;
|
||||||
|
_countr = 0;
|
||||||
|
{
|
||||||
|
_isOK = isClass(configFile >> "CfgMagazines" >> _x);
|
||||||
|
if (_isOK) then {
|
||||||
|
_block = getNumber(configFile >> "CfgMagazines" >> _x >> "stopThis") == 1;
|
||||||
|
if (!_block) then {
|
||||||
|
_object addMagazineCargoGlobal [_x,(_objWpnQty select _countr)];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_countr = _countr + 1;
|
||||||
|
} forEach _objWpnTypes;
|
||||||
|
|
||||||
|
//Add Backpacks
|
||||||
|
_objWpnTypes = (_intentory select 2) select 0;
|
||||||
|
_objWpnQty = (_intentory select 2) select 1;
|
||||||
|
_countr = 0;
|
||||||
|
{
|
||||||
|
_isOK = isClass(configFile >> "CfgVehicles" >> _x);
|
||||||
|
if (_isOK) then {
|
||||||
|
_block = getNumber(configFile >> "CfgVehicles" >> _x >> "stopThis") == 1;
|
||||||
|
if (!_block) then {
|
||||||
|
_object addBackpackCargoGlobal [_x,(_objWpnQty select _countr)];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
_countr = _countr + 1;
|
||||||
|
} forEach _objWpnTypes;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_object isKindOf "AllVehicles") then {
|
if (_object isKindOf "AllVehicles") then {
|
||||||
if(_ownerID != 0) then {
|
|
||||||
_object setVehicleInit "this lock true; this lockCargo true;";
|
|
||||||
processInitCommands;
|
|
||||||
};
|
|
||||||
{
|
{
|
||||||
_selection = _x select 0;
|
_selection = _x select 0;
|
||||||
_dam = _x select 1;
|
_dam = _x select 1;
|
||||||
@@ -161,6 +165,10 @@ diag_log "HIVE: Starting";
|
|||||||
_position = ([(getPosATL _object),0,100,10,0,500,0] call BIS_fnc_findSafePos);
|
_position = ([(getPosATL _object),0,100,10,0,500,0] call BIS_fnc_findSafePos);
|
||||||
_object setPosATL _position;
|
_object setPosATL _position;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if(_ownerID != "0") then {
|
||||||
|
_object setvehiclelock "locked";
|
||||||
|
};
|
||||||
_object call fnc_vehicleEventHandler;
|
_object call fnc_vehicleEventHandler;
|
||||||
_totalvehicles = _totalvehicles + 1;
|
_totalvehicles = _totalvehicles + 1;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user