mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
new take option on bags from DayZ CE 1.7.7 #766
This commit is contained in:
@@ -28,6 +28,10 @@ class DZ_Patrol_Pack_EP1: Bag_Base_EP1
|
||||
model = "\ca\weapons_e\AmmoBoxes\backpack_us_assault_Coyote.p3d";
|
||||
transportMaxWeapons = 1;
|
||||
transportMaxMagazines = 10;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_Patrol_Pack_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
|
||||
class DZ_Assault_Pack_EP1: Bag_Base_EP1
|
||||
@@ -40,6 +44,10 @@ class DZ_Assault_Pack_EP1: Bag_Base_EP1
|
||||
model = "\ca\weapons_e\AmmoBoxes\backpack_us_assault.p3d";
|
||||
transportMaxWeapons = 1;
|
||||
transportMaxMagazines = 12;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_Assault_Pack_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
|
||||
class DZ_Czech_Vest_Puch: Bag_Base_EP1
|
||||
@@ -52,6 +60,10 @@ class DZ_Czech_Vest_Puch: Bag_Base_EP1
|
||||
scope = 2;
|
||||
transportmaxmagazines = 12;
|
||||
transportmaxweapons = 0;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_Czech_Vest_Puch'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
|
||||
class DZ_ALICE_Pack_EP1: Bag_Base_EP1
|
||||
@@ -64,6 +76,10 @@ class DZ_ALICE_Pack_EP1: Bag_Base_EP1
|
||||
model = "\ca\weapons_e\AmmoBoxes\backpack_tk_alice.p3d";
|
||||
transportMaxWeapons = 2;
|
||||
transportMaxMagazines = 20;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_ALICE_Pack_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
|
||||
class DZ_TK_Assault_Pack_EP1 : Bag_Base_EP1
|
||||
@@ -76,6 +92,10 @@ class DZ_TK_Assault_Pack_EP1 : Bag_Base_EP1
|
||||
model = "\ca\weapons_e\AmmoBoxes\backpack_civil_assault.p3d";
|
||||
transportMaxWeapons = 2;
|
||||
transportMaxMagazines = 22;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_TK_Assault_Pack_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
|
||||
class DZ_British_ACU : Bag_Base_EP1
|
||||
@@ -88,6 +108,10 @@ class DZ_British_ACU : Bag_Base_EP1
|
||||
icon = "\ca\weapons_e\data\icons\mapIcon_backpack_CA.paa";
|
||||
transportMaxWeapons = 3;
|
||||
transportMaxMagazines = 30;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_British_ACU'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
|
||||
class DZ_CivilBackpack_EP1: Bag_Base_EP1
|
||||
@@ -100,6 +124,10 @@ class DZ_CivilBackpack_EP1: Bag_Base_EP1
|
||||
model = "\ca\weapons_e\AmmoBoxes\backpack_acr.p3d";
|
||||
transportMaxWeapons = 4;
|
||||
transportMaxMagazines = 40;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_CivilBackpack_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
|
||||
class DZ_Backpack_EP1: Bag_Base_EP1
|
||||
@@ -112,6 +140,10 @@ class DZ_Backpack_EP1: Bag_Base_EP1
|
||||
model = "\ca\weapons_e\AmmoBoxes\backpack_us.p3d";
|
||||
transportMaxWeapons = 5;
|
||||
transportMaxMagazines = 50;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_Backpack_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
|
||||
class DZ_LargeGunBag_EP1: Bag_Base_EP1
|
||||
@@ -124,6 +156,10 @@ class DZ_LargeGunBag_EP1: Bag_Base_EP1
|
||||
mapsize = 2;
|
||||
transportMaxWeapons = 6;
|
||||
transportMaxMagazines = 60;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_LargeGunBag_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
class DZ_GunBag_EP1: Bag_Base_EP1
|
||||
{
|
||||
@@ -135,6 +171,10 @@ class DZ_GunBag_EP1: Bag_Base_EP1
|
||||
mapsize = 2;
|
||||
transportMaxWeapons = 3;
|
||||
transportMaxMagazines = 35;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_GunBag_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
class DZ_CompactPack_EP1: Bag_Base_EP1
|
||||
{
|
||||
@@ -146,6 +186,10 @@ class DZ_CompactPack_EP1: Bag_Base_EP1
|
||||
model = "\ca\weapons_e\AmmoBoxes\backpack_rpg.p3d";
|
||||
transportMaxWeapons = 2;
|
||||
transportMaxMagazines = 25;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_CompactPack_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
class DZ_TerminalPack_EP1: Bag_Base_EP1
|
||||
{
|
||||
@@ -157,4 +201,8 @@ class DZ_TerminalPack_EP1: Bag_Base_EP1
|
||||
model = "\ca\weapons_e\AmmoBoxes\backpack_us_AUV";
|
||||
transportMaxWeapons = 1;
|
||||
transportMaxMagazines = 15;
|
||||
class eventHandlers
|
||||
{
|
||||
init="[(_this select 0),'CfgVehicles','DZ_TerminalPack_EP1'] execVM '\z\addons\dayz_code\init\object_BackpackAction.sqf';";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -38,7 +38,12 @@ _claimedBy = _holder getVariable["claimed","0"];
|
||||
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 {
|
||||
|
||||
_PlayerNear = _holder call dze_isnearest_player;
|
||||
if (_PlayerNear) exitWith {cutText [localize "str_pickup_limit_4", "PLAIN DOWN"]};
|
||||
|
||||
diag_log("Picked up a bag: " + _classname);
|
||||
player action ["TakeBag", _holder];
|
||||
};
|
||||
|
||||
// test to see if item still exists just before adding and removing
|
||||
|
||||
14
SQF/dayz_code/init/object_BackpackAction.sqf
Normal file
14
SQF/dayz_code/init/object_BackpackAction.sqf
Normal file
@@ -0,0 +1,14 @@
|
||||
_holder = _this select 0;
|
||||
_type = _this select 1;
|
||||
_classname = _this select 2;
|
||||
|
||||
_name = getText (configFile >> _type >> _classname >> "displayName");
|
||||
|
||||
_actionSet = _holder getVariable["actionSet", false];
|
||||
|
||||
if (!_actionSet) then {
|
||||
s_player_holderPickup = _holder addAction [format[(localize "str_init_take"),_name], "\z\addons\dayz_code\actions\object_pickup.sqf",[_type,_classname,_holder], 20, true, true];
|
||||
player reveal _holder;
|
||||
_holder setVariable["actionSet", true];
|
||||
|
||||
};
|
||||
@@ -646,7 +646,52 @@
|
||||
<French>%1 est déjà en train d'être pillé par quelqu'un d'autre.</French>
|
||||
<Czech>%1 už je loupeno někým jiným.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_beingpacked">
|
||||
<Key ID="str_pickup_limit_1">
|
||||
<English>You need to be within 3 meters to pickup!</English>
|
||||
<German>You need to be within 3 meters to pickup!</German>
|
||||
<Russian>Чтобы поднять предмет, вы должны быть ближе 3х метров!</Russian>
|
||||
<Spanish>¡Necesitas estar a menos de 3 metros para tomarlo!</Spanish>
|
||||
<Dutch>You need to be within 3 meters to pickup!</Dutch>
|
||||
<French>Vous devez être à moins de 3 mètres pour ramasser !</French>
|
||||
<Czech>Aby jste předmět sebrali, musíte být v okolí 3 metrů.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_pickup_limit_2">
|
||||
<English>You must wait to pickup this item!</English>
|
||||
<German>You must wait to pickup this item!</German>
|
||||
<Russian>Чтобы поднять этот предмет, нужно подождать!</Russian>
|
||||
<Spanish>¡Necesitas esperar para tomar este objeto!</Spanish>
|
||||
<Dutch>You must wait to pickup this item!</Dutch>
|
||||
<French>Vous devez attendre pour ramasser l'objet !</French>
|
||||
<Czech>Abyste sebrali předmět, musíte počkat.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_pickup_limit_3">
|
||||
<English>You may only pickup one item at a time!</English>
|
||||
<German>You may only pickup one item at a time!</German>
|
||||
<Russian>Можно поднимать только один предмет за раз!</Russian>
|
||||
<Spanish>¡Solo puedes tomar un objeto a la vez!</Spanish>
|
||||
<Dutch>You may only pickup one item at a time!</Dutch>
|
||||
<French>Vous ne pouvez prendre qu'un objet à la fois !</French>
|
||||
<Czech>Lze sebrat pouze jeden předmět zároveň.</Czech>
|
||||
</Key>
|
||||
<Key ID="str_pickup_limit_4">
|
||||
<English>Another Player is Near by, Only one player can be within 5 meters of a bag to pickup</English>
|
||||
<German>Another Player is Near by, Only one player can be within 5 meters of a bag to pickup</German>
|
||||
<Russian>Другой игрок рядом! Он должен быть далее 5ти метров от поднимаемого рюкзака</Russian>
|
||||
<Spanish>Otro jugador cerca, solo un jugador debe estar a menos de 5 metros de la mochila para tomarla</Spanish>
|
||||
<Dutch>Another Player is Near by, Only one player can be within 5 meters of a bag to pickup</Dutch>
|
||||
<French>Un autre joueur se trouve à proximité. Un seul joueur peut fouiller un sac dans un rayon de 5 mètres.</French>
|
||||
<Czech>Poblíž je další hráč. Pouze jeden hráč musí být v rozsahu 5 metrů aby jste mohli batoh zvednout</Czech>
|
||||
</Key>
|
||||
<Key ID="str_pickup_limit_5">
|
||||
<English>Another player is nearby, only one player can be near to perform this action</English>
|
||||
<German>Ein anderer Spieler in der Nähe ist, kann nur ein Spieler sich in der Nähe, um diese Aktion durchzuführen</German>
|
||||
<Russian>Другой игрок рядом, только один игрок может делать это.</Russian>
|
||||
<Spanish>Otro jugador que está cerca, sólo un jugador puede estar cerca para realizar esta acción</Spanish>
|
||||
<Dutch>Another player is nearby, only one player can be near to perform this action</Dutch>
|
||||
<French>Un autre joueur est à proximité, un seul joueur peut se trouver à proximité pour effectuer cette action</French>
|
||||
<Czech>Dalším hráčem je v blízkosti, může být jeden hráč blízko k provedení této akce</Czech>
|
||||
</Key>
|
||||
<Key ID="str_player_beingpacked">
|
||||
<Original>That tent is already being packed.</Original>
|
||||
<English>That tent is already being packed.</English>
|
||||
<German>Dieses Zelt wurde bereits vergepackt.</German>
|
||||
|
||||
Reference in New Issue
Block a user