mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-15 04:23:13 +03:00
Fix Advanced Trading Selling + new Var
New variable to configure whether or not the player will need to key to sell a vehicle. DZE_SaleRequiresKey = false;
This commit is contained in:
@@ -41,7 +41,7 @@ _HasKeyCheck = {
|
||||
};
|
||||
} count _inventory;
|
||||
};
|
||||
true; //change to _keyFound; to require key to sell vehicle
|
||||
_keyFound;
|
||||
};
|
||||
_totalPrice = 0;
|
||||
if(_total > 0)then{
|
||||
@@ -83,7 +83,7 @@ if(_total > 0)then{
|
||||
};
|
||||
_HasKey = true;
|
||||
if (_vehTrade && {(typeOf Z_vehicle) == _y}) then {
|
||||
if (!(_type in ["trade_any_bicycle", "trade_any_bicycle_old", "trade_any_vehicle_free"])) then {
|
||||
if (!(_type in ["trade_any_bicycle", "trade_any_bicycle_old", "trade_any_vehicle_free"]) && DZE_SaleRequiresKey) then {
|
||||
_HasKey = [Z_vehicle, _all] call _HasKeyCheck;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ _deleteTradedVehicle = {
|
||||
_VehKey2 = (_this select 0) select 0;
|
||||
_delType = _this select 1;
|
||||
if ((count _VehKey2) > 0) then {
|
||||
if ((_VehKey2 select 0) == "0" || _delType in ["trade_any_bicycle", "trade_any_bicycle_old", "trade_any_vehicle_free"]) then {
|
||||
if ((_VehKey2 select 0) == "0" || _delType in ["trade_any_bicycle", "trade_any_bicycle_old", "trade_any_vehicle_free"] || !DZE_SaleRequiresKey) then {
|
||||
_localResult2 = 1;
|
||||
} else {
|
||||
{
|
||||
@@ -31,7 +31,6 @@ _deleteTradedVehicle = {
|
||||
};
|
||||
} forEach (items player);
|
||||
};
|
||||
_localResult2 = 1; //comment out to require key to sell vehicles
|
||||
if (isNil "_localResult2") then {
|
||||
_localResult2 = 0;
|
||||
} else {
|
||||
|
||||
@@ -13,7 +13,7 @@ _weaps = _this select 2;
|
||||
_bags = [];
|
||||
_vehInfo = [];
|
||||
_keyID = 0;
|
||||
_deleteVeh = true; //set to false to require key to sell vehicles
|
||||
_deleteVeh = false;
|
||||
|
||||
if(count _this > 3) then {
|
||||
if (count (_this select 3) > 0) then {
|
||||
@@ -117,7 +117,7 @@ if (count _vehInfo > 0) then {
|
||||
};
|
||||
};
|
||||
} count _normalWeaps;
|
||||
if (_keyID == "0") then {_deleteVeh = True;};
|
||||
if (_keyID == "0" || !DZE_SaleRequiresKey) then {_deleteVeh = True;};
|
||||
} else {
|
||||
_deleteVeh = True;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user