mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-15 20:52:56 +03:00
Allow disabling of buying or selling
Set price of the item to -1 in the Cfg traders files to disallow buying or selling
This commit is contained in:
@@ -45,8 +45,8 @@ if (Z_SingleCurrency) then {
|
||||
_display,
|
||||
_class,
|
||||
CurrencyName,
|
||||
[_sellPrice] call BIS_fnc_numberText,
|
||||
[_buyPrice] call BIS_fnc_numberText,
|
||||
if (_sellPrice >= 0) then {[_sellPrice] call BIS_fnc_numberText;} else {"";},
|
||||
if (_buyPrice >= 0) then {[_buyPrice] call BIS_fnc_numberText;} else {"";},
|
||||
CurrencyName,
|
||||
_transportMaxWeapons,
|
||||
_transportMaxMagazines,
|
||||
@@ -58,10 +58,16 @@ if (Z_SingleCurrency) then {
|
||||
localize "STR_EPOCH_MAGS"
|
||||
];
|
||||
} else {
|
||||
_picSell = getText (configFile >> 'CfgMagazines' >> _sellCurrency >> 'picture');
|
||||
_sellCurrency = getText (configFile >> 'CfgMagazines' >> _sellCurrency >> 'displayName');
|
||||
_picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture');
|
||||
_buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName');
|
||||
_picSell = "";
|
||||
if (_sellPrice >= 0) then {
|
||||
_picSell = getText (configFile >> 'CfgMagazines' >> _sellCurrency >> 'picture');
|
||||
_sellCurrency = getText (configFile >> 'CfgMagazines' >> _sellCurrency >> 'displayName');
|
||||
};
|
||||
_picBuy = "";
|
||||
if (_buyPrice >= 0) then {
|
||||
_picBuy = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'picture');
|
||||
_buyCurrency = getText (configFile >> 'CfgMagazines' >> _buyCurrency >> 'displayName');
|
||||
};
|
||||
|
||||
_formattedText = format [
|
||||
"<img image='%1' size='3' align='center'/><br />" +
|
||||
@@ -75,8 +81,8 @@ if (Z_SingleCurrency) then {
|
||||
_display,
|
||||
_class,
|
||||
_buyCurrency,
|
||||
_sellPrice,
|
||||
_buyPrice,
|
||||
if (_sellPrice >= 0) then {_sellPrice} else {"";},
|
||||
if (_buyPrice >= 0) then {_buyPrice} else {"";},
|
||||
_sellCurrency,
|
||||
_transportMaxWeapons,
|
||||
_transportMaxMagazines,
|
||||
|
||||
Reference in New Issue
Block a user