private ["_item","_picture","_class","_display","_transportMaxWeapons","_transportMaxMagazines","_transportmaxBackpacks","_buyPrice","_sellPrice","_buyCurrency","_sellCurrency","_formattedText","_picBuy","_picSell"]; #include "defines.hpp" _item = _this select 0; _picture = _item select 4; _class = _item select 0; _display = _item select 3; _transportMaxWeapons = 0; _transportMaxMagazines = 0; _buyPrice = 0; _sellPrice = 0; if (Z_Selling) then { _buyPrice = _item select 6; _buyCurrency = _item select 8; _sellPrice = _item select 2; _sellCurrency = _item select 7; } else { _buyPrice = _item select 2; _buyCurrency = _item select 7; _sellPrice = _item select 6; _sellCurrency = _item select 8; }; if (isNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxWeapons')) then { _transportMaxWeapons = getNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxWeapons'); }; if (isNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxMagazines')) then { _transportMaxMagazines = getNumber (configFile >> 'CfgVehicles' >> _class >> 'transportMaxMagazines'); }; if (Z_SingleCurrency) then { _formattedText = format [ "
" + "%10: %2
" + "%11: %3
" + "%13: %6 %4
" + "%12: %5 %7
" + "%14: %8
" + "%15: %9
", _picture, _display, _class, CurrencyName, if (_sellPrice >= 0) then {[_sellPrice] call BIS_fnc_numberText;} else {"";}, if (_buyPrice >= 0) then {[_buyPrice] call BIS_fnc_numberText;} else {"";}, CurrencyName, _transportMaxWeapons, _transportMaxMagazines, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291", localize "STR_EPOCH_WEPS", localize "STR_EPOCH_MAGS" ]; } else { _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 [ "
" + "%10: %2
" + "%11: %3
" + "%13: %6 %4
" + "%12: %5 %7
" + "%14: %8
" + "%15: %9
", _picture, _display, _class, _buyCurrency, if (_sellPrice >= 0) then {_sellPrice} else {"";}, if (_buyPrice >= 0) then {_buyPrice} else {"";}, _sellCurrency, _transportMaxWeapons, _transportMaxMagazines, localize "STR_EPOCH_NAME", localize "STR_EPOCH_CLASS", localize "STR_EPOCH_PLAYER_292", localize "STR_EPOCH_PLAYER_291", localize "STR_EPOCH_WEPS", localize "STR_EPOCH_MAGS", _picSell, _picBuy ]; }; (findDisplay Z_AT_DIALOGWINDOW displayCtrl Z_AT_ITEMINFO) ctrlSetStructuredText parseText _formattedText;