mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-19 01:52:00 +03:00
1.0.2.11
This commit is contained in:
@@ -33,21 +33,6 @@ if(_classname isKindOf "TrapBear") exitwith {DZE_CanPickup = true; deleteVehicle
|
||||
|
||||
player playActionNow "PutDown";
|
||||
|
||||
if (_classname == "MeleeCrowbar") then {
|
||||
player addMagazine 'crowbar_swing';
|
||||
};
|
||||
if (_classname == "MeleeHatchet") then {
|
||||
player addMagazine 'hatchet_swing';
|
||||
};
|
||||
if (_classname == "MeleeMachete") then {
|
||||
player addMagazine 'Machete_swing';
|
||||
};
|
||||
if (_classname == "MeleeFishingPole") then {
|
||||
player addMagazine 'Fishing_Swing';
|
||||
};
|
||||
|
||||
sleep 1;
|
||||
|
||||
_claimedBy = _holder getVariable["claimed","0"];
|
||||
|
||||
if (_claimedBy != _playerID) exitWith {sleep 1; DZE_CanPickup = true; cutText [format[(localize "str_player_beinglooted"),_text] , "PLAIN DOWN"]};
|
||||
@@ -64,6 +49,9 @@ _qty = count _obj;
|
||||
|
||||
if(_qty >= 1) then {
|
||||
|
||||
//Remove melee magazines (BIS_fnc_invAdd fix) (add new melee ammo to array if needed)
|
||||
{player removeMagazines _x} forEach ["Hatchet_Swing","Crowbar_Swing","Machete_Swing","Fishing_Swing"];
|
||||
|
||||
_config = (configFile >> _type >> _classname);
|
||||
_isOk = [player,_config] call BIS_fnc_invAdd;
|
||||
if (_isOk) then {
|
||||
@@ -81,20 +69,15 @@ if(_qty >= 1) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_holder setVariable["claimed","0",true];
|
||||
cutText [localize "STR_DAYZ_CODE_2", "PLAIN DOWN"];
|
||||
if (_classname == "MeleeCrowbar") then {
|
||||
player removeMagazine 'crowbar_swing';
|
||||
};
|
||||
if (_classname == "MeleeHatchet") then {
|
||||
player removeMagazine 'hatchet_swing';
|
||||
};
|
||||
if (_classname == "MeleeMachete") then {
|
||||
player removeMagazine 'Machete_swing';
|
||||
};
|
||||
if (_classname == "MeleeFishingPole") then {
|
||||
player removeMagazine 'Fishing_Swing';
|
||||
|
||||
//adding melee mags back if needed
|
||||
switch (primaryWeapon player) do
|
||||
{
|
||||
case "MeleeHatchet": {player addMagazine 'Hatchet_Swing';};
|
||||
case "MeleeCrowbar": {player addMagazine 'Crowbar_Swing';};
|
||||
case "MeleeMachete": {player addMagazine 'Machete_Swing';};
|
||||
case "MeleeFishingPole": {player addMagazine 'Fishing_Swing';};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -9,7 +9,7 @@ if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "P
|
||||
TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
|
||||
_abort = false;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
@@ -59,6 +59,8 @@ if (_canDo) then {
|
||||
|
||||
while {_craft_doLoop} do {
|
||||
|
||||
_temp_removed_array = [];
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "P
|
||||
TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
|
||||
_abort = false;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
@@ -59,6 +59,8 @@ if (_canDo) then {
|
||||
|
||||
while {_craft_doLoop} do {
|
||||
|
||||
_temp_removed_array = [];
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "P
|
||||
TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
|
||||
_abort = false;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
@@ -59,6 +59,8 @@ if (_canDo) then {
|
||||
|
||||
while {_craft_doLoop} do {
|
||||
|
||||
_temp_removed_array = [];
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "P
|
||||
TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
|
||||
_abort = false;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
@@ -59,6 +59,8 @@ if (_canDo) then {
|
||||
|
||||
while {_craft_doLoop} do {
|
||||
|
||||
_temp_removed_array = [];
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ if(TradeInprogress) exitWith { cutText ["\n\nCrafting already in progress." , "P
|
||||
TradeInprogress = true;
|
||||
|
||||
// temp array of removed parts
|
||||
_temp_removed_array = [];
|
||||
|
||||
_abort = false;
|
||||
_distance = 3;
|
||||
_reason = "";
|
||||
@@ -59,6 +59,8 @@ if (_canDo) then {
|
||||
|
||||
while {_craft_doLoop} do {
|
||||
|
||||
_temp_removed_array = [];
|
||||
|
||||
_missing = "";
|
||||
_missingTools = false;
|
||||
{
|
||||
|
||||
@@ -164,12 +164,15 @@ if (_proceed) then {
|
||||
// Find one random part to give back
|
||||
_refundpart = ["PartEngine","PartGeneric","PartFueltank","PartWheel","PartGlass","ItemJerrycan"] call BIS_fnc_selectRandom;
|
||||
_selectedRemoveOutput set [count _selectedRemoveOutput,[_refundpart,1]];
|
||||
_giveRefund = true;
|
||||
} else {
|
||||
_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput");
|
||||
_giveRefund = (_objectID != "0" && _objectUID != "0");
|
||||
|
||||
};
|
||||
|
||||
// give refund items
|
||||
if((count _selectedRemoveOutput) > 0) then {
|
||||
if((count _selectedRemoveOutput) > 0 and _giveRefund) then {
|
||||
// Put itemsg
|
||||
{
|
||||
_itemOut = _x select 0;
|
||||
|
||||
Reference in New Issue
Block a user